ZFC Integers #
This file provides a construction of the integers in ZFC based on the construction of natural
numbers. It follows the usual construction of integers as equivalence classes of pairs of natural
numbers.
The theory also comes with usual theorems and arithmetic operations on integers and wraps everything
in a commutative ring structure.
Finally, we show that that the ZFInt type is isomorphic to the type of elements contained in
ZFSet.Int type using the Schröder-Bernstein theorem.
Equations
- ZFSet.instSetoidZFNatZFNat = { r := ZFSet.zrel, iseqv := ZFSet.zrel_eq }
Imported ZFLean declaration.
Equations
Instances For
Imported ZFLean declaration.
Equations
Instances For
Imported ZFLean declaration.
Equations
Instances For
Imported ZFLean declaration.
Equations
Instances For
Equations
- ZFSet.ZFInt.instZero = { zero := ZFSet.ZFInt.zero }
Equations
- ZFSet.ZFInt.instOne = { one := ZFSet.ZFInt.one }
Imported ZFLean declaration.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ZFSet.ZFInt.instAdd = { add := ZFSet.ZFInt.add }
Imported ZFLean declaration.
Equations
- n.neg = Quotient.liftOn n (fun (x : ZFSet.ZFNat × ZFSet.ZFNat) => ZFSet.ZFInt.mk (x.2, x.1)) ZFSet.ZFInt.neg._proof_1
Instances For
Equations
- ZFSet.ZFInt.instNeg = { neg := ZFSet.ZFInt.neg }
Imported ZFLean declaration.
Equations
- ZFSet.ZFInt.instSub = { sub := ZFSet.ZFInt.sub }
Integer multiplication in the ZF integer model.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Imported ZFLean declaration.
Equations
- ZFSet.ZFInt.instMul = { mul := ZFSet.ZFInt.mul }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- ZFSet.ZFInt.intLe = { le := fun (x y : ZFSet.ZFInt) => x < y ∨ x = y }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Embeds a ZF natural number as a ZF integer.
Equations
Instances For
Encodes a Lean integer as a ZF set.
Equations
- ZFSet.ofInt (Int.ofNat n_1) = ∅.pair ↑↑n_1
- ZFSet.ofInt (Int.negSucc n_1) = (↑(↑n_1 + 1)).pair ∅
Instances For
Imported ZFLean declaration.
Equations
- ZFSet.toZFInt (Int.ofNat n_1) = ZFSet.ZFInt.mk (0, ↑n_1)
- ZFSet.toZFInt (Int.negSucc n_1) = ZFSet.ZFInt.mk (↑n_1 + 1, 0)
Instances For
A pre-set encoding of Lean integers.
Equations
- ZFSet.PInt' = PSet.mk (ULift.{?u.1, 0} ℤ) fun (n : ULift.{?u.1, 0} ℤ) => ZFSet.ofInt'✝ n.down
Instances For
Imported ZFLean declaration.
Equations
Instances For
First projection from the Kuratowski ordered pair encoding.
Instances For
Embedding from ZF integers into the ZF integer set.
Equations
- ZFSet.ZFInt.EmbeddingZFIntInt = { toFun := ZFSet.ZFInt.into, inj' := ZFSet.ZFInt.into.injective }
Instances For
Imported ZFLean declaration.
Equations
- ZFSet.ZFInt.EmbeddingIntZFInt = { toFun := ZFSet.ZFInt.outof✝, inj' := ZFSet.ZFInt.outof.injective }
Instances For
Imported ZFLean declaration.
Equations
- ZFSet.instLTSubtypeMemInt = { lt := fun (x y : ↥ZFSet.Int) => have f := Classical.choice ZFSet.instLTSubtypeMemInt._proof_1; f.invFun x < f.invFun y }
The Schröder-Bernstein theorem provides a bijection between ZFInt and {x // x ∈ Int}, but we
need an isomorphism in order to preserve the order structure, so that the order on ZFInt and
{x // x ∈ Int} is the same.
The type ZFInt correctly represents the set ZFSet.Int.
NOTE: There is a constructive proof of the Schröder-Bernstein theorem stating
the equi-computability of sets. It is called the Myhill isomorphism and applies
to countable sets only.
Equations
- ZFSet.instEquivZFIntInt = match Classical.choice ZFSet.ZFInt.exists_mono_bij_zero_eq with | ⟨f, ⋯⟩ => Equiv.ofBijective f bij
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.