Metamath Proof Explorer


Theorem madjusmdetlem2

Description: Lemma for madjusmdet . (Contributed by Thierry Arnoux, 26-Aug-2020)

Ref Expression
Hypotheses madjusmdet.b B = Base A
madjusmdet.a A = 1 N Mat R
madjusmdet.d D = 1 N maDet R
madjusmdet.k K = 1 N maAdju R
madjusmdet.t · ˙ = R
madjusmdet.z Z = ℤRHom R
madjusmdet.e E = 1 N 1 maDet R
madjusmdet.n φ N
madjusmdet.r φ R CRing
madjusmdet.i φ I 1 N
madjusmdet.j φ J 1 N
madjusmdet.m φ M B
madjusmdetlem2.p P = i 1 N if i = 1 I if i I i 1 i
madjusmdetlem2.s S = i 1 N if i = 1 N if i N i 1 i
Assertion madjusmdetlem2 φ X 1 N 1 if X < I X X + 1 = P S -1 X

Proof

Step Hyp Ref Expression
1 madjusmdet.b B = Base A
2 madjusmdet.a A = 1 N Mat R
3 madjusmdet.d D = 1 N maDet R
4 madjusmdet.k K = 1 N maAdju R
5 madjusmdet.t · ˙ = R
6 madjusmdet.z Z = ℤRHom R
7 madjusmdet.e E = 1 N 1 maDet R
8 madjusmdet.n φ N
9 madjusmdet.r φ R CRing
10 madjusmdet.i φ I 1 N
11 madjusmdet.j φ J 1 N
12 madjusmdet.m φ M B
13 madjusmdetlem2.p P = i 1 N if i = 1 I if i I i 1 i
14 madjusmdetlem2.s S = i 1 N if i = 1 N if i N i 1 i
15 nnuz = 1
16 8 15 eleqtrdi φ N 1
17 eluzfz2 N 1 N 1 N
18 16 17 syl φ N 1 N
19 eqid 1 N = 1 N
20 eqid SymGrp 1 N = SymGrp 1 N
21 eqid Base SymGrp 1 N = Base SymGrp 1 N
22 19 14 20 21 fzto1st N 1 N S Base SymGrp 1 N
23 18 22 syl φ S Base SymGrp 1 N
24 20 21 symgbasf1o S Base SymGrp 1 N S : 1 N 1-1 onto 1 N
25 23 24 syl φ S : 1 N 1-1 onto 1 N
26 25 adantr φ X 1 N 1 S : 1 N 1-1 onto 1 N
27 fznatpl1 N X 1 N 1 X + 1 1 N
28 8 27 sylan φ X 1 N 1 X + 1 1 N
29 eqeq1 i = x i = 1 x = 1
30 breq1 i = x i N x N
31 oveq1 i = x i 1 = x 1
32 id i = x i = x
33 30 31 32 ifbieq12d i = x if i N i 1 i = if x N x 1 x
34 29 33 ifbieq2d i = x if i = 1 N if i N i 1 i = if x = 1 N if x N x 1 x
35 34 cbvmptv i 1 N if i = 1 N if i N i 1 i = x 1 N if x = 1 N if x N x 1 x
36 14 35 eqtri S = x 1 N if x = 1 N if x N x 1 x
37 36 a1i φ X 1 N 1 S = x 1 N if x = 1 N if x N x 1 x
38 simpr φ X 1 N 1 x = X + 1 x = X + 1
39 1red φ X 1 N 1 x = X + 1 1
40 fz1ssnn 1 N 1
41 simpr φ X 1 N 1 X 1 N 1
42 40 41 sselid φ X 1 N 1 X
43 42 nnrpd φ X 1 N 1 X +
44 43 adantr φ X 1 N 1 x = X + 1 X +
45 39 44 ltaddrp2d φ X 1 N 1 x = X + 1 1 < X + 1
46 39 45 ltned φ X 1 N 1 x = X + 1 1 X + 1
47 46 necomd φ X 1 N 1 x = X + 1 X + 1 1
48 38 47 eqnetrd φ X 1 N 1 x = X + 1 x 1
49 48 neneqd φ X 1 N 1 x = X + 1 ¬ x = 1
50 49 iffalsed φ X 1 N 1 x = X + 1 if x = 1 N if x N x 1 x = if x N x 1 x
51 8 adantr φ X 1 N 1 N
52 42 nnnn0d φ X 1 N 1 X 0
53 51 nnnn0d φ X 1 N 1 N 0
54 elfzle2 X 1 N 1 X N 1
55 41 54 syl φ X 1 N 1 X N 1
56 nn0ltlem1 X 0 N 0 X < N X N 1
57 56 biimpar X 0 N 0 X N 1 X < N
58 52 53 55 57 syl21anc φ X 1 N 1 X < N
59 nnltp1le X N X < N X + 1 N
60 59 biimpa X N X < N X + 1 N
61 42 51 58 60 syl21anc φ X 1 N 1 X + 1 N
62 61 adantr φ X 1 N 1 x = X + 1 X + 1 N
63 38 62 eqbrtrd φ X 1 N 1 x = X + 1 x N
64 63 iftrued φ X 1 N 1 x = X + 1 if x N x 1 x = x 1
65 38 oveq1d φ X 1 N 1 x = X + 1 x 1 = X + 1 - 1
66 42 nncnd φ X 1 N 1 X
67 1cnd φ X 1 N 1 1
68 66 67 pncand φ X 1 N 1 X + 1 - 1 = X
69 68 adantr φ X 1 N 1 x = X + 1 X + 1 - 1 = X
70 65 69 eqtrd φ X 1 N 1 x = X + 1 x 1 = X
71 50 64 70 3eqtrd φ X 1 N 1 x = X + 1 if x = 1 N if x N x 1 x = X
72 37 71 28 41 fvmptd φ X 1 N 1 S X + 1 = X
73 72 idi φ X 1 N 1 S X + 1 = X
74 f1ocnvfv S : 1 N 1-1 onto 1 N X + 1 1 N S X + 1 = X S -1 X = X + 1
75 74 imp S : 1 N 1-1 onto 1 N X + 1 1 N S X + 1 = X S -1 X = X + 1
76 26 28 73 75 syl21anc φ X 1 N 1 S -1 X = X + 1
77 76 fveq2d φ X 1 N 1 P S -1 X = P X + 1
78 77 adantr φ X 1 N 1 X < I P S -1 X = P X + 1
79 32 breq1d i = x i I x I
80 79 31 32 ifbieq12d i = x if i I i 1 i = if x I x 1 x
81 29 80 ifbieq2d i = x if i = 1 I if i I i 1 i = if x = 1 I if x I x 1 x
82 81 cbvmptv i 1 N if i = 1 I if i I i 1 i = x 1 N if x = 1 I if x I x 1 x
83 13 82 eqtri P = x 1 N if x = 1 I if x I x 1 x
84 83 a1i φ X 1 N 1 X < I P = x 1 N if x = 1 I if x I x 1 x
85 45 38 breqtrrd φ X 1 N 1 x = X + 1 1 < x
86 39 85 ltned φ X 1 N 1 x = X + 1 1 x
87 86 necomd φ X 1 N 1 x = X + 1 x 1
88 87 neneqd φ X 1 N 1 x = X + 1 ¬ x = 1
89 88 iffalsed φ X 1 N 1 x = X + 1 if x = 1 I if x I x 1 x = if x I x 1 x
90 89 adantlr φ X 1 N 1 X < I x = X + 1 if x = 1 I if x I x 1 x = if x I x 1 x
91 simpr φ X 1 N 1 X < I x = X + 1 x = X + 1
92 42 ad2antrr φ X 1 N 1 X < I x = X + 1 X
93 fz1ssnn 1 N
94 93 10 sselid φ I
95 94 ad3antrrr φ X 1 N 1 X < I x = X + 1 I
96 simplr φ X 1 N 1 X < I x = X + 1 X < I
97 nnltp1le X I X < I X + 1 I
98 97 biimpa X I X < I X + 1 I
99 92 95 96 98 syl21anc φ X 1 N 1 X < I x = X + 1 X + 1 I
100 91 99 eqbrtrd φ X 1 N 1 X < I x = X + 1 x I
101 100 iftrued φ X 1 N 1 X < I x = X + 1 if x I x 1 x = x 1
102 70 adantlr φ X 1 N 1 X < I x = X + 1 x 1 = X
103 90 101 102 3eqtrd φ X 1 N 1 X < I x = X + 1 if x = 1 I if x I x 1 x = X
104 28 adantr φ X 1 N 1 X < I X + 1 1 N
105 simplr φ X 1 N 1 X < I X 1 N 1
106 84 103 104 105 fvmptd φ X 1 N 1 X < I P X + 1 = X
107 78 106 eqtr2d φ X 1 N 1 X < I X = P S -1 X
108 77 adantr φ X 1 N 1 ¬ X < I P S -1 X = P X + 1
109 83 a1i φ X 1 N 1 ¬ X < I P = x 1 N if x = 1 I if x I x 1 x
110 89 adantlr φ X 1 N 1 ¬ X < I x = X + 1 if x = 1 I if x I x 1 x = if x I x 1 x
111 42 ad2antrr φ X 1 N 1 x = X + 1 x I X
112 94 ad3antrrr φ X 1 N 1 x = X + 1 x I I
113 38 adantr φ X 1 N 1 x = X + 1 x I x = X + 1
114 simpr φ X 1 N 1 x = X + 1 x I x I
115 113 114 eqbrtrrd φ X 1 N 1 x = X + 1 x I X + 1 I
116 97 biimpar X I X + 1 I X < I
117 111 112 115 116 syl21anc φ X 1 N 1 x = X + 1 x I X < I
118 117 ex φ X 1 N 1 x = X + 1 x I X < I
119 118 con3d φ X 1 N 1 x = X + 1 ¬ X < I ¬ x I
120 119 imp φ X 1 N 1 x = X + 1 ¬ X < I ¬ x I
121 120 an32s φ X 1 N 1 ¬ X < I x = X + 1 ¬ x I
122 121 iffalsed φ X 1 N 1 ¬ X < I x = X + 1 if x I x 1 x = x
123 simpr φ X 1 N 1 ¬ X < I x = X + 1 x = X + 1
124 122 123 eqtrd φ X 1 N 1 ¬ X < I x = X + 1 if x I x 1 x = X + 1
125 110 124 eqtrd φ X 1 N 1 ¬ X < I x = X + 1 if x = 1 I if x I x 1 x = X + 1
126 28 adantr φ X 1 N 1 ¬ X < I X + 1 1 N
127 109 125 126 126 fvmptd φ X 1 N 1 ¬ X < I P X + 1 = X + 1
128 108 127 eqtr2d φ X 1 N 1 ¬ X < I X + 1 = P S -1 X
129 107 128 ifeqda φ X 1 N 1 if X < I X X + 1 = P S -1 X
130 f1ocnv S : 1 N 1-1 onto 1 N S -1 : 1 N 1-1 onto 1 N
131 23 24 130 3syl φ S -1 : 1 N 1-1 onto 1 N
132 f1ofun S -1 : 1 N 1-1 onto 1 N Fun S -1
133 131 132 syl φ Fun S -1
134 133 adantr φ X 1 N 1 Fun S -1
135 fzdif2 N 1 1 N N = 1 N 1
136 16 135 syl φ 1 N N = 1 N 1
137 difss 1 N N 1 N
138 136 137 eqsstrrdi φ 1 N 1 1 N
139 f1odm S -1 : 1 N 1-1 onto 1 N dom S -1 = 1 N
140 131 139 syl φ dom S -1 = 1 N
141 138 140 sseqtrrd φ 1 N 1 dom S -1
142 141 adantr φ X 1 N 1 1 N 1 dom S -1
143 142 41 sseldd φ X 1 N 1 X dom S -1
144 fvco Fun S -1 X dom S -1 P S -1 X = P S -1 X
145 134 143 144 syl2anc φ X 1 N 1 P S -1 X = P S -1 X
146 129 145 eqtr4d φ X 1 N 1 if X < I X X + 1 = P S -1 X