4-rings or 4-squares puzzle

You are encouraged to solve this task according to the task description, using any language you may know.
Task

Replace       a, b, c, d, e, f,   and
  g        with the decimal
digits   LOW   ───►   HIGH

such that the sum of the letters inside of each of the four large squares add up to
the same sum.

            ╔══════════════╗      ╔══════════════╗
            ║              ║      ║              ║
            ║      a       ║      ║      e       ║
            ║              ║      ║              ║
            ║          ┌───╫──────╫───┐      ┌───╫─────────┐
            ║          │   ║      ║   │      │   ║         │
            ║          │ b ║      ║ d │      │ f ║         │
            ║          │   ║      ║   │      │   ║         │
            ║          │   ║      ║   │      │   ║         │
            ╚══════════╪═══╝      ╚═══╪══════╪═══╝         │
                       │       c      │      │      g      │
                       │              │      │             │
                       │              │      │             │
                       └──────────────┘      └─────────────┘

Show all output here.



   Show all solutions for each letter being unique with
        LOW=1     HIGH=7

   Show all solutions for each letter being unique with
        LOW=3     HIGH=9

   Show only the   number   of solutions when each letter can be non-unique
        LOW=0     HIGH=9



Related task

 Solve the no connection puzzle


 
(defpackage four-rings
  (:use common-lisp)
  (:export display-solutions))
(in-package four-rings)
 
(defun correct-answer-p (a b c d e f g)
  (let ((v (+ a b)))
    (and (equal v (+ b c d))
         (equal v (+ d e f))
         (equal v (+ f g)))))
 
(defun combinations-if (func len unique min max)
  (let ((results nil))
    (labels ((inner (cur)
               (if (eql (length cur) len)
                 (when (apply func (reverse cur))
                   (push cur results))
                 (dotimes (i (- max min))
                   (when (or (not unique) 
                             (not (member (+ i min) cur)))
                     (inner (append (list (+ i min)) cur)))))))
      (inner nil))
    results))
 
(defun four-rings-solutions (low high unique)
  (combinations-if #'correct-answer-p 7 unique low (1+ high)))
 
(defun display-solutions ()
  (let ((letters '((a b c d e f g))))
    (format t "Low 1, High 7, unique letters: ~%~{~{~3A~}~%~}~%" 
            (append letters (four-rings-solutions 1 7 t)))
    (format t "Low 3, High 9, unique letters: ~%~{~{~3A~}~%~}~%"
            (append letters (four-rings-solutions 3 9 t)))
    (format t "Number of solutions for Low 0, High 9 non-unique:~%~A~%"
            (length (four-rings-solutions 0 9 nil)))))
 