File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,18 @@ begin
132132 { assume n h ; apply ∨ᵢ₂; refine s ≠0 }
133133end ;
134134
135+ // predecessor
136+
137+ symbol -1 : ℕ → ℕ; notation -1 postfix 100 ;
138+
139+ rule 0 -1 ↪ 0
140+ with ($x +1 ) -1 ↪ $x ;
141+
142+ opaque symbol +1 _inj [x y ] : π (x +1 = y +1 ) → π (x = y ) ≔
143+ begin
144+ assume x y h ; apply feq (-1 ) h
145+ end ;
146+
135147// boolean equality on ℕ
136148
137149symbol eqn : ℕ → ℕ → 𝔹;
@@ -157,20 +169,8 @@ begin
157169 { assume y i ; rewrite left i ; apply ⊤ᵢ; }
158170 { simplify ; assume x h ; induction
159171 { assume i ; apply s ≠0 i ; }
160- { assume y i j ; simplify ; }
172+ { assume y i j ; simplify ; refine h y _; apply + 1 _ inj ; refine j }
161173 }
162- abort ;
163-
164- // predecessor
165-
166- symbol -1 : ℕ → ℕ; notation -1 postfix 100 ;
167-
168- rule 0 -1 ↪ 0
169- with ($x +1 ) -1 ↪ $x ;
170-
171- opaque symbol +1 _inj [x y ] : π (x +1 = y +1 ) → π (x = y ) ≔
172- begin
173- assume x y h ; apply feq (-1 ) h
174174end ;
175175
176176// addition
You can’t perform that action at this time.
0 commit comments