let n be Element of NAT ; :: thesis: for X being Subset of CQC-WFF
for f, g being FinSequence of [:CQC-WFF,Proof_Step_Kinds:] st 1 <= n & n <= len f holds
( f,n is_a_correct_step_wrt X iff f ^ g,n is_a_correct_step_wrt X )

let X be Subset of CQC-WFF; :: thesis: for f, g being FinSequence of [:CQC-WFF,Proof_Step_Kinds:] st 1 <= n & n <= len f holds
( f,n is_a_correct_step_wrt X iff f ^ g,n is_a_correct_step_wrt X )

let f, g be FinSequence of [:CQC-WFF,Proof_Step_Kinds:]; :: thesis: ( 1 <= n & n <= len f implies ( f,n is_a_correct_step_wrt X iff f ^ g,n is_a_correct_step_wrt X ) )
assume that
A1: 1 <= n and
A2: n <= len f ; :: thesis: ( f,n is_a_correct_step_wrt X iff f ^ g,n is_a_correct_step_wrt X )
n in Seg (len f) by A1, A2, FINSEQ_1:3;
then n in dom f by FINSEQ_1:def 3;
then A5: (f ^ g) . n = f . n by FINSEQ_1:def 7;
len (f ^ g) = (len f) + (len g) by FINSEQ_1:35;
then len f <= len (f ^ g) by NAT_1:11;
then A8: n <= len (f ^ g) by A2, XXREAL_0:2;
thus ( f,n is_a_correct_step_wrt X implies f ^ g,n is_a_correct_step_wrt X ) :: thesis: ( f ^ g,n is_a_correct_step_wrt X implies f,n is_a_correct_step_wrt X )
proof
assume A9: f,n is_a_correct_step_wrt X ; :: thesis: f ^ g,n is_a_correct_step_wrt X
per cases ( ((f ^ g) . n) `2 = 0 or ((f ^ g) . n) `2 = 1 or ((f ^ g) . n) `2 = 2 or ((f ^ g) . n) `2 = 3 or ((f ^ g) . n) `2 = 4 or ((f ^ g) . n) `2 = 5 or ((f ^ g) . n) `2 = 6 or ((f ^ g) . n) `2 = 7 or ((f ^ g) . n) `2 = 8 or ((f ^ g) . n) `2 = 9 ) by A1, A8, Th45;
:: according to CQC_THE1:def 4
case ((f ^ g) . n) `2 = 0 ; :: thesis: ((f ^ g) . n) `1 in X
hence ((f ^ g) . n) `1 in X by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 1 ; :: thesis: ((f ^ g) . n) `1 = VERUM
hence ((f ^ g) . n) `1 = VERUM by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 2 ; :: thesis: ex p being Element of CQC-WFF st ((f ^ g) . n) `1 = (('not' p) => p) => p
hence ex p being Element of CQC-WFF st ((f ^ g) . n) `1 = (('not' p) => p) => p by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 3 ; :: thesis: ex p, q being Element of CQC-WFF st ((f ^ g) . n) `1 = p => (('not' p) => q)
hence ex p, q being Element of CQC-WFF st ((f ^ g) . n) `1 = p => (('not' p) => q) by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 4 ; :: thesis: ex p, q, r being Element of CQC-WFF st ((f ^ g) . n) `1 = (p => q) => (('not' (q '&' r)) => ('not' (p '&' r)))
hence ex p, q, r being Element of CQC-WFF st ((f ^ g) . n) `1 = (p => q) => (('not' (q '&' r)) => ('not' (p '&' r))) by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 5 ; :: thesis: ex p, q being Element of CQC-WFF st ((f ^ g) . n) `1 = (p '&' q) => (q '&' p)
hence ex p, q being Element of CQC-WFF st ((f ^ g) . n) `1 = (p '&' q) => (q '&' p) by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 6 ; :: thesis: ex p being Element of CQC-WFF ex x being bound_QC-variable st ((f ^ g) . n) `1 = (All (x,p)) => p
hence ex p being Element of CQC-WFF ex x being bound_QC-variable st ((f ^ g) . n) `1 = (All (x,p)) => p by A5, A9, Def4; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 7 ; :: thesis: ex i, j being Element of NAT ex p, q being Element of CQC-WFF st
( 1 <= i & i < n & 1 <= j & j < i & p = ((f ^ g) . j) `1 & q = ((f ^ g) . n) `1 & ((f ^ g) . i) `1 = p => q )

then consider i, j being Element of NAT , r, t being Element of CQC-WFF such that
A18: 1 <= i and
A19: i < n and
A20: 1 <= j and
A21: j < i and
A22: ( r = (f . j) `1 & t = (f . n) `1 & (f . i) `1 = r => t ) by A5, A9, Def4;
A23: i <= len f by A2, A19, XXREAL_0:2;
then A24: j <= len f by A21, XXREAL_0:2;
A25: i in Seg (len f) by A18, A23, FINSEQ_1:3;
A26: j in Seg (len f) by A20, A24, FINSEQ_1:3;
A27: i in dom f by A25, FINSEQ_1:def 3;
A28: j in dom f by A26, FINSEQ_1:def 3;
A29: f . i = (f ^ g) . i by A27, FINSEQ_1:def 7;
f . j = (f ^ g) . j by A28, FINSEQ_1:def 7;
hence ex i, j being Element of NAT ex p, q being Element of CQC-WFF st
( 1 <= i & i < n & 1 <= j & j < i & p = ((f ^ g) . j) `1 & q = ((f ^ g) . n) `1 & ((f ^ g) . i) `1 = p => q ) by A5, A18, A19, A20, A21, A22, A29; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 8 ; :: thesis: ex i being Element of NAT ex p, q being Element of CQC-WFF ex x being bound_QC-variable st
( 1 <= i & i < n & ((f ^ g) . i) `1 = p => q & not x in still_not-bound_in p & ((f ^ g) . n) `1 = p => (All (x,q)) )

then consider i being Element of NAT , r, t being Element of CQC-WFF , x being bound_QC-variable such that
A32: 1 <= i and
A33: i < n and
A34: ( (f . i) `1 = r => t & not x in still_not-bound_in r & (f . n) `1 = r => (All (x,t)) ) by A5, A9, Def4;
i <= len f by A2, A33, XXREAL_0:2;
then i in Seg (len f) by A32, FINSEQ_1:3;
then i in dom f by FINSEQ_1:def 3;
then f . i = (f ^ g) . i by FINSEQ_1:def 7;
hence ex i being Element of NAT ex p, q being Element of CQC-WFF ex x being bound_QC-variable st
( 1 <= i & i < n & ((f ^ g) . i) `1 = p => q & not x in still_not-bound_in p & ((f ^ g) . n) `1 = p => (All (x,q)) ) by A5, A32, A33, A34; :: thesis: verum
end;
case ((f ^ g) . n) `2 = 9 ; :: thesis: ex i being Element of NAT ex x, y being bound_QC-variable ex s being QC-formula st
( 1 <= i & i < n & s . x in CQC-WFF & s . y in CQC-WFF & not x in still_not-bound_in s & s . x = ((f ^ g) . i) `1 & s . y = ((f ^ g) . n) `1 )

then consider i being Element of NAT , x, y being bound_QC-variable, s being QC-formula such that
A40: 1 <= i and
A41: i < n and
A42: ( s . x in CQC-WFF & s . y in CQC-WFF & not x in still_not-bound_in s & s . x = (f . i) `1 & (f . n) `1 = s . y ) by A5, A9, Def4;
i <= len f by A2, A41, XXREAL_0:2;
then i in Seg (len f) by A40, FINSEQ_1:3;
then i in dom f by FINSEQ_1:def 3;
then f . i = (f ^ g) . i by FINSEQ_1:def 7;
hence ex i being Element of NAT ex x, y being bound_QC-variable ex s being QC-formula st
( 1 <= i & i < n & s . x in CQC-WFF & s . y in CQC-WFF & not x in still_not-bound_in s & s . x = ((f ^ g) . i) `1 & s . y = ((f ^ g) . n) `1 ) by A5, A40, A41, A42; :: thesis: verum
end;
end;
end;
assume A47: f ^ g,n is_a_correct_step_wrt X ; :: thesis: f,n is_a_correct_step_wrt X
per cases ( (f . n) `2 = 0 or (f . n) `2 = 1 or (f . n) `2 = 2 or (f . n) `2 = 3 or (f . n) `2 = 4 or (f . n) `2 = 5 or (f . n) `2 = 6 or (f . n) `2 = 7 or (f . n) `2 = 8 or (f . n) `2 = 9 ) by A1, A2, Th45;
:: according to CQC_THE1:def 4
case (f . n) `2 = 0 ; :: thesis: (f . n) `1 in X
hence (f . n) `1 in X by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 1 ; :: thesis: (f . n) `1 = VERUM
hence (f . n) `1 = VERUM by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 2 ; :: thesis: ex p being Element of CQC-WFF st (f . n) `1 = (('not' p) => p) => p
hence ex p being Element of CQC-WFF st (f . n) `1 = (('not' p) => p) => p by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 3 ; :: thesis: ex p, q being Element of CQC-WFF st (f . n) `1 = p => (('not' p) => q)
hence ex p, q being Element of CQC-WFF st (f . n) `1 = p => (('not' p) => q) by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 4 ; :: thesis: ex p, q, r being Element of CQC-WFF st (f . n) `1 = (p => q) => (('not' (q '&' r)) => ('not' (p '&' r)))
hence ex p, q, r being Element of CQC-WFF st (f . n) `1 = (p => q) => (('not' (q '&' r)) => ('not' (p '&' r))) by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 5 ; :: thesis: ex p, q being Element of CQC-WFF st (f . n) `1 = (p '&' q) => (q '&' p)
hence ex p, q being Element of CQC-WFF st (f . n) `1 = (p '&' q) => (q '&' p) by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 6 ; :: thesis: ex p being Element of CQC-WFF ex x being bound_QC-variable st (f . n) `1 = (All (x,p)) => p
hence ex p being Element of CQC-WFF ex x being bound_QC-variable st (f . n) `1 = (All (x,p)) => p by A5, A47, Def4; :: thesis: verum
end;
case (f . n) `2 = 7 ; :: thesis: ex i, j being Element of NAT ex p, q being Element of CQC-WFF st
( 1 <= i & i < n & 1 <= j & j < i & p = (f . j) `1 & q = (f . n) `1 & (f . i) `1 = p => q )

then consider i, j being Element of NAT , r, t being Element of CQC-WFF such that
A56: 1 <= i and
A57: i < n and
A58: 1 <= j and
A59: j < i and
A60: ( r = ((f ^ g) . j) `1 & t = ((f ^ g) . n) `1 & ((f ^ g) . i) `1 = r => t ) by A5, A47, Def4;
A61: i <= len f by A2, A57, XXREAL_0:2;
then A62: j <= len f by A59, XXREAL_0:2;
A63: i in Seg (len f) by A56, A61, FINSEQ_1:3;
A64: j in Seg (len f) by A58, A62, FINSEQ_1:3;
A65: i in dom f by A63, FINSEQ_1:def 3;
A66: j in dom f by A64, FINSEQ_1:def 3;
A67: f . i = (f ^ g) . i by A65, FINSEQ_1:def 7;
f . j = (f ^ g) . j by A66, FINSEQ_1:def 7;
hence ex i, j being Element of NAT ex p, q being Element of CQC-WFF st
( 1 <= i & i < n & 1 <= j & j < i & p = (f . j) `1 & q = (f . n) `1 & (f . i) `1 = p => q ) by A5, A56, A57, A58, A59, A60, A67; :: thesis: verum
end;
case (f . n) `2 = 8 ; :: thesis: ex i being Element of NAT ex p, q being Element of CQC-WFF ex x being bound_QC-variable st
( 1 <= i & i < n & (f . i) `1 = p => q & not x in still_not-bound_in p & (f . n) `1 = p => (All (x,q)) )

then consider i being Element of NAT , r, t being Element of CQC-WFF , x being bound_QC-variable such that
A70: 1 <= i and
A71: i < n and
A72: ( ((f ^ g) . i) `1 = r => t & not x in still_not-bound_in r & ((f ^ g) . n) `1 = r => (All (x,t)) ) by A5, A47, Def4;
i <= len f by A2, A71, XXREAL_0:2;
then i in Seg (len f) by A70, FINSEQ_1:3;
then i in dom f by FINSEQ_1:def 3;
then f . i = (f ^ g) . i by FINSEQ_1:def 7;
hence ex i being Element of NAT ex p, q being Element of CQC-WFF ex x being bound_QC-variable st
( 1 <= i & i < n & (f . i) `1 = p => q & not x in still_not-bound_in p & (f . n) `1 = p => (All (x,q)) ) by A5, A70, A71, A72; :: thesis: verum
end;
case (f . n) `2 = 9 ; :: thesis: ex i being Element of NAT ex x, y being bound_QC-variable ex s being QC-formula st
( 1 <= i & i < n & s . x in CQC-WFF & s . y in CQC-WFF & not x in still_not-bound_in s & s . x = (f . i) `1 & s . y = (f . n) `1 )

then consider i being Element of NAT , x, y being bound_QC-variable, s being QC-formula such that
A78: 1 <= i and
A79: i < n and
A80: ( s . x in CQC-WFF & s . y in CQC-WFF & not x in still_not-bound_in s & s . x = ((f ^ g) . i) `1 & ((f ^ g) . n) `1 = s . y ) by A5, A47, Def4;
i <= len f by A2, A79, XXREAL_0:2;
then i in Seg (len f) by A78, FINSEQ_1:3;
then i in dom f by FINSEQ_1:def 3;
then f . i = (f ^ g) . i by FINSEQ_1:def 7;
hence ex i being Element of NAT ex x, y being bound_QC-variable ex s being QC-formula st
( 1 <= i & i < n & s . x in CQC-WFF & s . y in CQC-WFF & not x in still_not-bound_in s & s . x = (f . i) `1 & s . y = (f . n) `1 ) by A5, A78, A79, A80; :: thesis: verum
end;
end;