Built with doc-gen4, running Lean4. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓to navigate, Ctrl+🖱️to focus. On Mac, use Cmdinstead of Ctrl.
import Pretty.Supports.Basic

/--
Cost factory interface definition (Figure 8)
-/
structure 
Factory: {α : Type} → (le : ααBool) → (concat : ααα) → (text : α) → (nl : α) → (∀ {c c' l : }, c c'le (text c l) (text c' l) = true) → (∀ {i i' : }, i i'le (nl i) (nl i') = true) → (∀ {cost₁ cost₂ cost₃ cost₄ : α}, le cost₁ cost₂ = truele cost₃ cost₄ = truele (concat cost₁ cost₃) (concat cost₂ cost₄) = true) → (∀ {c₁ c₂ c₃ : α}, le c₁ c₂ = truele c₂ c₃ = truele c₁ c₃ = true) → (∀ {c₁ c₂ : α}, le c₁ c₂ = truele c₂ c₁ = truec₁ = c₂) → (∀ (c₁ c₂ : α), le c₁ c₂ = true le c₂ c₁ = true) → Factory α
Factory
(
α: Type
α
:
Type: Type 1
Type
) where
le: {α : Type} → Factory αααBool
le
:
α: Type
α
α: Type
α
Bool: Type
Bool
concat: {α : Type} → Factory αααα
concat
:
α: Type
α
α: Type
α
α: Type
α
text: {α : Type} → Factory αα
text
:
: Type
: Type
α: Type
α
nl: {α : Type} → Factory αα
nl
:
: Type
α: Type
α
W: {α : Type} → Factory α
W
:
: Type
text_monotonic: ∀ {α : Type} (self : Factory α) {c c' l : }, c c'Factory.le self (Factory.text self c l) (Factory.text self c' l) = true
text_monotonic
:
c: ?m.33
c
c': ?m.39
c'
le: ααBool
le
(
text: α
text
c: ?m.33
c
l: ?m.95
l
) (
text: α
text
c': ?m.39
c'
l: ?m.95
l
)
nl_monotonic: ∀ {α : Type} (self : Factory α) {i i' : }, i i'Factory.le self (Factory.nl self i) (Factory.nl self i') = true
nl_monotonic
:
i: ?m.172
i
i': ?m.178
i'
le: ααBool
le
(
nl: α
nl
i: ?m.172
i
) (
nl: α
nl
i': ?m.178
i'
)
concat_monotonic: ∀ {α : Type} (self : Factory α) {cost₁ cost₂ cost₃ cost₄ : α}, Factory.le self cost₁ cost₂ = trueFactory.le self cost₃ cost₄ = trueFactory.le self (Factory.concat self cost₁ cost₃) (Factory.concat self cost₂ cost₄) = true
concat_monotonic
:
le: ααBool
le
cost₁: ?m.249
cost₁
cost₂: ?m.254
cost₂
le: ααBool
le
cost₃: ?m.273
cost₃
cost₄: ?m.292
cost₄
le: ααBool
le
(
concat: ααα
concat
cost₁: ?m.249
cost₁
cost₃: ?m.273
cost₃
) (
concat: ααα
concat
cost₂: ?m.254
cost₂
cost₄: ?m.292
cost₄
)
le_trans: ∀ {α : Type} (self : Factory α) {c₁ c₂ c₃ : α}, Factory.le self c₁ c₂ = trueFactory.le self c₂ c₃ = trueFactory.le self c₁ c₃ = true
le_trans
:
le: ααBool
le
c₁: ?m.339
c₁
c₂: ?m.344
c₂
le: ααBool
le
c₂: ?m.344
c₂
c₃: ?m.363
c₃
le: ααBool
le
c₁: ?m.339
c₁
c₃: ?m.363
c₃
le_antisymm: ∀ {α : Type} (self : Factory α) {c₁ c₂ : α}, Factory.le self c₁ c₂ = trueFactory.le self c₂ c₁ = truec₁ = c₂
le_antisymm
:
le: ααBool
le
c₁: ?m.410
c₁
c₂: ?m.415
c₂
le: ααBool
le
c₂: ?m.415
c₂
c₁: ?m.410
c₁
c₁: ?m.410
c₁
=
c₂: ?m.415
c₂
le_total: ∀ {α : Type} (self : Factory α) (c₁ c₂ : α), Factory.le self c₁ c₂ = true Factory.le self c₂ c₁ = true
le_total
(
c₁: α
c₁
c₂: α
c₂
:
α: Type
α
) :
le: ααBool
le
c₁: α
c₁
c₂: α
c₂
le: ααBool
le
c₂: α
c₂
c₁: α
c₁