module Order.Diagram.Fixpoint {o â„“} (P : Poset o â„“) where
open Order.Reasoning P
Least fixpoints🔗
Let be a poset, and be a monotone map. We say that has a least fixpoint if there exists some such that and for every other such that
record is-least-fixpoint (f : Posets.Hom P P) (x : Ob) : Type (o ⊔ ℓ) where
no-eta-equality
field
: f .hom x ≡ x
fixed : ∀ (y : Ob) → f .hom y ≡ y → x ≤ y
least
record Least-fixpoint (f : Posets.Hom P P) : Type (o ⊔ ℓ) where
no-eta-equality
field
: Ob
fixpoint : is-least-fixpoint f fixpoint
has-least-fixpoint open is-least-fixpoint has-least-fixpoint public
open is-least-fixpoint
Least fixed points are unique, so the type of least fixpoints of is a proposition.
least-fixpoint-unique: ∀ {f : Posets.Hom P P} {x y}
→ is-least-fixpoint f x → is-least-fixpoint f y
→ x ≡ y
=
least-fixpoint-unique x-fix y-fix (x-fix .least _ (y-fix .fixed)) (y-fix .least _ (x-fix .fixed))
≤-antisym
is-least-fixpoint-is-prop: ∀ {f : Posets.Hom P P} {x}
→ is-prop (is-least-fixpoint f x)
{f = f} {x = x} p q i .fixed =
is-least-fixpoint-is-prop (f .hom x) x (p .fixed) (q .fixed) i
Ob-is-set {f = f} {x = x} p q i .least y y-fix =
is-least-fixpoint-is-prop
is-prop→pathp(λ i → ≤-thin)
(p .least y y-fix) (q .least y y-fix) i
Least-fixpoint-is-prop: ∀ {f : Posets.Hom P P}
→ is-prop (Least-fixpoint f)
{f = f} p q = p≡q where
Least-fixpoint-is-prop module p = Least-fixpoint p
module q = Least-fixpoint q
: p.fixpoint ≡ q.fixpoint
path = least-fixpoint-unique p.has-least-fixpoint q.has-least-fixpoint
path
: p ≡ q
p≡q .Least-fixpoint.fixpoint = path i
p≡q i .Least-fixpoint.has-least-fixpoint =
p≡q i (λ i → is-least-fixpoint-is-prop {x = path i})
is-prop→pathp .has-least-fixpoint q.has-least-fixpoint i p