You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
variables {ι : Type u} [has_zero ι] {A : ι → Type u}
31
+
32
+
defsimp_grade {r s : ι} (h: r = s) : A r → A s := by {subst h, exact id}
33
+
29
34
/-- objects are coercible only if they have the same grade-/
30
-
instancehas_coe(r s : ℕ) (h: r = s) : has_coe (A r) (A s) := { coe := by {subst h, exact id}}
35
+
instancehas_coe{r s : ι} (h: r = s) : has_coe (A r) (A s) := { coe := simp_grade h }
31
36
end graded_module_components
32
37
33
38
-- needed for the definition of `select`
34
39
attribute [instance] dfinsupp.to_semimodule
35
40
36
41
/-- Grade selection maps from objects in G to a finite set of components of substituent grades -/
37
42
classhas_grade_select
38
-
(A : ℤ → Type u) (G: Type u)
43
+
{ι : Type u} [has_zero ι]
44
+
(A : ι → Type u) (G: Type u)
39
45
[graded_module_components A]
40
46
[add_comm_group G]
47
+
[ring (A 0)]
41
48
[module (A 0) G] :=
42
-
(select : G →ₗ[A 0] (Π₀ r, A r))
49
+
(select : @linear_map (A 0) G (Π₀ r, A r) _ _ _ _ _)
43
50
44
51
/- TODO: check precedence -/
45
52
notation `⟨`:0 g`⟩_`:0 r:100 := has_grade_select.select g r
@@ -51,7 +58,8 @@ notation `⟨`:0 g`⟩_`:0 r:100 := has_grade_select.select g r
51
58
/-- A module divisible into disjoint graded modules, where the grade selectio
52
59
operator is a complete and independent set of projections -/
53
60
classgraded_module
54
-
(A : ℤ → Type u) (G: Type u)
61
+
{ι : Type v} [has_zero ι]
62
+
(A : ι → Type u) (G: Type u)
55
63
[graded_module_components A]
56
64
[add_comm_group G]
57
65
[module (A 0) G]
@@ -61,42 +69,42 @@ class graded_module
61
69
62
70
63
71
namespace graded_module
64
-
variables {A : ℤ → Type u} {G: Type u}
72
+
variables {ι : Type v} [has_zero ι] {A : ι → Type u} {G: Type u}
65
73
variables [graded_module_components A] [add_comm_group G] [module (A 0) G]
66
74
variables [graded_module A G]
67
75
68
76
/-- locally bind the notation above to our A and G-/
69
-
localnotation `⟨`:0 g`⟩_`:0 r:100 := @has_grade_select.select A G _ _ _ _ g r
77
+
localnotation `⟨`:0 g`⟩_`:0 r:100 := @has_grade_select.select ι A G _ _ _ _ g r
70
78
71
79
/-- convert from r-vectors to multi-vectors -/
72
-
instancehas_coe (r : ℤ) : has_coe (A r) G := { coe := to_fun }
80
+
instancehas_coe (r : ι) : has_coe (A r) G := { coe := to_fun }
73
81
74
82
@[simp]
75
-
lemmacoe_def {r : ℤ} (v : A r) : (v : G) = to_fun v := rfl
83
+
lemmacoe_def {r : ι} (v : A r) : (v : G) = to_fun v := rfl
76
84
77
85
/-- An r-vector has only a single grade
78
86
Discussed at https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Expressing.20a.20sum.20with.20finitely.20many.20nonzero.20terms/near/202657281-/
79
-
lemmaselect_coe_is_single {r : ℤ} (v : A r) : has_grade_select.select (v : G) = dfinsupp.single r v := begin
87
+
lemmaselect_coe_is_single {r : ι} (v : A r) : has_grade_select.select (v : G) = dfinsupp.single r v := begin
80
88
symmetry,
81
89
rw is_complete (v : G) (dfinsupp.single r v),
82
90
symmetry,
83
91
apply dfinsupp.sum_single_index,
84
92
exact linear_map.map_zero _,
85
93
end
86
94
87
-
defis_r_vector (r : ℤ) (a : G) := (⟨a⟩_r : G) = a
95
+
defis_r_vector (r : ι) (a : G) := (⟨a⟩_r : G) = a
88
96
89
97
/-- Chisholm 6a, ish.
90
98
This says A = ⟨A}_r for r-vectors.
91
99
Chisholm aditionally wants proof that A != ⟨A}_r for non-rvectors -/
92
-
lemmar_grade_of_coe {r : ℤ} (v : A r) : ⟨v⟩_r = v := begin
100
+
lemmar_grade_of_coe {r : ι} (v : A r) : ⟨v⟩_r = v := begin
93
101
rw select_coe_is_single,
94
102
rw dfinsupp.single_apply,
95
103
simp,
96
104
end
97
105
98
106
/-- to_fun is injective -/
99
-
lemmato_fun_inj (r : ℤ) : function.injective (to_fun : A r → G) := begin
107
+
lemmato_fun_inj (r : ι) : function.injective (to_fun : A r → G) := begin
100
108
intros a b h,
101
109
rw ← r_grade_of_coe a,
102
110
rw ← r_grade_of_coe b,
@@ -106,13 +114,13 @@ namespace graded_module
106
114
end
107
115
108
116
/-- Chisholm 6b -/
109
-
lemmagrade_of_sum (r : ℤ) (a b : G) : ⟨a + b⟩_r = ⟨a⟩_r + ⟨b⟩_r := by simp
117
+
lemmagrade_of_sum (r : ι) (a b : G) : ⟨a + b⟩_r = ⟨a⟩_r + ⟨b⟩_r := by simp
110
118
111
119
/-- Chisholm 6c -/
112
-
lemmagrade_smul (r : ℤ) (k : A 0) (a : G) : ⟨k • a⟩_r = k • ⟨a⟩_r := by simp
120
+
lemmagrade_smul (r : ι) (k : A 0) (a : G) : ⟨k • a⟩_r = k • ⟨a⟩_r := by simp
113
121
114
122
/-- chisholm 6d. Modifid to use `_s` instead of `_r` on the right, to keep the statement cast-free -/
115
-
lemmagrade_grade (r s : ℤ) (a : G) : ⟨⟨a⟩_r⟩_s = if r = s then ⟨a⟩_s else0
123
+
lemmagrade_grade (r s : ι) (a : G) : ⟨⟨a⟩_r⟩_s = if r = s then ⟨a⟩_s else0
0 commit comments