Article CIRCUIT2, MML version 4.99.1005

:: CIRCUIT2:th 1
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedFunction of the Sorts of FreeMSA b2,the Sorts of FreeMSA b2
for b4 being Relation-like Function-like Function-yielding set
for b5 being Element of the carrier of b1
for b6 being Relation-like Function-like FinSequence-like DTree-yielding set
for b7 being Element of (the Sorts of FreeMSA b2) . b5
      st b5 in InnerVertices b1 &
         b7 = [action_at b5,the carrier of b1] -tree b6 &
         b3 is_homomorphism FreeMSA b2,FreeMSA b2 &
         b4 = (the_arity_of action_at b5) * b3
   holds ex b8 being Relation-like Function-like FinSequence-like DTree-yielding set st
      b8 = b4 .. b6 &
       (b3 . b5) . b7 = [action_at b5,the carrier of b1] -tree b8;

:: CIRCUIT2:funcnot 1 => CIRCUIT2:func 1
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  let a4 be InputValues of a2;
  redefine func a3 +* a4 -> Element of product the Sorts of a2;
  idempotence;
::  for a1 being non empty non void Circuit-like monotonic ManySortedSign
::  for a2 being non-empty locally-finite MSAlgebra over a1
::  for a3 being Element of product the Sorts of a2 holds
::     a3 +* a3 = a3;
end;

:: CIRCUIT2:funcnot 2 => CIRCUIT2:func 2
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be InputValues of a2;
  func Fix_inp A3 -> ManySortedFunction of FreeGen the Sorts of a2,the Sorts of FreeEnv a2 means
    for b1 being Element of the carrier of a1 holds
       (b1 in InputVertices a1 implies it . b1 = (FreeGen(b1,the Sorts of a2)) --> root-tree [a3 . b1,b1]) &
        (b1 in SortsWithConstants a1 implies it . b1 = (FreeGen(b1,the Sorts of a2)) --> root-tree [action_at b1,the carrier of a1]) &
        (b1 in (InnerVertices a1) \ SortsWithConstants a1 implies it . b1 = id FreeGen(b1,the Sorts of a2));
end;

:: CIRCUIT2:def 1
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being ManySortedFunction of FreeGen the Sorts of b2,the Sorts of FreeEnv b2 holds
      b4 = Fix_inp b3
   iff
      for b5 being Element of the carrier of b1 holds
         (b5 in InputVertices b1 implies b4 . b5 = (FreeGen(b5,the Sorts of b2)) --> root-tree [b3 . b5,b5]) &
          (b5 in SortsWithConstants b1 implies b4 . b5 = (FreeGen(b5,the Sorts of b2)) --> root-tree [action_at b5,the carrier of b1]) &
          (b5 in (InnerVertices b1) \ SortsWithConstants b1 implies b4 . b5 = id FreeGen(b5,the Sorts of b2));

:: CIRCUIT2:funcnot 3 => CIRCUIT2:func 3
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be InputValues of a2;
  func Fix_inp_ext A3 -> ManySortedFunction of the Sorts of FreeEnv a2,the Sorts of FreeEnv a2 means
    it is_homomorphism FreeEnv a2,FreeEnv a2 & Fix_inp a3 c= it;
end;

:: CIRCUIT2:def 2
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being ManySortedFunction of the Sorts of FreeEnv b2,the Sorts of FreeEnv b2 holds
      b4 = Fix_inp_ext b3
   iff
      b4 is_homomorphism FreeEnv b2,FreeEnv b2 & Fix_inp b3 c= b4;

:: CIRCUIT2:th 2
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being Element of the carrier of b1
for b5 being Element of (the Sorts of FreeEnv b2) . b4
for b6 being set
      st b4 in (InnerVertices b1) \ SortsWithConstants b1 & b5 = root-tree [b6,b4]
   holds ((Fix_inp_ext b3) . b4) . b5 = b5;

:: CIRCUIT2:th 3
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being Element of the carrier of b1
for b5 being Element of (the Sorts of b2) . b4
      st b4 in InputVertices b1
   holds ((Fix_inp_ext b3) . b4) . root-tree [b5,b4] = root-tree [b3 . b4,b4];

:: CIRCUIT2:th 4
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being Element of the carrier of b1
for b5 being Element of (the Sorts of FreeEnv b2) . b4
for b6, b7 being Relation-like Function-like FinSequence-like DTree-yielding set
      st b4 in InnerVertices b1 &
         b5 = [action_at b4,the carrier of b1] -tree b6 &
         dom b6 = dom b7 &
         (for b8 being Element of NAT
               st b8 in dom b6
            holds b7 . b8 = ((Fix_inp_ext b3) . ((the_arity_of action_at b4) /. b8)) . (b6 . b8))
   holds ((Fix_inp_ext b3) . b4) . b5 = [action_at b4,the carrier of b1] -tree b7;

:: CIRCUIT2:th 5
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being Element of the carrier of b1
for b5 being Element of (the Sorts of FreeEnv b2) . b4
      st b4 in SortsWithConstants b1
   holds ((Fix_inp_ext b3) . b4) . b5 = root-tree [action_at b4,the carrier of b1];

:: CIRCUIT2:th 6
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being Element of the carrier of b1
for b5, b6 being Element of (the Sorts of FreeEnv b2) . b4
for b7, b8 being Relation-like Function-like DecoratedTree-like set
      st b7 = b5 & b8 = b6 & b6 = ((Fix_inp_ext b3) . b4) . b5
   holds proj1 b7 = proj1 b8;

:: CIRCUIT2:th 7
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being InputValues of b2
for b4 being Element of the carrier of b1
for b5, b6 being Element of (the Sorts of FreeEnv b2) . b4
      st b6 = ((Fix_inp_ext b3) . b4) . b5
   holds card b5 = card b6;

:: CIRCUIT2:funcnot 4 => CIRCUIT2:func 4
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of the carrier of a1;
  let a4 be InputValues of a2;
  func IGTree(A3,A4) -> Element of (the Sorts of FreeEnv a2) . a3 means
    ex b1 being Element of (the Sorts of FreeEnv a2) . a3 st
       card b1 = size(a3,a2) & it = ((Fix_inp_ext a4) . a3) . b1;
end;

:: CIRCUIT2:def 3
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being InputValues of b2
for b5 being Element of (the Sorts of FreeEnv b2) . b3 holds
      b5 = IGTree(b3,b4)
   iff
      ex b6 being Element of (the Sorts of FreeEnv b2) . b3 st
         card b6 = size(b3,b2) & b5 = ((Fix_inp_ext b4) . b3) . b6;

:: CIRCUIT2:th 8
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being InputValues of b2 holds
   IGTree(b3,b4) = ((Fix_inp_ext b4) . b3) . IGTree(b3,b4);

:: CIRCUIT2:th 9
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being InputValues of b2
for b5 being Relation-like Function-like FinSequence-like DTree-yielding set
      st b3 in InnerVertices b1 &
         dom b5 = dom the_arity_of action_at b3 &
         (for b6 being Element of NAT
               st b6 in dom b5
            holds b5 . b6 = IGTree((the_arity_of action_at b3) /. b6,b4))
   holds IGTree(b3,b4) = [action_at b3,the carrier of b1] -tree b5;

:: CIRCUIT2:funcnot 5 => CIRCUIT2:func 5
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of the carrier of a1;
  let a4 be InputValues of a2;
  func IGValue(A3,A4) -> Element of (the Sorts of a2) . a3 equals
    ((Eval a2) . a3) . IGTree(a3,a4);
end;

:: CIRCUIT2:def 4
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being InputValues of b2 holds
   IGValue(b3,b4) = ((Eval b2) . b3) . IGTree(b3,b4);

:: CIRCUIT2:th 10
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being InputValues of b2
      st b3 in InputVertices b1
   holds IGValue(b3,b4) = b4 . b3;

:: CIRCUIT2:th 11
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of the carrier of b1
for b4 being InputValues of b2
      st b3 in SortsWithConstants b1
   holds IGValue(b3,b4) = (Set-Constants b2) . b3;

:: CIRCUIT2:funcnot 6 => CIRCUIT2:func 6
definition
  let a1 be non empty non void Circuit-like ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  func Following A3 -> Element of product the Sorts of a2 means
    for b1 being Element of the carrier of a1 holds
       (b1 in InputVertices a1 implies it . b1 = a3 . b1) &
        (b1 in InnerVertices a1 implies it . b1 = (Den(action_at b1,a2)) . ((action_at b1) depends_on_in a3));
end;

:: CIRCUIT2:def 5
theorem
for b1 being non empty non void Circuit-like ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3, b4 being Element of product the Sorts of b2 holds
   b4 = Following b3
iff
   for b5 being Element of the carrier of b1 holds
      (b5 in InputVertices b1 implies b4 . b5 = b3 . b5) &
       (b5 in InnerVertices b1 implies b4 . b5 = (Den(action_at b5,b2)) . ((action_at b5) depends_on_in b3));

:: CIRCUIT2:th 12
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of product the Sorts of b2
for b4 being InputValues of b2
      st b4 c= b3
   holds b4 c= Following b3;

:: CIRCUIT2:attrnot 1 => CIRCUIT2:attr 1
definition
  let a1 be non empty non void Circuit-like ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  attr a3 is stable means
    a3 = Following a3;
end;

:: CIRCUIT2:dfs 6
definiens
  let a1 be non empty non void Circuit-like ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
To prove
     a3 is stable
it is sufficient to prove
  thus a3 = Following a3;

:: CIRCUIT2:def 6
theorem
for b1 being non empty non void Circuit-like ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of product the Sorts of b2 holds
      b3 is stable(b1, b2)
   iff
      b3 = Following b3;

:: CIRCUIT2:funcnot 7 => CIRCUIT2:func 7
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  let a4 be InputValues of a2;
  func Following(A3,A4) -> Element of product the Sorts of a2 equals
    Following (a3 +* a4);
end;

:: CIRCUIT2:def 7
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of product the Sorts of b2
for b4 being InputValues of b2 holds
   Following(b3,b4) = Following (b3 +* b4);

:: CIRCUIT2:funcnot 8 => CIRCUIT2:func 8
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be ManySortedFunction of (InputVertices a1) --> NAT,(the Sorts of a2) | InputVertices a1;
  let a4 be Element of product the Sorts of a2;
  func InitialComp(A4,A3) -> Element of product the Sorts of a2 equals
    (a4 +* (0 -th_InputValues a3)) +* Set-Constants a2;
end;

:: CIRCUIT2:def 8
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
for b4 being Element of product the Sorts of b2 holds
   InitialComp(b4,b3) = (b4 +* (0 -th_InputValues b3)) +* Set-Constants b2;

:: CIRCUIT2:funcnot 9 => CIRCUIT2:func 9
definition
  let a1 be non empty non void Circuit-like monotonic ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be ManySortedFunction of (InputVertices a1) --> NAT,(the Sorts of a2) | InputVertices a1;
  let a4 be Element of product the Sorts of a2;
  func Computation(A4,A3) -> Function-like quasi_total Relation of NAT,product the Sorts of a2 means
    it . 0 = InitialComp(a4,a3) &
     (for b1 being natural set holds
        it . (b1 + 1) = Following(it . b1,(b1 + 1) -th_InputValues a3));
end;

:: CIRCUIT2:def 9
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
for b4 being Element of product the Sorts of b2
for b5 being Function-like quasi_total Relation of NAT,product the Sorts of b2 holds
      b5 = Computation(b4,b3)
   iff
      b5 . 0 = InitialComp(b4,b3) &
       (for b6 being natural set holds
          b5 . (b6 + 1) = Following(b5 . b6,(b6 + 1) -th_InputValues b3));

:: CIRCUIT2:th 13
theorem
for b1 being non empty non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of product the Sorts of b2
for b4 being InputValues of b2
for b5 being Element of NAT
   st for b6 being Element of the carrier of b1
           st depth(b6,b2) <= b5
        holds b3 . b6 = IGValue(b6,b4)
for b6 being Element of the carrier of b1
      st depth(b6,b2) <= b5 + 1
   holds (Following b3) . b6 = IGValue(b6,b4);

:: CIRCUIT2:th 14
theorem
for b1 being non empty finite non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
   st commute b3 is constant & InputVertices b1 is not empty
for b4 being Element of product the Sorts of b2
for b5 being InputValues of b2
   st b5 = (commute b3) . 0
for b6 being Element of NAT holds
   b5 c= (Computation(b4,b3)) . b6;

:: CIRCUIT2:th 15
theorem
for b1 being non empty finite non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
for b4 being Element of product the Sorts of b2
for b5 being Element of NAT
   st commute b3 is constant & InputVertices b1 is not empty & (Computation(b4,b3)) . b5 is stable(b1, b2)
for b6 being Element of NAT
      st b5 <= b6
   holds (Computation(b4,b3)) . b5 = (Computation(b4,b3)) . b6;

:: CIRCUIT2:th 16
theorem
for b1 being non empty finite non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
   st commute b3 is constant & InputVertices b1 is not empty
for b4 being Element of product the Sorts of b2
for b5 being InputValues of b2
   st b5 = (commute b3) . 0
for b6 being Element of NAT
for b7 being Element of the carrier of b1
      st depth(b7,b2) <= b6
   holds ((Computation(b4,b3)) . b6) . b7 = IGValue(b7,b5);

:: CIRCUIT2:th 17
theorem
for b1 being non empty finite non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
for b4 being InputValues of b2
   st commute b3 is constant & InputVertices b1 is not empty & b4 = (commute b3) . 0
for b5 being Element of product the Sorts of b2
for b6 being Element of the carrier of b1
for b7 being Element of NAT
      st b7 = depth b2
   holds ((Computation(b5,b3)) . b7) . b6 = IGValue(b6,b4);

:: CIRCUIT2:th 18
theorem
for b1 being non empty finite non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
   st commute b3 is constant & InputVertices b1 is not empty
for b4 being Element of product the Sorts of b2
for b5 being Element of NAT
      st b5 = depth b2
   holds (Computation(b4,b3)) . b5 is stable(b1, b2);

:: CIRCUIT2:th 19
theorem
for b1 being non empty finite non void Circuit-like monotonic ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being ManySortedFunction of (InputVertices b1) --> NAT,(the Sorts of b2) | InputVertices b1
   st commute b3 is constant & InputVertices b1 is not empty
for b4, b5 being Element of product the Sorts of b2 holds
(Computation(b4,b3)) . depth b2 = (Computation(b5,b3)) . depth b2;