fact stringlengths 6 3.84k | type stringclasses 11 values | library stringclasses 32 values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
add_apply (f g : E →ₗ.[R] F) (x : (f.domain ⊓ g.domain : Submodule R E)) :
(f + g) x = f ⟨x, x.prop.1⟩ + g ⟨x, x.prop.2⟩ := rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | add_apply | null |
instAddSemigroup : AddSemigroup (E →ₗ.[R] F) :=
⟨fun f g h => by
ext x y hxy
· simp only [add_domain, inf_assoc]
· simp only [add_apply, add_assoc]⟩ | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instAddSemigroup | null |
instAddZeroClass : AddZeroClass (E →ₗ.[R] F) where
zero_add := fun f => by
ext x y hxy
· simp [add_domain]
· simp [add_apply]
add_zero := fun f => by
ext x y hxy
· simp [add_domain]
· simp [add_apply] | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instAddZeroClass | null |
instAddMonoid : AddMonoid (E →ₗ.[R] F) where
zero_add f := by
simp
add_zero := by
simp
nsmul := nsmulRec | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instAddMonoid | null |
instAddCommMonoid : AddCommMonoid (E →ₗ.[R] F) :=
⟨fun f g => by
ext x y hxy
· simp only [add_domain, inf_comm]
· simp only [add_apply, add_comm]⟩ | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instAddCommMonoid | null |
instVAdd : VAdd (E →ₗ[R] F) (E →ₗ.[R] F) :=
⟨fun f g =>
{ domain := g.domain
toFun := f.comp g.domain.subtype + g.toFun }⟩
@[simp] | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instVAdd | null |
vadd_domain (f : E →ₗ[R] F) (g : E →ₗ.[R] F) : (f +ᵥ g).domain = g.domain :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | vadd_domain | null |
vadd_apply (f : E →ₗ[R] F) (g : E →ₗ.[R] F) (x : (f +ᵥ g).domain) :
(f +ᵥ g) x = f x + g x :=
rfl
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | vadd_apply | null |
coe_vadd (f : E →ₗ[R] F) (g : E →ₗ.[R] F) : ⇑(f +ᵥ g) = ⇑(f.comp g.domain.subtype) + ⇑g :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | coe_vadd | null |
instAddAction : AddAction (E →ₗ[R] F) (E →ₗ.[R] F) where
vadd := (· +ᵥ ·)
zero_vadd := fun ⟨_s, _f⟩ => ext' <| zero_add _
add_vadd := fun _f₁ _f₂ ⟨_s, _g⟩ => ext' <| LinearMap.ext fun _x => add_assoc _ _ _ | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instAddAction | null |
instSub : Sub (E →ₗ.[R] F) :=
⟨fun f g =>
{ domain := f.domain ⊓ g.domain
toFun := f.toFun.comp (inclusion (inf_le_left : f.domain ⊓ g.domain ≤ _))
- g.toFun.comp (inclusion (inf_le_right : f.domain ⊓ g.domain ≤ _)) }⟩ | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instSub | null |
sub_domain (f g : E →ₗ.[R] F) : (f - g).domain = f.domain ⊓ g.domain := rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | sub_domain | null |
sub_apply (f g : E →ₗ.[R] F) (x : (f.domain ⊓ g.domain : Submodule R E)) :
(f - g) x = f ⟨x, x.prop.1⟩ - g ⟨x, x.prop.2⟩ := rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | sub_apply | null |
instSubtractionCommMonoid : SubtractionCommMonoid (E →ₗ.[R] F) where
add_comm := add_comm
sub_eq_add_neg f g := by
ext x _ h
· rfl
simp [sub_apply, add_apply, neg_apply, ← sub_eq_add_neg]
neg_neg := neg_neg
neg_add_rev f g := by
ext x _ h
· simp [add_domain, neg_domain, And.comm]
simp [add_apply, neg_apply, ← sub_eq_add_neg]
neg_eq_of_add f g h' := by
ext x hf hg
· have : (0 : E →ₗ.[R] F).domain = ⊤ := zero_domain
simp only [← h', add_domain, inf_eq_top_iff] at this
rw [neg_domain, this.1, this.2]
simp only [neg_domain, neg_apply, neg_eq_iff_add_eq_zero]
rw [ext_iff] at h'
rcases h' with ⟨hdom, h'⟩
rw [zero_domain] at hdom
simp only [hdom, zero_domain, mem_top, zero_apply, forall_true_left] at h'
apply h'
zsmul := zsmulRec | instance | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | instSubtractionCommMonoid | null |
noncomputable supSpanSingleton (f : E →ₗ.[K] F) (x : E) (y : F) (hx : x ∉ f.domain) :
E →ₗ.[K] F :=
f.sup (mkSpanSingleton x y fun h₀ => hx <| h₀.symm ▸ f.domain.zero_mem) <|
sup_h_of_disjoint _ _ <| by simpa [disjoint_span_singleton] using fun h ↦ False.elim <| hx h
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | supSpanSingleton | Extend a `LinearPMap` to `f.domain ⊔ K ∙ x`. |
domain_supSpanSingleton (f : E →ₗ.[K] F) (x : E) (y : F) (hx : x ∉ f.domain) :
(f.supSpanSingleton x y hx).domain = f.domain ⊔ K ∙ x :=
rfl
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | domain_supSpanSingleton | null |
supSpanSingleton_apply_mk (f : E →ₗ.[K] F) (x : E) (y : F) (hx : x ∉ f.domain) (x' : E)
(hx' : x' ∈ f.domain) (c : K) :
f.supSpanSingleton x y hx
⟨x' + c • x, mem_sup.2 ⟨x', hx', _, mem_span_singleton.2 ⟨c, rfl⟩, rfl⟩⟩ =
f ⟨x', hx'⟩ + c • y := by
unfold supSpanSingleton
rw [sup_apply _ ⟨x', hx'⟩ ⟨c • x, _⟩, mkSpanSingleton'_apply]
· rfl
· exact mem_span_singleton.2 ⟨c, rfl⟩
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | supSpanSingleton_apply_mk | null |
supSpanSingleton_apply_smul_self (f : E →ₗ.[K] F) {x : E} (y : F) (hx : x ∉ f.domain)
(c : K) :
f.supSpanSingleton x y hx ⟨c • x, mem_sup_right <| mem_span_singleton.2 ⟨c, rfl⟩⟩ = c • y := by
simpa [(mk_eq_zero _ _).mpr rfl] using supSpanSingleton_apply_mk f x y hx 0 (zero_mem _) c
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | supSpanSingleton_apply_smul_self | null |
supSpanSingleton_apply_self (f : E →ₗ.[K] F) {x : E} (y : F) (hx : x ∉ f.domain) :
f.supSpanSingleton x y hx ⟨x, mem_sup_right <| mem_span_singleton_self _⟩ = y := by
simpa using supSpanSingleton_apply_smul_self f y hx 1 | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | supSpanSingleton_apply_self | null |
supSpanSingleton_apply_of_mem (f : E →ₗ.[K] F) {x : E} (y : F) (hx : x ∉ f.domain)
(x' : (f.supSpanSingleton x y hx).domain) (hx' : (x' : E) ∈ f.domain) :
f.supSpanSingleton x y hx x' = f ⟨x', hx'⟩ := by
simpa using supSpanSingleton_apply_mk f x y hx x' hx' 0 | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | supSpanSingleton_apply_of_mem | null |
supSpanSingleton_apply_mk_of_mem (f : E →ₗ.[K] F) {x : E} (y : F) (hx : x ∉ f.domain)
{x' : E} (hx' : (x' : E) ∈ f.domain) :
f.supSpanSingleton x y hx ⟨x', mem_sup_left hx'⟩ = f ⟨x', hx'⟩ :=
supSpanSingleton_apply_of_mem f y hx _ hx' | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | supSpanSingleton_apply_mk_of_mem | null |
private sSup_aux (c : Set (E →ₗ.[R] F)) (hc : DirectedOn (· ≤ ·) c) :
∃ f : ↥(sSup (domain '' c)) →ₗ[R] F, (⟨_, f⟩ : E →ₗ.[R] F) ∈ upperBounds c := by
rcases c.eq_empty_or_nonempty with ceq | cne
· subst c
simp
have hdir : DirectedOn (· ≤ ·) (domain '' c) :=
directedOn_image.2 (hc.mono @(domain_mono.monotone))
have P : ∀ x : ↥(sSup (domain '' c)), { p : c // (x : E) ∈ p.val.domain } := by
rintro x
apply Classical.indefiniteDescription
have := (mem_sSup_of_directed (cne.image _) hdir).1 x.2
rwa [Set.exists_mem_image, ← bex_def, SetCoe.exists'] at this
set f : ↥(sSup (domain '' c)) → F := fun x => (P x).val.val ⟨x, (P x).property⟩
have f_eq : ∀ (p : c) (x : ↥(sSup (domain '' c))) (y : p.1.1) (_hxy : (x : E) = y),
f x = p.1 y := by
intro p x y hxy
rcases hc (P x).1.1 (P x).1.2 p.1 p.2 with ⟨q, _hqc, ⟨hxq1, hxq2⟩, ⟨hpq1, hpq2⟩⟩
exact (hxq2 (y := ⟨y, hpq1 y.2⟩) hxy).trans (hpq2 rfl).symm
use { toFun := f, map_add' := ?_, map_smul' := ?_ }, ?_
· intro x y
rcases hc (P x).1.1 (P x).1.2 (P y).1.1 (P y).1.2 with ⟨p, hpc, hpx, hpy⟩
set x' := inclusion hpx.1 ⟨x, (P x).2⟩
set y' := inclusion hpy.1 ⟨y, (P y).2⟩
rw [f_eq ⟨p, hpc⟩ x x' rfl, f_eq ⟨p, hpc⟩ y y' rfl, f_eq ⟨p, hpc⟩ (x + y) (x' + y') rfl,
map_add]
· intro c x
simp only [RingHom.id_apply]
rw [f_eq (P x).1 (c • x) (c • ⟨x, (P x).2⟩) rfl, ← map_smul]
· intro p hpc
refine ⟨le_sSup <| Set.mem_image_of_mem domain hpc, fun x y hxy => Eq.symm ?_⟩
exact f_eq ⟨p, hpc⟩ _ _ hxy.symm
protected noncomputable def sSup (c : Set (E →ₗ.[R] F)) (hc : DirectedOn (· ≤ ·) c) : E →ₗ.[R] F :=
⟨_, Classical.choose <| sSup_aux c hc⟩ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | sSup_aux | null |
domain_sSup {c : Set (E →ₗ.[R] F)} (hc : DirectedOn (· ≤ ·) c) :
(LinearPMap.sSup c hc).domain = sSup (LinearPMap.domain '' c) := rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | domain_sSup | null |
mem_domain_sSup_iff {c : Set (E →ₗ.[R] F)} (hnonempty : c.Nonempty)
(hc : DirectedOn (· ≤ ·) c) {x : E} :
x ∈ (LinearPMap.sSup c hc).domain ↔ ∃ f ∈ c, x ∈ f.domain := by
rw [domain_sSup, Submodule.mem_sSup_of_directed (hnonempty.image _)
(DirectedOn.mono_comp LinearPMap.domain_mono.monotone hc)]
simp | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_domain_sSup_iff | null |
protected le_sSup {c : Set (E →ₗ.[R] F)} (hc : DirectedOn (· ≤ ·) c) {f : E →ₗ.[R] F}
(hf : f ∈ c) : f ≤ LinearPMap.sSup c hc :=
Classical.choose_spec (sSup_aux c hc) hf | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | le_sSup | null |
protected sSup_le {c : Set (E →ₗ.[R] F)} (hc : DirectedOn (· ≤ ·) c) {g : E →ₗ.[R] F}
(hg : ∀ f ∈ c, f ≤ g) : LinearPMap.sSup c hc ≤ g :=
le_of_eqLocus_ge <|
sSup_le fun _ ⟨f, hf, Eq⟩ =>
Eq ▸
have : f ≤ LinearPMap.sSup c hc ⊓ g := le_inf (LinearPMap.le_sSup _ hf) (hg f hf)
this.1 | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | sSup_le | null |
protected sSup_apply {c : Set (E →ₗ.[R] F)} (hc : DirectedOn (· ≤ ·) c) {l : E →ₗ.[R] F}
(hl : l ∈ c) (x : l.domain) :
(LinearPMap.sSup c hc) ⟨x, (LinearPMap.le_sSup hc hl).1 x.2⟩ = l x := by
symm
apply (Classical.choose_spec (sSup_aux c hc) hl).2
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | sSup_apply | null |
toPMap (f : E →ₗ[R] F) (p : Submodule R E) : E →ₗ.[R] F :=
⟨p, f.comp p.subtype⟩
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toPMap | Restrict a linear map to a submodule, reinterpreting the result as a `LinearPMap`. |
toPMap_apply (f : E →ₗ[R] F) (p : Submodule R E) (x : p) : f.toPMap p x = f x :=
rfl
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toPMap_apply | null |
toPMap_domain (f : E →ₗ[R] F) (p : Submodule R E) : (f.toPMap p).domain = p :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toPMap_domain | null |
compPMap (g : F →ₗ[R] G) (f : E →ₗ.[R] F) : E →ₗ.[R] G where
domain := f.domain
toFun := g.comp f.toFun
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | compPMap | Compose a linear map with a `LinearPMap` |
compPMap_apply (g : F →ₗ[R] G) (f : E →ₗ.[R] F) (x) : g.compPMap f x = g (f x) :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | compPMap_apply | null |
codRestrict (f : E →ₗ.[R] F) (p : Submodule R F) (H : ∀ x, f x ∈ p) : E →ₗ.[R] p where
domain := f.domain
toFun := f.toFun.codRestrict p H | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | codRestrict | Restrict codomain of a `LinearPMap` |
comp (g : F →ₗ.[R] G) (f : E →ₗ.[R] F) (H : ∀ x : f.domain, f x ∈ g.domain) : E →ₗ.[R] G :=
g.toFun.compPMap <| f.codRestrict _ H | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | comp | Compose two `LinearPMap`s |
coprod (f : E →ₗ.[R] G) (g : F →ₗ.[R] G) : E × F →ₗ.[R] G where
domain := f.domain.prod g.domain
toFun :=
(show f.domain.prod g.domain →ₗ[R] G from
(f.comp (LinearPMap.fst f.domain g.domain) fun x => x.2.1).toFun) +
(show f.domain.prod g.domain →ₗ[R] G from
(g.comp (LinearPMap.snd f.domain g.domain) fun x => x.2.2).toFun)
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | coprod | `f.coprod g` is the partially defined linear map defined on `f.domain × g.domain`,
and sending `p` to `f p.1 + g p.2`. |
coprod_apply (f : E →ₗ.[R] G) (g : F →ₗ.[R] G) (x) :
f.coprod g x = f ⟨(x : E × F).1, x.2.1⟩ + g ⟨(x : E × F).2, x.2.2⟩ :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | coprod_apply | null |
domRestrict (f : E →ₗ.[R] F) (S : Submodule R E) : E →ₗ.[R] F :=
⟨S ⊓ f.domain, f.toFun.comp (Submodule.inclusion (by simp))⟩
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | domRestrict | Restrict a partially defined linear map to a submodule of `E` contained in `f.domain`. |
domRestrict_domain (f : E →ₗ.[R] F) {S : Submodule R E} :
(f.domRestrict S).domain = S ⊓ f.domain :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | domRestrict_domain | null |
domRestrict_apply {f : E →ₗ.[R] F} {S : Submodule R E} ⦃x : ↥(S ⊓ f.domain)⦄ ⦃y : f.domain⦄
(h : (x : E) = y) : f.domRestrict S x = f y := by
have : Submodule.inclusion (by simp) x = y := by
ext
simp [h]
rw [← this]
exact LinearPMap.mk_apply _ _ _ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | domRestrict_apply | null |
domRestrict_le {f : E →ₗ.[R] F} {S : Submodule R E} : f.domRestrict S ≤ f :=
⟨by simp, fun _ _ hxy => domRestrict_apply hxy⟩
/-! ### Graph -/ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | domRestrict_le | null |
graph (f : E →ₗ.[R] F) : Submodule R (E × F) :=
f.toFun.graph.map (f.domain.subtype.prodMap (LinearMap.id : F →ₗ[R] F)) | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | graph | The graph of a `LinearPMap` viewed as a submodule on `E × F`. |
mem_graph_iff' (f : E →ₗ.[R] F) {x : E × F} :
x ∈ f.graph ↔ ∃ y : f.domain, (↑y, f y) = x := by simp [graph]
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_graph_iff' | null |
mem_graph_iff (f : E →ₗ.[R] F) {x : E × F} :
x ∈ f.graph ↔ ∃ y : f.domain, (↑y : E) = x.1 ∧ f y = x.2 := by
cases x
simp_rw [mem_graph_iff', Prod.mk_inj] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_graph_iff | null |
mem_graph (f : E →ₗ.[R] F) (x : domain f) : ((x : E), f x) ∈ f.graph := by simp | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_graph | The tuple `(x, f x)` is contained in the graph of `f`. |
graph_map_fst_eq_domain (f : E →ₗ.[R] F) :
f.graph.map (LinearMap.fst R E F) = f.domain := by
ext x
simp only [Submodule.mem_map, mem_graph_iff, Subtype.exists, exists_and_left, exists_eq_left,
LinearMap.fst_apply, Prod.exists, exists_and_right, exists_eq_right]
constructor <;> intro h
· rcases h with ⟨x, hx, _⟩
exact hx
· use f ⟨x, h⟩
simp only [h, exists_const] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | graph_map_fst_eq_domain | null |
graph_map_snd_eq_range (f : E →ₗ.[R] F) :
f.graph.map (LinearMap.snd R E F) = LinearMap.range f.toFun := by ext; simp
variable {M : Type*} [Monoid M] [DistribMulAction M F] [SMulCommClass R M F] (y : M) | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | graph_map_snd_eq_range | null |
smul_graph (f : E →ₗ.[R] F) (z : M) :
(z • f).graph =
f.graph.map ((LinearMap.id : E →ₗ[R] E).prodMap (z • (LinearMap.id : F →ₗ[R] F))) := by
ext ⟨x_fst, x_snd⟩
constructor <;> intro h
· rw [mem_graph_iff] at h
rcases h with ⟨y, hy, h⟩
rw [LinearPMap.smul_apply] at h
rw [Submodule.mem_map]
simp only [mem_graph_iff, LinearMap.prodMap_apply, LinearMap.id_coe, id,
LinearMap.smul_apply, Prod.mk_inj, Prod.exists, exists_exists_and_eq_and]
use x_fst, y, hy
rw [Submodule.mem_map] at h
rcases h with ⟨x', hx', h⟩
cases x'
simp only [LinearMap.prodMap_apply, LinearMap.id_coe, id, LinearMap.smul_apply,
Prod.mk_inj] at h
rw [mem_graph_iff] at hx' ⊢
rcases hx' with ⟨y, hy, hx'⟩
use y
rw [← h.1, ← h.2]
simp [hy, hx'] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | smul_graph | The graph of `z • f` as a pushforward. |
neg_graph (f : E →ₗ.[R] F) :
(-f).graph =
f.graph.map ((LinearMap.id : E →ₗ[R] E).prodMap (-(LinearMap.id : F →ₗ[R] F))) := by
ext ⟨x_fst, x_snd⟩
constructor <;> intro h
· rw [mem_graph_iff] at h
rcases h with ⟨y, hy, h⟩
rw [LinearPMap.neg_apply] at h
rw [Submodule.mem_map]
simp only [mem_graph_iff, LinearMap.prodMap_apply, LinearMap.id_coe, id,
LinearMap.neg_apply, Prod.mk_inj, Prod.exists, exists_exists_and_eq_and]
use x_fst, y, hy
rw [Submodule.mem_map] at h
rcases h with ⟨x', hx', h⟩
cases x'
simp only [LinearMap.prodMap_apply, LinearMap.id_coe, id, LinearMap.neg_apply,
Prod.mk_inj] at h
rw [mem_graph_iff] at hx' ⊢
rcases hx' with ⟨y, hy, hx'⟩
use y
rw [← h.1, ← h.2]
simp [hy, hx'] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | neg_graph | The graph of `-f` as a pushforward. |
mem_graph_snd_inj (f : E →ₗ.[R] F) {x y : E} {x' y' : F} (hx : (x, x') ∈ f.graph)
(hy : (y, y') ∈ f.graph) (hxy : x = y) : x' = y' := by
grind [mem_graph_iff] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_graph_snd_inj | null |
mem_graph_snd_inj' (f : E →ₗ.[R] F) {x y : E × F} (hx : x ∈ f.graph) (hy : y ∈ f.graph)
(hxy : x.1 = y.1) : x.2 = y.2 := by
cases x
cases y
exact f.mem_graph_snd_inj hx hy hxy | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_graph_snd_inj' | null |
graph_fst_eq_zero_snd (f : E →ₗ.[R] F) {x : E} {x' : F} (h : (x, x') ∈ f.graph)
(hx : x = 0) : x' = 0 :=
f.mem_graph_snd_inj h f.graph.zero_mem hx | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | graph_fst_eq_zero_snd | The property that `f 0 = 0` in terms of the graph. |
mem_domain_iff {f : E →ₗ.[R] F} {x : E} : x ∈ f.domain ↔ ∃ y : F, (x, y) ∈ f.graph := by
constructor <;> intro h
· use f ⟨x, h⟩
exact f.mem_graph ⟨x, h⟩
grind [mem_graph_iff] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_domain_iff | null |
mem_domain_of_mem_graph {f : E →ₗ.[R] F} {x : E} {y : F} (h : (x, y) ∈ f.graph) :
x ∈ f.domain := by
rw [mem_domain_iff]
exact ⟨y, h⟩ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_domain_of_mem_graph | null |
image_iff {f : E →ₗ.[R] F} {x : E} {y : F} (hx : x ∈ f.domain) :
y = f ⟨x, hx⟩ ↔ (x, y) ∈ f.graph := by
grind [mem_graph_iff] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | image_iff | null |
mem_range_iff {f : E →ₗ.[R] F} {y : F} : y ∈ Set.range f ↔ ∃ x : E, (x, y) ∈ f.graph := by
constructor <;> intro h
· rw [Set.mem_range] at h
rcases h with ⟨⟨x, hx⟩, h⟩
use x
rw [← h]
exact f.mem_graph ⟨x, hx⟩
grind [mem_graph_iff] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_range_iff | null |
mem_domain_iff_of_eq_graph {f g : E →ₗ.[R] F} (h : f.graph = g.graph) {x : E} :
x ∈ f.domain ↔ x ∈ g.domain := by simp_rw [mem_domain_iff, h] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_domain_iff_of_eq_graph | null |
le_of_le_graph {f g : E →ₗ.[R] F} (h : f.graph ≤ g.graph) : f ≤ g := by
constructor
· intro x hx
rw [mem_domain_iff] at hx ⊢
obtain ⟨y, hx⟩ := hx
use y
exact h hx
rintro ⟨x, hx⟩ ⟨y, hy⟩ hxy
rw [image_iff]
refine h ?_
simp only at hxy
rw [hxy] at hx
rw [← image_iff hx]
simp [hxy] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | le_of_le_graph | null |
le_graph_of_le {f g : E →ₗ.[R] F} (h : f ≤ g) : f.graph ≤ g.graph := by
intro x hx
rw [mem_graph_iff] at hx ⊢
obtain ⟨y, hx⟩ := hx
use ⟨y, h.1 y.2⟩
simp only [hx, true_and]
convert hx.2 using 1
refine (h.2 ?_).symm
simp only [hx.1] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | le_graph_of_le | null |
le_graph_iff {f g : E →ₗ.[R] F} : f.graph ≤ g.graph ↔ f ≤ g :=
⟨le_of_le_graph, le_graph_of_le⟩ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | le_graph_iff | null |
eq_of_eq_graph {f g : E →ₗ.[R] F} (h : f.graph = g.graph) : f = g := by
apply dExt
· ext
exact mem_domain_iff_of_eq_graph h
· apply (le_of_le_graph h.le).2 | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | eq_of_eq_graph | null |
existsUnique_from_graph {g : Submodule R (E × F)}
(hg : ∀ {x : E × F} (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) {a : E}
(ha : a ∈ g.map (LinearMap.fst R E F)) : ∃! b : F, (a, b) ∈ g := by
refine existsUnique_of_exists_of_unique ?_ ?_
· convert ha
simp
intro y₁ y₂ hy₁ hy₂
have hy : ((0 : E), y₁ - y₂) ∈ g := by
convert g.sub_mem hy₁ hy₂
exact (sub_self _).symm
exact sub_eq_zero.mp (hg hy (by simp)) | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | existsUnique_from_graph | null |
noncomputable valFromGraph {g : Submodule R (E × F)}
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) {a : E}
(ha : a ∈ g.map (LinearMap.fst R E F)) : F :=
(ExistsUnique.exists (existsUnique_from_graph @hg ha)).choose | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | valFromGraph | Auxiliary definition to unfold the existential quantifier. |
valFromGraph_mem {g : Submodule R (E × F)}
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) {a : E}
(ha : a ∈ g.map (LinearMap.fst R E F)) : (a, valFromGraph hg ha) ∈ g :=
(ExistsUnique.exists (existsUnique_from_graph @hg ha)).choose_spec | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | valFromGraph_mem | null |
noncomputable toLinearPMapAux (g : Submodule R (E × F))
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) :
g.map (LinearMap.fst R E F) →ₗ[R] F where
toFun := fun x => valFromGraph hg x.2
map_add' := fun v w => by
have hadd := (g.map (LinearMap.fst R E F)).add_mem v.2 w.2
have hvw := valFromGraph_mem hg hadd
have hvw' := g.add_mem (valFromGraph_mem hg v.2) (valFromGraph_mem hg w.2)
rw [Prod.mk_add_mk] at hvw'
exact (existsUnique_from_graph @hg hadd).unique hvw hvw'
map_smul' := fun a v => by
have hsmul := (g.map (LinearMap.fst R E F)).smul_mem a v.2
have hav := valFromGraph_mem hg hsmul
have hav' := g.smul_mem a (valFromGraph_mem hg v.2)
rw [Prod.smul_mk] at hav'
exact (existsUnique_from_graph @hg hsmul).unique hav hav'
open scoped Classical in | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toLinearPMapAux | Define a `LinearMap` from its graph.
Helper definition for `LinearPMap`. |
noncomputable toLinearPMap (g : Submodule R (E × F)) : E →ₗ.[R] F where
domain := g.map (LinearMap.fst R E F)
toFun := if hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0 then
g.toLinearPMapAux hg else 0 | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toLinearPMap | Define a `LinearPMap` from its graph.
In the case that the submodule is not a graph of a `LinearPMap` then the underlying linear map
is just the zero map. |
toLinearPMap_domain (g : Submodule R (E × F)) :
g.toLinearPMap.domain = g.map (LinearMap.fst R E F) := rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toLinearPMap_domain | null |
toLinearPMap_apply_aux {g : Submodule R (E × F)}
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0)
(x : g.map (LinearMap.fst R E F)) :
g.toLinearPMap x = valFromGraph hg x.2 := by
classical
change (if hg : _ then g.toLinearPMapAux hg else 0) x = _
rw [dif_pos]
· rfl
· exact hg | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toLinearPMap_apply_aux | null |
mem_graph_toLinearPMap {g : Submodule R (E × F)}
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0)
(x : g.map (LinearMap.fst R E F)) : (x.val, g.toLinearPMap x) ∈ g := by
rw [toLinearPMap_apply_aux hg]
exact valFromGraph_mem hg x.2
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_graph_toLinearPMap | null |
toLinearPMap_graph_eq (g : Submodule R (E × F))
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) :
g.toLinearPMap.graph = g := by
ext ⟨x_fst, x_snd⟩
constructor <;> intro hx
· rw [LinearPMap.mem_graph_iff] at hx
rcases hx with ⟨y, hx1, hx2⟩
convert g.mem_graph_toLinearPMap hg y using 1
exact Prod.ext hx1.symm hx2.symm
rw [LinearPMap.mem_graph_iff]
have hx_fst : x_fst ∈ g.map (LinearMap.fst R E F) := by
simp only [mem_map, LinearMap.fst_apply, Prod.exists, exists_and_right, exists_eq_right]
exact ⟨x_snd, hx⟩
refine ⟨⟨x_fst, hx_fst⟩, Subtype.coe_mk x_fst hx_fst, ?_⟩
rw [toLinearPMap_apply_aux hg]
exact (existsUnique_from_graph @hg hx_fst).unique (valFromGraph_mem hg hx_fst) hx | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toLinearPMap_graph_eq | null |
toLinearPMap_range (g : Submodule R (E × F))
(hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) :
LinearMap.range g.toLinearPMap.toFun = g.map (LinearMap.snd R E F) := by
rwa [← LinearPMap.graph_map_snd_eq_range, toLinearPMap_graph_eq] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | toLinearPMap_range | null |
noncomputable inverse (f : E →ₗ.[R] F) : F →ₗ.[R] E :=
(f.graph.map (LinearEquiv.prodComm R E F)).toLinearPMap
variable {f : E →ₗ.[R] F} | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | inverse | The inverse of a `LinearPMap`. |
inverse_domain : (inverse f).domain = LinearMap.range f.toFun := by
rw [inverse, Submodule.toLinearPMap_domain, ← graph_map_snd_eq_range,
← LinearEquiv.fst_comp_prodComm, Submodule.map_comp]
rfl
variable (hf : LinearMap.ker f.toFun = ⊥)
include hf | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | inverse_domain | null |
mem_inverse_graph_snd_eq_zero (x : F × E)
(hv : x ∈ (graph f).map (LinearEquiv.prodComm R E F))
(hv' : x.fst = 0) : x.snd = 0 := by
simp only [Submodule.mem_map, mem_graph_iff, Subtype.exists, exists_and_left, exists_eq_left,
LinearEquiv.prodComm_apply, Prod.exists, Prod.swap_prod_mk] at hv
rcases hv with ⟨a, b, ⟨ha, h1⟩, ⟨h2, h3⟩⟩
simp only at hv' ⊢
rw [hv'] at h1
rw [LinearMap.ker_eq_bot'] at hf
specialize hf ⟨a, ha⟩ h1
simp only [Submodule.mk_eq_zero] at hf
exact hf | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_inverse_graph_snd_eq_zero | The graph of the inverse generates a `LinearPMap`. |
inverse_graph : (inverse f).graph = f.graph.map (LinearEquiv.prodComm R E F) := by
rw [inverse, Submodule.toLinearPMap_graph_eq _ (mem_inverse_graph_snd_eq_zero hf)] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | inverse_graph | null |
inverse_range : LinearMap.range (inverse f).toFun = f.domain := by
rw [inverse, Submodule.toLinearPMap_range _ (mem_inverse_graph_snd_eq_zero hf),
← graph_map_fst_eq_domain, ← LinearEquiv.snd_comp_prodComm, Submodule.map_comp]
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | inverse_range | null |
mem_inverse_graph (x : f.domain) : (f x, (x : E)) ∈ (inverse f).graph := by
simp only [inverse_graph hf, Submodule.mem_map, mem_graph_iff, Subtype.exists, exists_and_left,
exists_eq_left, LinearEquiv.prodComm_apply, Prod.exists, Prod.swap_prod_mk, Prod.mk.injEq]
exact ⟨(x : E), f x, ⟨x.2, Eq.refl _⟩, Eq.refl _, Eq.refl _⟩ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | mem_inverse_graph | null |
inverse_apply_eq {y : (inverse f).domain} {x : f.domain} (hxy : f x = y) :
(inverse f) y = x := by
have := mem_inverse_graph hf x
grind [mem_graph_iff] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Prod"
] | Mathlib/LinearAlgebra/LinearPMap.lean | inverse_apply_eq | null |
Orientation := Module.Ray R (M [⋀^ι]→ₗ[R] R) | abbrev | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation | An orientation of a module, intended to be used when `ι` is a `Fintype` with the same
cardinality as a basis. |
Module.Oriented where
/-- Fix a positive orientation. -/
positiveOrientation : Orientation R M ι
export Module.Oriented (positiveOrientation)
variable {R M} | class | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Module.Oriented | A type class fixing an orientation of a module. |
Orientation.map (e : M ≃ₗ[R] N) : Orientation R M ι ≃ Orientation R N ι :=
Module.Ray.map <| AlternatingMap.domLCongr R R ι R e
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.map | An equivalence between modules implies an equivalence between orientations. |
Orientation.map_apply (e : M ≃ₗ[R] N) (v : M [⋀^ι]→ₗ[R] R) (hv : v ≠ 0) :
Orientation.map ι e (rayOfNeZero _ v hv) =
rayOfNeZero _ (v.compLinearMap e.symm) (mt (v.compLinearEquiv_eq_zero_iff e.symm).mp hv) :=
rfl
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.map_apply | null |
Orientation.map_refl : (Orientation.map ι <| LinearEquiv.refl R M) = Equiv.refl _ := by
rw [Orientation.map, AlternatingMap.domLCongr_refl, Module.Ray.map_refl]
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.map_refl | null |
Orientation.map_symm (e : M ≃ₗ[R] N) :
(Orientation.map ι e).symm = Orientation.map ι e.symm := rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.map_symm | null |
Orientation.reindex (e : ι ≃ ι') : Orientation R M ι ≃ Orientation R M ι' :=
Module.Ray.map <| AlternatingMap.domDomCongrₗ R e
@[simp] | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.reindex | An equivalence between indices implies an equivalence between orientations. |
Orientation.reindex_apply (e : ι ≃ ι') (v : M [⋀^ι]→ₗ[R] R) (hv : v ≠ 0) :
Orientation.reindex R M e (rayOfNeZero _ v hv) =
rayOfNeZero _ (v.domDomCongr e) (mt (v.domDomCongr_eq_zero_iff e).mp hv) :=
rfl
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.reindex_apply | null |
Orientation.reindex_refl : (Orientation.reindex R M <| Equiv.refl ι) = Equiv.refl _ := by
rw [Orientation.reindex, AlternatingMap.domDomCongrₗ_refl, Module.Ray.map_refl]
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.reindex_refl | null |
Orientation.reindex_symm (e : ι ≃ ι') :
(Orientation.reindex R M e).symm = Orientation.reindex R M e.symm :=
rfl | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | Orientation.reindex_symm | null |
map_orientation_eq_det_inv_smul [Finite ι] (e : Basis ι R M) (x : Orientation R M ι)
(f : M ≃ₗ[R] M) : Orientation.map ι f x = (LinearEquiv.det f)⁻¹ • x := by
cases nonempty_fintype ι
letI := Classical.decEq ι
induction x using Module.Ray.ind with | h g hg =>
rw [Orientation.map_apply, smul_rayOfNeZero, ray_eq_iff, Units.smul_def,
(g.compLinearMap f.symm).eq_smul_basis_det e, g.eq_smul_basis_det e,
AlternatingMap.compLinearMap_apply, AlternatingMap.smul_apply,
show (fun i ↦ (LinearEquiv.symm f).toLinearMap (e i)) = (LinearEquiv.symm f).toLinearMap ∘ e
by rfl, Basis.det_comp, Basis.det_self, mul_one, smul_eq_mul, mul_comm, mul_smul,
LinearEquiv.coe_inv_det]
variable [Fintype ι] [DecidableEq ι] [Fintype ι'] [DecidableEq ι'] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | map_orientation_eq_det_inv_smul | A module is canonically oriented with respect to an empty index type. -/
instance (priority := 100) IsEmpty.oriented [IsEmpty ι] : Module.Oriented R M ι where
positiveOrientation :=
rayOfNeZero R (AlternatingMap.constLinearEquivOfIsEmpty 1) <|
AlternatingMap.constLinearEquivOfIsEmpty.injective.ne (by exact one_ne_zero)
@[simp]
theorem Orientation.map_positiveOrientation_of_isEmpty [IsEmpty ι] (f : M ≃ₗ[R] N) :
Orientation.map ι f positiveOrientation = positiveOrientation := rfl
@[simp]
theorem Orientation.map_of_isEmpty [IsEmpty ι] (x : Orientation R M ι) (f : M ≃ₗ[R] M) :
Orientation.map ι f x = x := by
induction x using Module.Ray.ind with | h g hg =>
rw [Orientation.map_apply]
congr
ext i
rw [AlternatingMap.compLinearMap_apply]
congr
simp only [LinearEquiv.coe_coe, eq_iff_true_of_subsingleton]
end OrderedCommSemiring
section OrderedCommRing
variable {R : Type*} [CommRing R] [PartialOrder R] [IsStrictOrderedRing R]
variable {M N : Type*} [AddCommGroup M] [AddCommGroup N] [Module R M] [Module R N]
@[simp]
protected theorem Orientation.map_neg {ι : Type*} (f : M ≃ₗ[R] N) (x : Orientation R M ι) :
Orientation.map ι f (-x) = -Orientation.map ι f x :=
Module.Ray.map_neg _ x
@[simp]
protected theorem Orientation.reindex_neg {ι ι' : Type*} (e : ι ≃ ι') (x : Orientation R M ι) :
Orientation.reindex R M e (-x) = -Orientation.reindex R M e x :=
Module.Ray.map_neg _ x
namespace Module.Basis
variable {ι ι' : Type*}
/-- The value of `Orientation.map` when the index type has the cardinality of a basis, in terms
of `f.det`. |
protected orientation (e : Basis ι R M) : Orientation R M ι :=
rayOfNeZero R _ e.det_ne_zero | def | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation | The orientation given by a basis. |
orientation_map (e : Basis ι R M) (f : M ≃ₗ[R] N) :
(e.map f).orientation = Orientation.map ι f e.orientation := by
simp_rw [Basis.orientation, Orientation.map_apply, Basis.det_map'] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_map | null |
orientation_reindex (e : Basis ι R M) (eι : ι ≃ ι') :
(e.reindex eι).orientation = Orientation.reindex R M eι e.orientation := by
simp_rw [Basis.orientation, Orientation.reindex_apply, Basis.det_reindex'] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_reindex | null |
orientation_unitsSMul (e : Basis ι R M) (w : ι → Units R) :
(e.unitsSMul w).orientation = (∏ i, w i)⁻¹ • e.orientation := by
rw [Basis.orientation, Basis.orientation, smul_rayOfNeZero, ray_eq_iff,
e.det.eq_smul_basis_det (e.unitsSMul w), det_unitsSMul_self, Units.smul_def, smul_smul]
norm_cast
simp only [inv_mul_cancel, Units.val_one, one_smul]
exact SameRay.rfl
@[simp] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_unitsSMul | The orientation given by a basis derived using `units_smul`, in terms of the product of those
units. |
orientation_isEmpty [IsEmpty ι] (b : Basis ι R M) :
b.orientation = positiveOrientation := by
rw [Basis.orientation]
congr
exact b.det_isEmpty | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_isEmpty | null |
eq_or_eq_neg_of_isEmpty [IsEmpty ι] (o : Orientation R M ι) :
o = positiveOrientation ∨ o = -positiveOrientation := by
induction o using Module.Ray.ind with | h x hx =>
dsimp [positiveOrientation]
simp only [ray_eq_iff]
rw [sameRay_or_sameRay_neg_iff_not_linearIndependent]
intro h
set f : (M [⋀^ι]→ₗ[R] R) ≃ₗ[R] R := AlternatingMap.constLinearEquivOfIsEmpty.symm
have H : LinearIndependent R ![f x, 1] := by
convert h.map' f.toLinearMap f.ker
ext i
fin_cases i <;> simp [f]
rw [linearIndependent_iff'] at H
simpa using H Finset.univ ![1, -f x] (by simp [Fin.sum_univ_succ]) 0 (by simp) | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | eq_or_eq_neg_of_isEmpty | A module `M` over a linearly ordered commutative ring has precisely two "orientations" with
respect to an empty index type. (Note that these are only orientations of `M` of in the conventional
mathematical sense if `M` is zero-dimensional.) |
orientation_eq_iff_det_pos (e₁ e₂ : Basis ι R M) :
e₁.orientation = e₂.orientation ↔ 0 < e₁.det e₂ :=
calc
e₁.orientation = e₂.orientation ↔ SameRay R e₁.det e₂.det := ray_eq_iff _ _
_ ↔ SameRay R (e₁.det e₂ • e₂.det) e₂.det := by rw [← e₁.det.eq_smul_basis_det e₂]
_ ↔ 0 < e₁.det e₂ := sameRay_smul_left_iff_of_ne e₂.det_ne_zero (e₁.isUnit_det e₂).ne_zero | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_eq_iff_det_pos | The orientations given by two bases are equal if and only if the determinant of one basis
with respect to the other is positive. |
orientation_eq_or_eq_neg (e : Basis ι R M) (x : Orientation R M ι) :
x = e.orientation ∨ x = -e.orientation := by
induction x using Module.Ray.ind with | h x hx =>
rw [← x.map_basis_ne_zero_iff e] at hx
rwa [Basis.orientation, ray_eq_iff, neg_rayOfNeZero, ray_eq_iff, x.eq_smul_basis_det e,
sameRay_neg_smul_left_iff_of_ne e.det_ne_zero hx, sameRay_smul_left_iff_of_ne e.det_ne_zero hx,
lt_or_lt_iff_ne, ne_comm] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_eq_or_eq_neg | Given a basis, any orientation equals the orientation given by that basis or its negation. |
orientation_ne_iff_eq_neg (e : Basis ι R M) (x : Orientation R M ι) :
x ≠ e.orientation ↔ x = -e.orientation :=
⟨fun h => (e.orientation_eq_or_eq_neg x).resolve_left h, fun h =>
h.symm ▸ (Module.Ray.ne_neg_self e.orientation).symm⟩ | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_ne_iff_eq_neg | Given a basis, an orientation equals the negation of that given by that basis if and only
if it does not equal that given by that basis. |
orientation_comp_linearEquiv_eq_iff_det_pos (e : Basis ι R M) (f : M ≃ₗ[R] M) :
(e.map f).orientation = e.orientation ↔ 0 < LinearMap.det (f : M →ₗ[R] M) := by
rw [orientation_map, e.map_orientation_eq_det_inv_smul, units_inv_smul, units_smul_eq_self_iff,
LinearEquiv.coe_det] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_comp_linearEquiv_eq_iff_det_pos | Composing a basis with a linear equiv gives the same orientation if and only if the
determinant is positive. |
orientation_comp_linearEquiv_eq_neg_iff_det_neg (e : Basis ι R M) (f : M ≃ₗ[R] M) :
(e.map f).orientation = -e.orientation ↔ LinearMap.det (f : M →ₗ[R] M) < 0 := by
rw [orientation_map, e.map_orientation_eq_det_inv_smul, units_inv_smul, units_smul_eq_neg_iff,
LinearEquiv.coe_det] | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_comp_linearEquiv_eq_neg_iff_det_neg | Composing a basis with a linear equiv gives the negation of that orientation if and only if
the determinant is negative. |
@[simp]
orientation_neg_single (e : Basis ι R M) (i : ι) :
(e.unitsSMul (Function.update 1 i (-1))).orientation = -e.orientation := by
rw [orientation_unitsSMul, Finset.prod_update_of_mem (Finset.mem_univ _)]
simp | theorem | LinearAlgebra | [
"Mathlib.LinearAlgebra.Ray",
"Mathlib.LinearAlgebra.Determinant"
] | Mathlib/LinearAlgebra/Orientation.lean | orientation_neg_single | Negating a single basis vector (represented using `units_smul`) negates the corresponding
orientation. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.