Article TRIANG_1, MML version 4.99.1005

:: TRIANG_1:sch 1
scheme TRIANG_1:sch 1
{F1 -> natural set}:
for b1 being Element of NAT
      st b1 <= F1()
   holds P1[b1]
provided
   P1[F1()]
and
   for b1 being Element of NAT
         st b1 < F1() & P1[b1 + 1]
      holds P1[b1];


:: TRIANG_1:funcreg 1
registration
  let a1 be natural set;
  cluster Seg (a1 + 1) -> non empty;
end;

:: TRIANG_1:funcreg 2
registration
  let a1 be non empty set;
  let a2 be reflexive antisymmetric transitive total Relation of a1,a1;
  cluster RelStr(#a1,a2#) -> non empty strict;
end;

:: TRIANG_1:th 1
theorem
for b1 being set holds
   {} |_2 b1 = {};

:: TRIANG_1:exreg 1
registration
  let a1 be set;
  cluster non empty Element of bool Fin a1;
end;

:: TRIANG_1:exreg 2
registration
  let a1 be non empty set;
  cluster non empty with_non-empty_elements Element of bool Fin a1;
end;

:: TRIANG_1:exreg 3
registration
  let a1 be non empty set;
  let a2 be non empty with_non-empty_elements Element of bool Fin a1;
  cluster non empty Element of a2;
end;

:: TRIANG_1:exreg 4
registration
  let a1 be non empty set;
  cluster with_non-empty_element Element of bool Fin a1;
end;

:: TRIANG_1:funcnot 1 => TRIANG_1:func 1
definition
  let a1 be non empty set;
  let a2 be reflexive antisymmetric transitive total Relation of a1,a1;
  let a3 be Element of bool a1;
  redefine func a2 |_2 a3 -> reflexive antisymmetric transitive total Relation of a3,a3;
end;

:: TRIANG_1:sch 2
scheme TRIANG_1:sch 2
{F1 -> set,
  F2 -> Element of bool F1()}:
P1[F2()]
provided
   F2() is finite
and
   P1[{} F1()]
and
   for b1 being Element of F1()
   for b2 being Element of bool F1()
         st b1 in F2() & b2 c= F2() & P1[b2]
      holds P1[b2 \/ {b1}];


:: TRIANG_1:th 2
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being Element of bool the carrier of b1
      st b2 is finite &
         b2 <> {} &
         (for b3, b4 being Element of the carrier of b1
               st b3 in b2 & b4 in b2 & not b3 <= b4
            holds b4 <= b3)
   holds ex b3 being Element of the carrier of b1 st
      b3 in b2 &
       (for b4 being Element of the carrier of b1
             st b4 in b2
          holds b3 <= b4);

:: TRIANG_1:exreg 5
registration
  let a1 be non empty set;
  let a2 be with_non-empty_element Element of bool Fin a1;
  cluster non empty finite Element of a2;
end;

:: TRIANG_1:funcreg 3
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2 be non empty finite Element of bool the carrier of a1;
  let a3 be Element of the carrier of a1;
  cluster InitSegm(a2,a3) -> finite;
end;

:: TRIANG_1:th 3
theorem
for b1, b2 being finite set
      st b1 c= b2 & card b1 = card b2
   holds b1 = b2;

:: TRIANG_1:funcnot 2 => TRIANG_1:func 2
definition
  let a1 be set;
  let a2 be finite Element of bool a1;
  let a3 be reflexive antisymmetric transitive total Relation of a1,a1;
  assume a3 linearly_orders a2;
  func SgmX(A3,A2) -> FinSequence of a1 means
    proj2 it = a2 &
     (for b1, b2 being natural set
           st b1 in dom it & b2 in dom it & b1 < b2
        holds it /. b1 <> it /. b2 & [it /. b1,it /. b2] in a3);
end;

:: TRIANG_1:def 2
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being reflexive antisymmetric transitive total Relation of b1,b1
   st b3 linearly_orders b2
for b4 being FinSequence of b1 holds
      b4 = SgmX(b3,b2)
   iff
      proj2 b4 = b2 &
       (for b5, b6 being natural set
             st b5 in dom b4 & b6 in dom b4 & b5 < b6
          holds b4 /. b5 <> b4 /. b6 & [b4 /. b5,b4 /. b6] in b3);

:: TRIANG_1:th 4
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being reflexive antisymmetric transitive total Relation of b1,b1
for b4 being FinSequence of b1
      st proj2 b4 = b2 &
         (for b5, b6 being natural set
               st b5 in dom b4 & b6 in dom b4 & b5 < b6
            holds b4 /. b5 <> b4 /. b6 & [b4 /. b5,b4 /. b6] in b3)
   holds b4 = SgmX(b3,b2);

:: TRIANG_1:funcnot 3 => TRIANG_1:func 3
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  func symplexes A1 -> Element of bool Fin the carrier of a1 equals
    {b1 where b1 is Element of Fin the carrier of a1: the InternalRel of a1 linearly_orders b1};
end;

:: TRIANG_1:def 3
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr holds
   symplexes b1 = {b2 where b2 is Element of Fin the carrier of b1: the InternalRel of b1 linearly_orders b2};

:: TRIANG_1:funcreg 4
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  cluster symplexes a1 -> with_non-empty_element;
end;

:: TRIANG_1:th 5
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being Element of the carrier of b1 holds
   {b2} in symplexes b1;

:: TRIANG_1:th 6
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr holds
   {} in symplexes b1;

:: TRIANG_1:th 7
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3 being set
      st b2 c= b3 & b3 in symplexes b1
   holds b2 in symplexes b1;

:: TRIANG_1:condreg 1
registration
  let a1 be set;
  let a2 be non empty Element of bool Fin a1;
  cluster -> finite (Element of a2);
end;

:: TRIANG_1:modenot 1 => TRIANG_1:mode 1
definition
  let a1 be set;
  let a2 be non empty Element of bool Fin a1;
  redefine mode Element of a2 -> Element of bool a1;
end;

:: TRIANG_1:th 8
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being reflexive antisymmetric transitive total Relation of b1,b1
      st b3 linearly_orders b2
   holds SgmX(b3,b2) is one-to-one;

:: TRIANG_1:th 9
theorem
for b1 being set
for b2 being finite Element of bool b1
for b3 being reflexive antisymmetric transitive total Relation of b1,b1
      st b3 linearly_orders b2
   holds len SgmX(b3,b2) = Card b2;

:: TRIANG_1:th 10
theorem
for b1 being Element of NAT
for b2 being non empty reflexive transitive antisymmetric RelStr
for b3 being non empty Element of symplexes b2
      st Card b3 = b1
   holds dom SgmX(the InternalRel of b2,b3) = Seg b1;

:: TRIANG_1:exreg 6
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  cluster non empty finite Element of symplexes a1;
end;

:: TRIANG_1:modenot 2
definition
  mode SetSequence is ManySortedSet of NAT;
end;

:: TRIANG_1:attrnot 1 => TRIANG_1:attr 1
definition
  let a1 be ManySortedSet of NAT;
  attr a1 is lower_non-empty means
    for b1 being natural set
       st a1 . b1 is not empty
    for b2 being natural set
          st b2 < b1
       holds a1 . b2 is not empty;
end;

:: TRIANG_1:dfs 3
definiens
  let a1 be ManySortedSet of NAT;
To prove
     a1 is lower_non-empty
it is sufficient to prove
  thus for b1 being natural set
       st a1 . b1 is not empty
    for b2 being natural set
          st b2 < b1
       holds a1 . b2 is not empty;

:: TRIANG_1:def 4
theorem
for b1 being ManySortedSet of NAT holds
      b1 is lower_non-empty
   iff
      for b2 being natural set
         st b1 . b2 is not empty
      for b3 being natural set
            st b3 < b2
         holds b1 . b3 is not empty;

:: TRIANG_1:exreg 7
registration
  cluster Relation-like Function-like lower_non-empty ManySortedSet of NAT;
end;

:: TRIANG_1:funcnot 4 => TRIANG_1:func 4
definition
  let a1 be ManySortedSet of NAT;
  func FuncsSeq A1 -> ManySortedSet of NAT means
    for b1 being natural set holds
       it . b1 = Funcs(a1 . (b1 + 1),a1 . b1);
end;

:: TRIANG_1:def 5
theorem
for b1, b2 being ManySortedSet of NAT holds
   b2 = FuncsSeq b1
iff
   for b3 being natural set holds
      b2 . b3 = Funcs(b1 . (b3 + 1),b1 . b3);

:: TRIANG_1:funcreg 5
registration
  let a1 be lower_non-empty ManySortedSet of NAT;
  let a2 be natural set;
  cluster (FuncsSeq a1) . a2 -> non empty;
end;

:: TRIANG_1:funcnot 5 => TRIANG_1:func 5
definition
  let a1 be natural set;
  let a2 be Element of Funcs(Seg a1,Seg (a1 + 1));
  func @ A2 -> FinSequence of REAL equals
    a2;
end;

:: TRIANG_1:def 6
theorem
for b1 being natural set
for b2 being Element of Funcs(Seg b1,Seg (b1 + 1)) holds
   @ b2 = b2;

:: TRIANG_1:funcnot 6 => TRIANG_1:func 6
definition
  func NatEmbSeq -> ManySortedSet of NAT means
    for b1 being natural set holds
       it . b1 = {b2 where b2 is Element of Funcs(Seg b1,Seg (b1 + 1)): @ b2 is increasing};
end;

:: TRIANG_1:def 7
theorem
for b1 being ManySortedSet of NAT holds
      b1 = NatEmbSeq
   iff
      for b2 being natural set holds
         b1 . b2 = {b3 where b3 is Element of Funcs(Seg b2,Seg (b2 + 1)): @ b3 is increasing};

:: TRIANG_1:funcreg 6
registration
  let a1 be natural set;
  cluster NatEmbSeq . a1 -> non empty;
end;

:: TRIANG_1:condreg 2
registration
  let a1 be natural set;
  cluster -> Relation-like Function-like (Element of NatEmbSeq . a1);
end;

:: TRIANG_1:modenot 3
definition
  let a1 be ManySortedSet of NAT;
  mode triangulation of a1 is ManySortedFunction of NatEmbSeq,FuncsSeq a1;
end;

:: TRIANG_1:structnot 1 => TRIANG_1:struct 1
definition
  struct() TriangStr(#
    SkeletonSeq -> ManySortedSet of NAT,
    FacesAssign -> ManySortedFunction of NatEmbSeq,FuncsSeq the SkeletonSeq of it
  #);
end;

:: TRIANG_1:attrnot 2 => TRIANG_1:attr 2
definition
  let a1 be TriangStr;
  attr a1 is strict;
end;

:: TRIANG_1:exreg 8
registration
  cluster strict TriangStr;
end;

:: TRIANG_1:aggrnot 1 => TRIANG_1:aggr 1
definition
  let a1 be ManySortedSet of NAT;
  let a2 be ManySortedFunction of NatEmbSeq,FuncsSeq a1;
  aggr TriangStr(#a1,a2#) -> strict TriangStr;
end;

:: TRIANG_1:selnot 1 => TRIANG_1:sel 1
definition
  let a1 be TriangStr;
  sel the SkeletonSeq of a1 -> ManySortedSet of NAT;
end;

:: TRIANG_1:selnot 2 => TRIANG_1:sel 2
definition
  let a1 be TriangStr;
  sel the FacesAssign of a1 -> ManySortedFunction of NatEmbSeq,FuncsSeq the SkeletonSeq of a1;
end;

:: TRIANG_1:attrnot 3 => TRIANG_1:attr 3
definition
  let a1 be TriangStr;
  attr a1 is lower_non-empty means
    the SkeletonSeq of a1 is lower_non-empty;
end;

:: TRIANG_1:dfs 7
definiens
  let a1 be TriangStr;
To prove
     a1 is lower_non-empty
it is sufficient to prove
  thus the SkeletonSeq of a1 is lower_non-empty;

:: TRIANG_1:def 9
theorem
for b1 being TriangStr holds
      b1 is lower_non-empty
   iff
      the SkeletonSeq of b1 is lower_non-empty;

:: TRIANG_1:exreg 9
registration
  cluster strict lower_non-empty TriangStr;
end;

:: TRIANG_1:funcreg 7
registration
  let a1 be lower_non-empty TriangStr;
  cluster the SkeletonSeq of a1 -> lower_non-empty;
end;

:: TRIANG_1:funcreg 8
registration
  let a1 be lower_non-empty ManySortedSet of NAT;
  let a2 be ManySortedFunction of NatEmbSeq,FuncsSeq a1;
  cluster TriangStr(#a1,a2#) -> strict lower_non-empty;
end;

:: TRIANG_1:modenot 4
definition
  let a1 be TriangStr;
  let a2 be natural set;
  mode Symplex of a1,a2 is Element of (the SkeletonSeq of a1) . a2;
end;

:: TRIANG_1:modenot 5
definition
  let a1 be natural set;
  mode Face of a1 is Element of NatEmbSeq . a1;
end;

:: TRIANG_1:funcnot 7 => TRIANG_1:func 7
definition
  let a1 be lower_non-empty TriangStr;
  let a2 be natural set;
  let a3 be Element of (the SkeletonSeq of a1) . (a2 + 1);
  let a4 be Element of NatEmbSeq . a2;
  assume (the SkeletonSeq of a1) . (a2 + 1) <> {};
  func face(A3,A4) -> Element of (the SkeletonSeq of a1) . a2 means
    for b1, b2 being Relation-like Function-like set
          st b1 = (the FacesAssign of a1) . a2 & b2 = b1 . a4
       holds it = b2 . a3;
end;

:: TRIANG_1:def 10
theorem
for b1 being lower_non-empty TriangStr
for b2 being natural set
for b3 being Element of (the SkeletonSeq of b1) . (b2 + 1)
for b4 being Element of NatEmbSeq . b2
   st (the SkeletonSeq of b1) . (b2 + 1) <> {}
for b5 being Element of (the SkeletonSeq of b1) . b2 holds
      b5 = face(b3,b4)
   iff
      for b6, b7 being Relation-like Function-like set
            st b6 = (the FacesAssign of b1) . b2 & b7 = b6 . b4
         holds b5 = b7 . b3;

:: TRIANG_1:funcnot 8 => TRIANG_1:func 8
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  func Triang A1 -> strict lower_non-empty TriangStr means
    (the SkeletonSeq of it) . 0 = {{}} &
     (for b1 being natural set
           st 0 < b1
        holds (the SkeletonSeq of it) . b1 = {SgmX(the InternalRel of a1,b2) where b2 is non empty Element of symplexes a1: Card b2 = b1}) &
     (for b1 being natural set
     for b2 being Element of NatEmbSeq . b1
     for b3 being Element of (the SkeletonSeq of it) . (b1 + 1)
        st b3 in (the SkeletonSeq of it) . (b1 + 1)
     for b4 being non empty Element of symplexes a1
           st SgmX(the InternalRel of a1,b4) = b3
        holds face(b3,b2) = b2 * SgmX(the InternalRel of a1,b4));
end;

:: TRIANG_1:def 11
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being strict lower_non-empty TriangStr holds
      b2 = Triang b1
   iff
      (the SkeletonSeq of b2) . 0 = {{}} &
       (for b3 being natural set
             st 0 < b3
          holds (the SkeletonSeq of b2) . b3 = {SgmX(the InternalRel of b1,b4) where b4 is non empty Element of symplexes b1: Card b4 = b3}) &
       (for b3 being natural set
       for b4 being Element of NatEmbSeq . b3
       for b5 being Element of (the SkeletonSeq of b2) . (b3 + 1)
          st b5 in (the SkeletonSeq of b2) . (b3 + 1)
       for b6 being non empty Element of symplexes b1
             st SgmX(the InternalRel of b1,b6) = b5
          holds face(b5,b4) = b4 * SgmX(the InternalRel of b1,b6));