File tree Expand file tree Collapse file tree 3 files changed +413
-0
lines changed
Expand file tree Collapse file tree 3 files changed +413
-0
lines changed Original file line number Diff line number Diff line change 1+ From HoTT Require Import WildCat.SetoidRewrite WildCat.Core WildCat.AbEnriched.
2+ From HoTT Require Import Basics.Overture.
3+
4+ Local Open Scope mc_add_scope.
5+
6+ (** Test that setoid rewriting works with the additive structure. *)
7+
8+ Definition test1 (A : Type ) `{IsAbGroup_0gpd A}
9+ {a b c d : A} (p : b $== c) (q : c $== d)
10+ : b + a $== d + a.
11+ Proof .
12+ rewrite p.
13+ rewrite <- q.
14+ reflexivity.
15+ Defined .
16+
17+ Definition test2 (A : Type ) `{IsAbGroup_0gpd A}
18+ {a b c d : A} (p : b $== c) (q : c $== d)
19+ : a + b $== a + d.
20+ Proof .
21+ rewrite p.
22+ rewrite <- q.
23+ reflexivity.
24+ Defined .
25+
26+ Definition test3 (A : Type ) `{IsAbGroup_0gpd A}
27+ {a b c d : A} (p : a $== c) (q : b $== d)
28+ : a - b $== c - d.
29+ Proof .
30+ rewrite p.
31+ rewrite <- q.
32+ reflexivity.
33+ Defined .
34+
35+ Definition test4 (A : Type ) `{IsAbGroup_0gpd A}
36+ {a b : A} (p : a $== b)
37+ : - a $== - b.
38+ Proof .
39+ rewrite p.
40+ reflexivity.
41+ Defined .
42+
43+ (** Test rewriting just on LHS of a sum. *)
44+ Definition test5 (A : Type ) `{IsAbGroup_0gpd A}
45+ {a b c : A} (p : a $== b)
46+ : a + c $== b + c.
47+ Proof .
48+ rewrite p.
49+ reflexivity.
50+ Defined .
51+
52+ (** Test rewriting just on RHS of a sum. *)
53+ Definition test6 (A : Type ) `{IsAbGroup_0gpd A}
54+ {a b c : A} (p : a $== b)
55+ : c + a $== c + b.
56+ Proof .
57+ rewrite p.
58+ reflexivity.
59+ Defined .
60+
61+ (** Test rewriting simultaneously on both sides of a sum. *)
62+ Definition test7 (A : Type ) `{IsAbGroup_0gpd A}
63+ {a b : A} (p : a $== b)
64+ : a + a $== b + b.
65+ Proof .
66+ rewrite p.
67+ reflexivity.
68+ Defined .
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Require Export WildCat.Coproducts.
1818Require Export WildCat.Displayed.
1919Require Export WildCat.DisplayedEquiv.
2020Require Export WildCat.Pullbacks.
21+ Require Export WildCat.AbEnriched.
2122
2223Require Export WildCat.SetoidRewrite.
2324
You can’t perform that action at this time.
0 commit comments