mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-13 15:48:39 +00:00
Irreducible and maximal (#87)
This commit is contained in:
@@ -22,6 +22,7 @@ open import Rings.Divisible.Definition R
|
||||
open import Rings.IntegralDomains.Lemmas intDom
|
||||
open import Rings.Associates.Definition intDom
|
||||
open import Rings.Units.Definition R
|
||||
open import Rings.Ideals.Definition R
|
||||
open Setoid S
|
||||
open Ring R
|
||||
open Equivalence eq
|
||||
@@ -42,3 +43,9 @@ mutualDivisionImpliesAssociate' {a} {b} (r , ar=b) (s , bs=a) a=0 = 1R , ((1R ,
|
||||
where
|
||||
b=0 : b ∼ 0R
|
||||
b=0 = transitive (symmetric ar=b) (transitive (transitive *Commutative (*WellDefined reflexive a=0)) (timesZero {r}))
|
||||
|
||||
associateImpliesGeneratedIdealsEqual : {a b : A} → Associates a b → {x : A} → generatedIdealPred a x → generatedIdealPred b x
|
||||
associateImpliesGeneratedIdealsEqual {a} {b} (r , ((s , rs=1) ,, a=br)) {x} (c , ac=x) = (r * c) , transitive *Associative (transitive (*WellDefined (symmetric a=br) reflexive) ac=x)
|
||||
|
||||
associateImpliesGeneratedIdealsEqual' : {a b : A} → Associates a b → {x : A} → generatedIdealPred b x → generatedIdealPred a x
|
||||
associateImpliesGeneratedIdealsEqual' assoc = associateImpliesGeneratedIdealsEqual (Equivalence.symmetric associatesEquiv assoc)
|
||||
|
@@ -23,6 +23,8 @@ open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
|
||||
module Rings.Ideals.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) where
|
||||
|
||||
open import Rings.Divisible.Definition R
|
||||
|
||||
idealPredForKernel : {c d : _} {C : Set c} {T : Setoid {c} {d} C} {_+2_ _*2_ : C → C → C} (R2 : Ring T _+2_ _*2_) {f : A → C} (fHom : RingHom R R2 f) → A → Set d
|
||||
idealPredForKernel {T = T} R2 {f} fHom a = Setoid._∼_ T (f a) (Ring.0R R2)
|
||||
|
||||
@@ -65,3 +67,6 @@ Subgroup.closedUnderPlus (Ideal.isSubgroup (inverseImageIsIdeal fHom i)) {g} {h}
|
||||
Subgroup.containsIdentity (Ideal.isSubgroup (inverseImageIsIdeal fHom i)) = 0G , (Ideal.containsIdentity i ,, imageOfIdentityIsIdentity (RingHom.groupHom fHom))
|
||||
Subgroup.closedUnderInverse (Ideal.isSubgroup (inverseImageIsIdeal fHom i)) (a , (prA ,, fg=a)) = inverse a , (Ideal.closedUnderInverse i prA ,, transitive (homRespectsInverse (RingHom.groupHom fHom)) (inverseWellDefined additiveGroup fg=a))
|
||||
Ideal.accumulatesTimes (inverseImageIsIdeal {_*2_ = _*2_} {f = f} fHom i) {g} {h} (a , (prA ,, fg=a)) = (a * f h) , (Ideal.accumulatesTimes i prA ,, transitive (RingHom.ringHom fHom) (*WellDefined fg=a reflexive))
|
||||
|
||||
memberDividesImpliesMember : {a b : A} → {c : _} → {pred : A → Set c} → (i : Ideal R pred) → pred a → a ∣ b → pred b
|
||||
memberDividesImpliesMember {a} {b} i pA (s , as=b) = Ideal.isSubset i as=b (Ideal.accumulatesTimes i pA)
|
||||
|
@@ -18,7 +18,11 @@ open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
module Rings.Ideals.Principal.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) where
|
||||
|
||||
open import Rings.Ideals.Definition R
|
||||
open import Rings.Divisible.Definition R
|
||||
open Setoid S
|
||||
|
||||
PrincipalIdeal : {c : _} {pred : A → Set c} (ideal : Ideal pred) → Set (a ⊔ b ⊔ c)
|
||||
PrincipalIdeal {pred = pred} ideal = Sg A (λ a → {x : A} → (pred x) → Sg A (λ c → (a * c) ∼ x))
|
||||
record PrincipalIdeal {c : _} {pred : A → Set c} (ideal : Ideal pred) : Set (a ⊔ b ⊔ c) where
|
||||
field
|
||||
generator : A
|
||||
genIsInIdeal : pred generator
|
||||
genGenerates : {x : A} → pred x → generator ∣ x
|
||||
|
27
Rings/Irreducibles/Lemmas.agda
Normal file
27
Rings/Irreducibles/Lemmas.agda
Normal file
@@ -0,0 +1,27 @@
|
||||
{-# OPTIONS --safe --warning=error --without-K #-}
|
||||
|
||||
open import LogicalFormulae
|
||||
open import Setoids.Orders
|
||||
open import Setoids.Setoids
|
||||
open import Sets.EquivalenceRelations
|
||||
open import Rings.IntegralDomains.Definition
|
||||
open import Rings.Definition
|
||||
|
||||
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
|
||||
module Rings.Irreducibles.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} {R : Ring S _+_ _*_} (intDom : IntegralDomain R) where
|
||||
|
||||
open import Rings.Irreducibles.Definition intDom
|
||||
open import Rings.Divisible.Definition R
|
||||
open import Rings.Units.Definition R
|
||||
open import Rings.Associates.Definition intDom
|
||||
|
||||
open Setoid S
|
||||
open Equivalence eq
|
||||
open Ring R
|
||||
|
||||
dividesIrreducibleImpliesUnit : {r c : A} → Irreducible r → c ∣ r → (r ∣ c → False) → Unit c
|
||||
dividesIrreducibleImpliesUnit {r} {c} irred (x , cx=r) notAssoc = Irreducible.irreducible irred x c (transitive *Commutative cx=r) nonunit
|
||||
where
|
||||
nonunit : Unit x → False
|
||||
nonunit (a , xa=1) = notAssoc (a , transitive (transitive (transitive (transitive (*WellDefined (symmetric cx=r) reflexive) (symmetric *Associative)) *Commutative) (*WellDefined xa=1 reflexive)) identIsIdent)
|
@@ -1,21 +1,13 @@
|
||||
{-# OPTIONS --safe --warning=error --without-K #-}
|
||||
|
||||
open import LogicalFormulae
|
||||
open import Groups.Groups
|
||||
open import Groups.Homomorphisms.Definition
|
||||
open import Groups.Definition
|
||||
open import Numbers.Naturals.Naturals
|
||||
open import Setoids.Orders
|
||||
open import Setoids.Setoids
|
||||
open import Functions
|
||||
open import Sets.EquivalenceRelations
|
||||
open import Rings.Definition
|
||||
open import Rings.Homomorphisms.Definition
|
||||
open import Groups.Homomorphisms.Lemmas
|
||||
open import Rings.IntegralDomains.Definition
|
||||
|
||||
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
|
||||
module Rings.PrincipalIdealDomains.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) where
|
||||
module Rings.PrincipalIdealDomains.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} {R : Ring S _+_ _*_} (intDom : IntegralDomain R) where
|
||||
|
||||
open import Rings.Ideals.Principal.Definition R
|
||||
open import Rings.Ideals.Definition R
|
||||
|
53
Rings/PrincipalIdealDomains/Lemmas.agda
Normal file
53
Rings/PrincipalIdealDomains/Lemmas.agda
Normal file
@@ -0,0 +1,53 @@
|
||||
{-# OPTIONS --safe --warning=error --without-K #-}
|
||||
|
||||
open import LogicalFormulae
|
||||
open import Sets.EquivalenceRelations
|
||||
open import Setoids.Setoids
|
||||
open import Rings.Definition
|
||||
open import Rings.PrincipalIdealDomains.Definition
|
||||
open import Rings.IntegralDomains.Definition
|
||||
open import Rings.Ideals.Maximal.Definition
|
||||
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
|
||||
module Rings.PrincipalIdealDomains.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} {R : Ring S _+_ _*_} (intDom : IntegralDomain R) (pid : {c : _} → PrincipalIdealDomain intDom {c}) where
|
||||
|
||||
open import Rings.Ideals.Definition R
|
||||
open import Rings.Irreducibles.Definition intDom
|
||||
open import Rings.Ideals.Principal.Definition R
|
||||
open import Rings.Divisible.Definition R
|
||||
open import Rings.Associates.Lemmas intDom
|
||||
open import Rings.Ideals.Lemmas R
|
||||
open import Rings.Units.Definition R
|
||||
open import Rings.Irreducibles.Lemmas intDom
|
||||
open import Rings.Units.Lemmas R
|
||||
|
||||
open Ring R
|
||||
open Setoid S
|
||||
open Equivalence eq
|
||||
|
||||
irreducibleImpliesMaximalIdeal : (r : A) → Irreducible r → {d : _} → MaximalIdeal (generatedIdeal r) {d}
|
||||
MaximalIdeal.notContained (irreducibleImpliesMaximalIdeal r irred {d}) = 1R
|
||||
MaximalIdeal.notContainedIsNotContained (irreducibleImpliesMaximalIdeal r irred {d}) = Irreducible.nonunit irred
|
||||
MaximalIdeal.isMaximal (irreducibleImpliesMaximalIdeal r irred {d}) {biggerPred} bigger biggerContains (outsideR , (biggerContainsOutside ,, notInR)) {x} = biggerPrincipal' (unitImpliesGeneratedIdealEverything w {x})
|
||||
where
|
||||
biggerGen : A
|
||||
biggerGen = PrincipalIdeal.generator (pid bigger)
|
||||
biggerPrincipal : {x : A} → biggerPred x → biggerGen ∣ x
|
||||
biggerPrincipal = PrincipalIdeal.genGenerates (pid bigger)
|
||||
bp : biggerPred biggerGen
|
||||
bp = PrincipalIdeal.genIsInIdeal (pid bigger)
|
||||
biggerPrincipal' : {x : A} → biggerGen ∣ x → biggerPred x
|
||||
biggerPrincipal' {y} bg|y = memberDividesImpliesMember bigger bp bg|y
|
||||
u : biggerGen ∣ r
|
||||
u = biggerPrincipal (biggerContains (1R , transitive *Commutative identIsIdent))
|
||||
biggerGenNonzero : biggerGen ∼ 0R → False
|
||||
biggerGenNonzero bg=0 = notInR (Ideal.isSubset (generatedIdeal r) (symmetric t) (Ideal.containsIdentity (generatedIdeal r)))
|
||||
where
|
||||
t : outsideR ∼ 0R
|
||||
t with biggerPrincipal {outsideR} biggerContainsOutside
|
||||
... | mult , pr = transitive (symmetric pr) (transitive (*WellDefined bg=0 reflexive) (transitive *Commutative timesZero))
|
||||
v : (r ∣ biggerGen) → False
|
||||
v r|bg with mutualDivisionImpliesAssociate r|bg u (Irreducible.nonzero irred)
|
||||
v r|bg | assoc = notInR (associateImpliesGeneratedIdealsEqual' assoc (PrincipalIdeal.genGenerates (pid bigger) biggerContainsOutside))
|
||||
w : Unit biggerGen
|
||||
w = dividesIrreducibleImpliesUnit irred u v
|
@@ -1,17 +1,11 @@
|
||||
{-# OPTIONS --safe --warning=error --without-K #-}
|
||||
|
||||
open import LogicalFormulae
|
||||
open import Groups.Groups
|
||||
open import Groups.Homomorphisms.Definition
|
||||
open import Groups.Definition
|
||||
open import Numbers.Naturals.Naturals
|
||||
open import Setoids.Orders
|
||||
open import Setoids.Setoids
|
||||
open import Functions
|
||||
open import Sets.EquivalenceRelations
|
||||
open import Rings.Definition
|
||||
open import Rings.Homomorphisms.Definition
|
||||
open import Groups.Homomorphisms.Lemmas
|
||||
|
||||
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
|
||||
|
22
Rings/Units/Lemmas.agda
Normal file
22
Rings/Units/Lemmas.agda
Normal file
@@ -0,0 +1,22 @@
|
||||
{-# OPTIONS --safe --warning=error --without-K #-}
|
||||
|
||||
open import LogicalFormulae
|
||||
open import Setoids.Setoids
|
||||
open import Functions
|
||||
open import Sets.EquivalenceRelations
|
||||
open import Rings.Definition
|
||||
open import Rings.Homomorphisms.Definition
|
||||
|
||||
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
|
||||
|
||||
module Rings.Units.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) where
|
||||
|
||||
open import Rings.Units.Definition R
|
||||
open import Rings.Ideals.Definition R
|
||||
|
||||
open Ring R
|
||||
open Setoid S
|
||||
open Equivalence eq
|
||||
|
||||
unitImpliesGeneratedIdealEverything : {x : A} → Unit x → {y : A} → generatedIdealPred x y
|
||||
unitImpliesGeneratedIdealEverything {x} (a , xa=1) {y} = (a * y) , transitive *Associative (transitive (*WellDefined xa=1 reflexive) identIsIdent)
|
Reference in New Issue
Block a user