Weighted semirings #
We introduces weighted versions of nessesaray semiring and order instances with custom notation that mirror the Mathlib definitions almost one-to-one.
The reason for this is to simplify the instantiation of weighted version of already existing
structures. One such example is the Tropical semiring which works over ENat. ENat already has
instances for (almost) everything we need, however, the existing definitons are (ENat, 0, 1, +, *, ≤) while we need (ENat, ⊤, 0, min, +, ≥). One could create new instances for these that shadow
the previous, but suddenly one has to proof goals that look like 0 + 1 ≤ 1 where 0 can be either
0 or ⊤ and the ones can be 1 or 0 independently and ≤ can be either ≤ or ≥.
To simplify these, the new notation makes it very clear for the reader to see which is which, and
equally as important, makes it easier to simp away the weighted notation and get to the meat of
the proof.
Previous versions tried the prior approach; for some instances it took hundreds of lines and much turmoil, and some we deemed too complicated just because of the sheer confusion when mixing semirings.
Instances with this new approach are significantly shorter and lends themselves much more to automation.
Weighted variant of [KStar]
Equations
- WKStar.«term_⍟» = Lean.ParserDescr.trailingNode `WKStar.«term_⍟» 1024 1024 (Lean.ParserDescr.symbol "⍟")
Instances For
Equations
- «term𝟘» = Lean.ParserDescr.node `«term𝟘» 1024 (Lean.ParserDescr.symbol "𝟘")
Instances For
Equations
- «term𝟙» = Lean.ParserDescr.node `«term𝟙» 1024 (Lean.ParserDescr.symbol "𝟙")
Instances For
Equations
- «term_⨁_» = Lean.ParserDescr.trailingNode `«term_⨁_» 68 68 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⨁ ") (Lean.ParserDescr.cat `term 69))
Instances For
Equations
- «term_⨀_» = Lean.ParserDescr.trailingNode `«term_⨀_» 70 70 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⨀ ") (Lean.ParserDescr.cat `term 71))
Instances For
Equations
- «term_≼_» = Lean.ParserDescr.trailingNode `«term_≼_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≼ ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- «term_≺_» = Lean.ParserDescr.trailingNode `«term_≺_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≺ ") (Lean.ParserDescr.cat `term 51))
Instances For
Weighted variant of [Semiring]
Instances
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Instances For
Instances
Equations
Instances For
Equations
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- wadd : α → α → α
- wmul : α → α → α
- wone : α
- wzero : α
- wbot : α
- wωScottContinuous_wadd_right (a : α) (f : ℕ → α) (h : ∀ {a b : ℕ}, a ≤ b → f a ≼ f b) : WOmegaCompletePartialOrder.wωSup f ⋯ ⨁ a = WOmegaCompletePartialOrder.wωSup (fun (x : ℕ) => f x ⨁ a) ⋯
- wωScottContinuous_wadd_left (a : α) (f : ℕ → α) (h : ∀ {a b : ℕ}, a ≤ b → f a ≼ f b) : a ⨁ WOmegaCompletePartialOrder.wωSup f ⋯ = WOmegaCompletePartialOrder.wωSup (fun (x : ℕ) => a ⨁ f x) ⋯
- wωScottContinuous_wmul_right (a : α) (f : ℕ → α) (h : ∀ {a b : ℕ}, a ≤ b → f a ≼ f b) : WOmegaCompletePartialOrder.wωSup f ⋯ ⨀ a = WOmegaCompletePartialOrder.wωSup (fun (x : ℕ) => f x ⨀ a) ⋯
- wωScottContinuous_wmul_left (a : α) (f : ℕ → α) (h : ∀ {a b : ℕ}, a ≤ b → f a ≼ f b) : a ⨀ WOmegaCompletePartialOrder.wωSup f ⋯ = WOmegaCompletePartialOrder.wωSup (fun (x : ℕ) => a ⨀ f x) ⋯
Instances
Equations
Instances For
Equations
Instances For
Equations
- WOmegaContinuousNonUnitalSemiring.toOrderBot α = { bot := WOmegaContinuousNonUnitalSemiring.wbot, bot_le := ⋯ }
Instances For
Equations
- ⋯ = ⋯
Instances For
Equations
- ⋯ = ⋯
Instances For
Equations
Instances For
Equations
- ⋯ = ⋯
Instances For
Instances For
Equations
- ⋯ = ⋯
Instances For
Instances
Equations
Instances For
Equations
Instances For
Equations
- ⋯ = ⋯
Instances For
Equations
Instances For
Equations
- ⋯ = ⋯