reserve a,b,c for boolean object;
reserve p,q,r,s,A,B,C for Element of LTLB_WFF,
        F,G,X,Y for Subset of LTLB_WFF,
        i,j,k,n for Element of NAT,
        f,f1,f2,g for FinSequence of LTLB_WFF;
reserve M for LTLModel;

theorem
  (SAT M).[n,p 'R' q]=1 iff
  ((ex i st(SAT M).[n+i,p]=1 &
  for j st j<=i holds (SAT M).[n+j,q]=1) or
  for i holds (SAT M).[n+i,q]=1)
 proof
  set sm=SAT M,notp='not' p,notq='not' q;
  thus sm.[n,p 'R' q]=1 implies ((ex i st sm.[n+i,p]=1 & for j st j<=i holds sm
.[n+j,q]=1) or for i holds sm.[n+i,q]=1)
  proof
   defpred P[Nat] means
    (sm.[n+$1,q]=1 & sm.[n+$1,p]=0);
   assume sm.[n,p 'R' q]=1;
   then A1: sm.[n,('not' p)'Uw'('not' q)]=0 by Th5;
   A2: now let i be Nat;
    reconsider ii=i as Element of NAT by ORDINAL1:def 12;
    per cases by A1,Th12;
    suppose not sm.[n+ii,'not' q]=1;
     hence not sm.[n+i,'not' q]=1 or ex j be Nat st j<i & not sm.[n+j,'not'
p]=1;
    end;
    suppose ex j st j<i & not sm.[n+j,'not' p]=1;
     hence not sm.[n+i,'not' q]=1 or ex j be Nat st j<i & not sm.[n+j,'not'
p]=1;
    end;
   end;
   assume that
    A3: not(ex i st sm.[n+i,p]=1 & for j st j<=i holds sm.[n+j,q]=1) and
    A4: not(for i holds sm.[n+i,q]=1);
   A5: now let i be Nat;
    reconsider ii=i as Element of NAT by ORDINAL1:def 12;
    not sm.[n+ii,p]=1 or ex j st j<=ii & not sm.[n+j,q]=1 by A3;
    hence not sm.[n+i,p]=1 or ex j be Nat st j<=i & not sm.[n+j,q]=1;
   end;
   A6: for k being Nat st(for m being Nat st m<k holds P[m]) holds P[k]
   proof
    let k be Nat;
    assume A7: for m being Nat st m<k holds P[m];
     reconsider nk = n+k as Element of NAT by ORDINAL1:def 12;
    now assume ex j be Nat st j<k & not sm.[n+j,'not' p]=1;
     then consider j be Nat such that
      A8: j<k and
      A9: not sm.[n+j,'not' p]=1;
     reconsider nj = n+j as Element of NAT by ORDINAL1:def 12;
     not sm.[nj,p]=0 by A9,Th5;
     hence contradiction by A7,A8;
    end;
    then not sm.[n+k,'not' q]=1 by A2;
    then not sm.[nk,q]=0 by Th5;
    then A10: sm.[n+k,q]=1 by XBOOLEAN:def 3;
    now assume ex j be Nat st j<=k & not sm.[n+j,q]=1;
     then consider j be Nat such that
      A11: j<=k and
      A12: not sm.[n+j,q]=1;
     per cases;
     suppose j<k;
      hence contradiction by A7,A12;
     end;
     suppose not j<k;
      hence contradiction by A10,A11,A12,XXREAL_0:1;
     end;
    end;
    hence P[k] by XBOOLEAN:def 3,A5; ::,Th5,X4,A2;
   end;
   for i be Nat holds P[i] from NAT_1:sch 4(A6);
   hence contradiction by A4;
  end;
  thus((ex i st sm.[n+i,p]=1 & for j st j<=i holds sm.[n+j,q]=1) or for i holds
sm.[n+i,q]=1) implies sm.[n,p 'R' q]=1
  proof
   assume A13: (ex i st sm.[n+i,p]=1 & for j st j<=i holds sm.[n+j,q]=1) or for
i holds sm.[n+i,q]=1;
   assume not sm.[n,p 'R' q]=1;
   then A14: sm.[n,notp 'Uw' notq]=1 by XBOOLEAN:def 3,Th5;
   per cases by A13;
   suppose ex i st sm.[n+i,p]=1 & for j st j<=i holds sm.[n+j,q]=1;
    then consider i such that
     A15: sm.[n+i,p]=1 and
     A16: for j st j<=i holds sm.[n+j,q]=1;
    consider k such that
     A17: sm.[n+k,notq]=1 and
     A18: for j st j<k holds sm.[n+j,notp]=1 by A14,Th12;
    per cases;
    suppose k<=i;
     then sm.[n+k,q]=1 by A16;
     hence contradiction by A17,Th5;
    end;
    suppose not k<=i;
     then sm.[n+i,notp]=1 by A18;
     hence contradiction by A15,Th5;
    end;
   end;
   suppose A19: for i holds sm.[n+i,q]=1;
    consider i such that
     A20: sm.[n+i,notq]=1 and
     for j st j<i holds sm.[n+j,notp]=1 by A14,Th12;
    sm.[n+i,q]=0 by A20,Th5;
    hence contradiction by A19;
   end;
  end;
 end;
