Skip to content

Commit 7f8c051

Browse files
authored
finish the proof of eqn (#19)
1 parent f181b9b commit 7f8c051

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Nat.lp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ begin
132132
{ assume n h; apply ∨ᵢ₂; refine s0 }
133133
end;
134134

135+
// predecessor
136+
137+
symbol -1 : ℕ → ℕ; notation -1 postfix 100;
138+
139+
rule 0 -10
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

137149
symbol eqn : ℕ → ℕ → 𝔹;
@@ -157,20 +169,8 @@ begin
157169
{ assume y i; rewrite left i; apply ⊤ᵢ; }
158170
{ simplify; assume x h; induction
159171
{ assume i; apply s0 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 -10
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
174174
end;
175175

176176
// addition

0 commit comments

Comments
 (0)