@@ -7,6 +7,7 @@ import algebra.big_operators.pi
7
7
import algebra.module.pi
8
8
import algebra.module.prod
9
9
import algebra.module.submodule
10
+ import algebra.module.submodule_lattice
10
11
import algebra.group.prod
11
12
import data.finsupp.basic
12
13
import data.dfinsupp
@@ -17,8 +18,7 @@ import order.compactly_generated
17
18
# Linear algebra
18
19
19
20
This file defines the basics of linear algebra. It sets up the "categorical/lattice structure" of
20
- modules over a ring, submodules, and linear maps. If `p` and `q` are submodules of a module, `p ≤ q`
21
- means that `p ⊆ q`.
21
+ modules over a ring, submodules, and linear maps.
22
22
23
23
Many of the relevant definitions, including `module`, `submodule`, and `linear_map`, are found in
24
24
`src/algebra/module`.
@@ -487,27 +487,8 @@ variables (p p' : submodule R M) (q q' : submodule R M₂)
487
487
variables {r : R} {x y : M}
488
488
open set
489
489
490
- instance : partial_order (submodule R M) :=
491
- { le := λ p p', ∀ ⦃x⦄, x ∈ p → x ∈ p',
492
- ..partial_order.lift (coe : submodule R M → set M) coe_injective }
493
-
494
490
variables {p p'}
495
491
496
- lemma le_def : p ≤ p' ↔ (p : set M) ⊆ p' := iff.rfl
497
-
498
- @[simp, norm_cast] lemma coe_subset_coe : (p : set M) ⊆ p' ↔ p ≤ p' := iff.rfl
499
-
500
- lemma le_def' : p ≤ p' ↔ ∀ x ∈ p, x ∈ p' := iff.rfl
501
-
502
- lemma lt_def : p < p' ↔ (p : set M) ⊂ p' := iff.rfl
503
-
504
- lemma not_le_iff_exists : ¬ (p ≤ p') ↔ ∃ x ∈ p, x ∉ p' := not_subset
505
-
506
- lemma exists_of_lt {p p' : submodule R M} : p < p' → ∃ x ∈ p', x ∉ p := exists_of_ssubset
507
-
508
- lemma lt_iff_le_and_exists : p < p' ↔ p ≤ p' ∧ ∃ x ∈ p', x ∉ p :=
509
- by rw [lt_iff_le_not_le, not_le_iff_exists]
510
-
511
492
/-- If two submodules `p` and `p'` satisfy `p ⊆ p'`, then `of_le p p'` is the linear map version of
512
493
this inclusion. -/
513
494
def of_le (h : p ≤ p') : p →ₗ[R] p' :=
@@ -524,90 +505,6 @@ lemma subtype_comp_of_le (p q : submodule R M) (h : p ≤ q) :
524
505
q.subtype.comp (of_le h) = p.subtype :=
525
506
by { ext ⟨b, hb⟩, refl }
526
507
527
- /-- The set `{0}` is the bottom element of the lattice of submodules. -/
528
- instance : has_bot (submodule R M) :=
529
- ⟨{ carrier := {0 }, smul_mem' := by simp { contextual := tt }, .. (⊥ : add_submonoid M)}⟩
530
-
531
- instance inhabited' : inhabited (submodule R M) := ⟨⊥⟩
532
-
533
- @[simp] lemma bot_coe : ((⊥ : submodule R M) : set M) = {0 } := rfl
534
-
535
- section
536
- variables (R)
537
- @[simp] lemma mem_bot : x ∈ (⊥ : submodule R M) ↔ x = 0 := mem_singleton_iff
538
- end
539
-
540
- instance unique_bot : unique (⊥ : submodule R M) :=
541
- ⟨infer_instance, λ x, subtype.ext $ (mem_bot R).1 x.mem⟩
542
-
543
- lemma nonzero_mem_of_bot_lt {I : submodule R M} (bot_lt : ⊥ < I) : ∃ a : I, a ≠ 0 :=
544
- begin
545
- have h := (submodule.lt_iff_le_and_exists.1 bot_lt).2 ,
546
- tidy,
547
- end
548
-
549
- instance : order_bot (submodule R M) :=
550
- { bot := ⊥,
551
- bot_le := λ p x, by simp {contextual := tt},
552
- ..submodule.partial_order }
553
-
554
- protected lemma eq_bot_iff (p : submodule R M) : p = ⊥ ↔ ∀ x ∈ p, x = (0 : M) :=
555
- ⟨ λ h, h.symm ▸ λ x hx, (mem_bot R).mp hx,
556
- λ h, eq_bot_iff.mpr (λ x hx, (mem_bot R).mpr (h x hx)) ⟩
557
-
558
- protected lemma ne_bot_iff (p : submodule R M) : p ≠ ⊥ ↔ ∃ x ∈ p, x ≠ (0 : M) :=
559
- by { haveI := classical.prop_decidable, simp_rw [ne.def, p.eq_bot_iff, not_forall] }
560
-
561
- /-- The universal set is the top element of the lattice of submodules. -/
562
- instance : has_top (submodule R M) :=
563
- ⟨{ carrier := univ, smul_mem' := λ _ _ _, trivial, .. (⊤ : add_submonoid M)}⟩
564
-
565
- @[simp] lemma top_coe : ((⊤ : submodule R M) : set M) = univ := rfl
566
-
567
- @[simp] lemma mem_top : x ∈ (⊤ : submodule R M) := trivial
568
-
569
- instance : order_top (submodule R M) :=
570
- { top := ⊤,
571
- le_top := λ p x _, trivial,
572
- ..submodule.partial_order }
573
-
574
- instance : has_Inf (submodule R M) :=
575
- ⟨λ S, {
576
- carrier := ⋂ s ∈ S, (s : set M),
577
- zero_mem' := by simp,
578
- add_mem' := by simp [add_mem] {contextual := tt},
579
- smul_mem' := by simp [smul_mem] {contextual := tt} }⟩
580
-
581
- private lemma Inf_le' {S : set (submodule R M)} {p} : p ∈ S → Inf S ≤ p :=
582
- bInter_subset_of_mem
583
-
584
- private lemma le_Inf' {S : set (submodule R M)} {p} : (∀p' ∈ S, p ≤ p') → p ≤ Inf S :=
585
- subset_bInter
586
-
587
- instance : has_inf (submodule R M) :=
588
- ⟨λ p p', {
589
- carrier := p ∩ p',
590
- zero_mem' := by simp,
591
- add_mem' := by simp [add_mem] {contextual := tt},
592
- smul_mem' := by simp [smul_mem] {contextual := tt} }⟩
593
-
594
- instance : complete_lattice (submodule R M) :=
595
- { sup := λ a b, Inf {x | a ≤ x ∧ b ≤ x},
596
- le_sup_left := λ a b, le_Inf' $ λ x ⟨ha, hb⟩, ha,
597
- le_sup_right := λ a b, le_Inf' $ λ x ⟨ha, hb⟩, hb,
598
- sup_le := λ a b c h₁ h₂, Inf_le' ⟨h₁, h₂⟩,
599
- inf := (⊓),
600
- le_inf := λ a b c, subset_inter,
601
- inf_le_left := λ a b, inter_subset_left _ _,
602
- inf_le_right := λ a b, inter_subset_right _ _,
603
- Sup := λtt, Inf {t | ∀t'∈tt, t' ≤ t},
604
- le_Sup := λ s p hs, le_Inf' $ λ p' hp', hp' _ hs,
605
- Sup_le := λ s p hs, Inf_le' hs,
606
- Inf := Inf,
607
- le_Inf := λ s a, le_Inf',
608
- Inf_le := λ s a, Inf_le',
609
- ..submodule.order_top,
610
- ..submodule.order_bot }
611
508
612
509
instance add_comm_monoid_submodule : add_comm_monoid (submodule R M) :=
613
510
{ add := (⊔),
@@ -620,15 +517,8 @@ instance add_comm_monoid_submodule : add_comm_monoid (submodule R M) :=
620
517
@[simp] lemma add_eq_sup (p q : submodule R M) : p + q = p ⊔ q := rfl
621
518
@[simp] lemma zero_eq_bot : (0 : submodule R M) = ⊥ := rfl
622
519
623
- lemma eq_top_iff' {p : submodule R M} : p = ⊤ ↔ ∀ x, x ∈ p :=
624
- eq_top_iff.trans ⟨λ h x, @h x trivial, λ h x _, h x⟩
625
-
626
520
variables (R)
627
521
628
- @[simp] lemma bot_to_add_submonoid : (⊥ : submodule R M).to_add_submonoid = ⊥ := rfl
629
-
630
- @[simp] lemma top_to_add_submonoid : (⊤ : submodule R M).to_add_submonoid = ⊤ := rfl
631
-
632
522
lemma subsingleton_iff : subsingleton M ↔ subsingleton (submodule R M) :=
633
523
add_submonoid.subsingleton_iff.trans $ begin
634
524
rw [←subsingleton_iff_bot_eq_top, ←subsingleton_iff_bot_eq_top],
@@ -650,25 +540,6 @@ by haveI := semimodule.subsingleton R M; apply_instance
650
540
651
541
instance [nontrivial M] : nontrivial (submodule R M) := (nontrivial_iff R).mp ‹_›
652
542
653
- @[simp] theorem inf_coe : (p ⊓ p' : set M) = p ∩ p' := rfl
654
-
655
- @[simp] theorem mem_inf {p p' : submodule R M} :
656
- x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p' := iff.rfl
657
-
658
- @[simp] theorem Inf_coe (P : set (submodule R M)) : (↑(Inf P) : set M) = ⋂ p ∈ P, ↑p := rfl
659
-
660
- @[simp] theorem infi_coe {ι} (p : ι → submodule R M) :
661
- (↑⨅ i, p i : set M) = ⋂ i, ↑(p i) :=
662
- by rw [infi, Inf_coe]; ext a; simp; exact
663
- ⟨λ h i, h _ i rfl, λ h i x e, e ▸ h _⟩
664
-
665
- @[simp] lemma mem_Inf {S : set (submodule R M)} {x : M} : x ∈ Inf S ↔ ∀ p ∈ S, x ∈ p :=
666
- set.mem_bInter_iff
667
-
668
- @[simp] theorem mem_infi {ι} (p : ι → submodule R M) :
669
- x ∈ (⨅ i, p i) ↔ ∀ i, x ∈ p i :=
670
- by rw [← mem_coe, infi_coe, mem_Inter]; refl
671
-
672
543
theorem disjoint_def {p p' : submodule R M} :
673
544
disjoint p p' ↔ ∀ x ∈ p, x ∈ p' → x = (0 :M) :=
674
545
show (∀ x, x ∈ p ∧ x ∈ p' → x ∈ ({0 } : set M)) ↔ _, by simp
@@ -875,17 +746,6 @@ begin
875
746
{ exact λ a x i hi, ⟨i, smul_mem _ a hi⟩ },
876
747
end
877
748
878
- lemma mem_sup_left {S T : submodule R M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T :=
879
- show S ≤ S ⊔ T, from le_sup_left
880
-
881
- lemma mem_sup_right {S T : submodule R M} : ∀ {x : M}, x ∈ T → x ∈ S ⊔ T :=
882
- show T ≤ S ⊔ T, from le_sup_right
883
-
884
- lemma mem_supr_of_mem {ι : Sort *} {b : M} {p : ι → submodule R M} (i : ι) (h : b ∈ p i) :
885
- b ∈ (⨆i, p i) :=
886
- have p i ≤ (⨆i, p i) := le_supr p i,
887
- @this b h
888
-
889
749
lemma sum_mem_bsupr {ι : Type *} {s : finset ι} {f : ι → M} {p : ι → submodule R M}
890
750
(h : ∀ i ∈ s, f i ∈ p i) :
891
751
∑ i in s, f i ∈ ⨆ i ∈ s, p i :=
@@ -896,10 +756,6 @@ lemma sum_mem_supr {ι : Type*} [fintype ι] {f : ι → M} {p : ι → submodul
896
756
∑ i, f i ∈ ⨆ i, p i :=
897
757
sum_mem _ $ λ i hi, mem_supr_of_mem i (h i)
898
758
899
- lemma mem_Sup_of_mem {S : set (submodule R M)} {s : submodule R M}
900
- (hs : s ∈ S) : ∀ {x : M}, x ∈ s → x ∈ Sup S :=
901
- show s ≤ Sup S, from le_Sup hs
902
-
903
759
@[simp] theorem mem_supr_of_directed {ι} [nonempty ι]
904
760
(S : ι → submodule R M) (H : directed (≤) S) {x} :
905
761
x ∈ supr S ↔ ∃ i, x ∈ S i :=
0 commit comments