File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,59 @@ end;
186186
187187rule ($x × $y ) × $z ↪ $x × ($y × $z );
188188
189+ // Maximum
190+
191+ symbol ∨: ℕ → ℕ → ℕ;
192+
193+ notation ∨ infix left 40 ;
194+
195+ rule 0 ∨ $x ↪ $x
196+ with $x ∨ 0 ↪ $x
197+ with s $x ∨ s $y ↪ s ($x ∨ $y );
198+
199+ opaque symbol ∨_com x y : π (x ∨ y = y ∨ x ) ≔
200+ begin
201+ induction ;
202+ // case 0
203+ reflexivity ;
204+ // case s
205+ assume x h ;
206+ simplify ;
207+ induction ;
208+ reflexivity ;
209+ assume y i ;
210+ simplify ;
211+ rewrite h ;
212+ reflexivity ;
213+ end ;
214+
215+ opaque symbol ∨_assoc x y z : π ((x ∨ y ) ∨ z = x ∨ (y ∨ z )) ≔
216+ begin
217+ induction ;
218+ reflexivity ;
219+ assume x h ;
220+ induction ;
221+ reflexivity ;
222+ assume y i ;
223+ induction ;
224+ reflexivity ;
225+ assume z j ;
226+ simplify ;
227+ rewrite h ;
228+ reflexivity ;
229+ end ;
230+
231+ opaque symbol +_dist_ ∨ x y z : π (x + (y ∨ z ) = (x + y ) ∨ (x + z )) ≔
232+ begin
233+ induction ;
234+ reflexivity ;
235+ assume x h y z ;
236+ simplify ;
237+ apply feq s ;
238+ rewrite h ;
239+ reflexivity ;
240+ end ;
241+
189242// Order on ℕ
190243
191244constant symbol ≤ : ℕ → ℕ → Prop ; notation ≤ infix 10 ;
You can’t perform that action at this time.
0 commit comments