ℤ[√d] #
The ring of integers adjoined with a square root of d : ℤ
.
After defining the norm, we show that it is a linearly ordered commutative ring, as well as an integral domain.
We provide the universal property, that ring homomorphisms ℤ√d →+* R
correspond
to choices of square roots of d
in R
.
Equations
The ring of integers adjoined with a square root of d
.
These have the form a + b √d
where a b : ℤ
. The components
are called re
and im
by analogy to the negative d
case.
Equations
- «termℤ√_» = Lean.ParserDescr.node `«termℤ√_» 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "ℤ√") (Lean.ParserDescr.cat `term 100))
Instances For
The zero of the ring
Equations
- Zsqrtd.instZero = { zero := Zsqrtd.ofInt 0 }
Equations
- Zsqrtd.instInhabited = { default := 0 }
The one of the ring
Equations
- Zsqrtd.instOne = { one := Zsqrtd.ofInt 1 }
Equations
Equations
- Zsqrtd.addGroupWithOne = AddGroupWithOne.mk ⋯ SubNegMonoid.zsmul ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
"Generalized" nonneg
. nonnegg c d x y
means a √c + b √d ≥ 0
;
we are interested in the case c = 1
but this is more symmetric
Equations
- Zsqrtd.Nonnegg c d (Int.ofNat a) (Int.ofNat b) = True
- Zsqrtd.Nonnegg c d (Int.ofNat a) (Int.negSucc b) = Zsqrtd.SqLe (b + 1) c a d
- Zsqrtd.Nonnegg c d (Int.negSucc a) (Int.ofNat b) = Zsqrtd.SqLe (a + 1) d b c
- Zsqrtd.Nonnegg c d (Int.negSucc a) (Int.negSucc a_1) = False
Instances For
Equations
- Zsqrtd.normMonoidHom = { toFun := Zsqrtd.norm, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Nonnegativity of an element of ℤ√d
.
Equations
- { re := a, im := b }.Nonneg = Zsqrtd.Nonnegg d 1 a b
Instances For
Equations
- Zsqrtd.instLECastInt = { le := fun (a b : ℤ√↑d) => (b - a).Nonneg }
Equations
- Zsqrtd.instLTCastInt = { lt := fun (a b : ℤ√↑d) => ¬b ≤ a }
Equations
- { re := a, im := b }.decidableNonneg = Zsqrtd.decidableNonnegg d 1 a b
Equations
- x✝¹.decidableLE x✝ = (x✝ - x✝¹).decidableNonneg
Equations
The unique RingHom
from ℤ√d
to a ring R
, constructed by replacing √d
with the provided
root. Conversely, this associates to every mapping ℤ√d →+* R
a value of √d
in R
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The kernel of the norm map on ℤ√d
equals the submonoid of unitary elements.