@@ -80,36 +80,63 @@ end dim
80
80
end finsupp
81
81
82
82
section vector_space
83
- universes u v
84
- variables {α : Type u} {β γ : Type v}
83
+ /- We use `universe variables` instead of `universes` here because universes introduced by the
84
+ `universes` keyword do not get replaced by metavariables once a lemma has been proven. So if you
85
+ prove a lemma using universe `u`, you can only apply it to universe `u` in other lemmas of the
86
+ same section. -/
87
+ universe variables u v w
88
+ variables {α : Type u} {β γ : Type v} {β' : Type v} {γ' : Type w}
85
89
variables [discrete_field α]
86
90
variables [add_comm_group β] [vector_space α β]
87
91
variables [add_comm_group γ] [vector_space α γ]
92
+ variables [add_comm_group β'] [vector_space α β']
93
+ variables [add_comm_group γ'] [vector_space α γ']
88
94
89
95
open vector_space
90
96
91
97
set_option class.instance_max_depth 70
92
98
93
- lemma equiv_of_dim_eq_dim [decidable_eq β] [decidable_eq γ] (h : dim α β = dim α γ) :
94
- nonempty (β ≃ₗ[α] γ) :=
99
+ lemma equiv_of_dim_eq_lift_dim
100
+ (h : cardinal.lift.{v w} (dim α β') = cardinal.lift.{w v} (dim α γ')) :
101
+ nonempty (β' ≃ₗ[α] γ') :=
95
102
begin
96
- rcases exists_is_basis α β with ⟨b, hb⟩,
97
- rcases exists_is_basis α γ with ⟨c, hc⟩,
98
- rw [← cardinal.lift_inj, ← hb.mk_eq_dim, ← hc.mk_eq_dim, cardinal.lift_inj] at h,
103
+ haveI := classical.dec_eq β',
104
+ haveI := classical.dec_eq γ',
105
+ rcases exists_is_basis α β' with ⟨b, hb⟩,
106
+ rcases exists_is_basis α γ' with ⟨c, hc⟩,
107
+ rw [←cardinal.lift_inj.1 hb.mk_eq_dim, ←cardinal.lift_inj.1 hc.mk_eq_dim] at h,
99
108
rcases quotient.exact h with ⟨e⟩,
109
+ let e := (equiv.ulift.symm.trans e).trans equiv.ulift,
100
110
exact ⟨((module_equiv_finsupp hb).trans
101
111
(finsupp.dom_lcongr e)).trans
102
112
(module_equiv_finsupp hc).symm⟩,
103
113
end
104
114
105
- lemma eq_bot_iff_dim_eq_zero [decidable_eq β] (p : submodule α β) (h : dim α p = 0 ) : p = ⊥ :=
115
+ def equiv_of_dim_eq_dim (h : dim α β = dim α γ) : β ≃ₗ[α] γ :=
116
+ begin
117
+ classical,
118
+ exact classical.choice (equiv_of_dim_eq_lift_dim (cardinal.lift_inj.2 h))
119
+ end
120
+
121
+ lemma fin_dim_vectorspace_equiv (n : ℕ)
122
+ (hn : (dim α β) = n) : β ≃ₗ[α] (fin n → α) :=
123
+ begin
124
+ have : cardinal.lift.{v u} (n : cardinal.{v}) = cardinal.lift.{u v} (n : cardinal.{u}),
125
+ by simp,
126
+ have hn := cardinal.lift_inj.{v u}.2 hn,
127
+ rw this at hn,
128
+ rw ←@dim_fin_fun α _ n at hn,
129
+ exact classical.choice (equiv_of_dim_eq_lift_dim hn),
130
+ end
131
+
132
+ lemma eq_bot_iff_dim_eq_zero (p : submodule α β) (h : dim α p = 0 ) : p = ⊥ :=
106
133
begin
107
134
have : dim α p = dim α (⊥ : submodule α β) := by rwa [dim_bot],
108
- rcases equiv_of_dim_eq_dim this with ⟨e⟩ ,
135
+ let e := equiv_of_dim_eq_dim this ,
109
136
exact e.eq_bot_of_equiv _
110
137
end
111
138
112
- lemma injective_of_surjective [decidable_eq β] [decidable_eq γ] (f : β →ₗ[α] γ)
139
+ lemma injective_of_surjective (f : β →ₗ[α] γ)
113
140
(hβ : dim α β < cardinal.omega) (heq : dim α γ = dim α β) (hf : f.range = ⊤) : f.ker = ⊥ :=
114
141
have hk : dim α f.ker < cardinal.omega := lt_of_le_of_lt (dim_submodule_le _) hβ,
115
142
begin
0 commit comments