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.Defs.Basic
import Pretty.Claims.Render
import Pretty.Supports.FactoryMath

/-!
## Theorems about the measure computation/rendering relation ($⇓_\mathbb{M}$)
-/

/--
Determinism of the measure computation relation (Section 5.3)
-/
theorem 
MeasRender_deterministic: ∀ {α : Type} {d : Doc} {c i : } {F : Factory α} {m₁ m₂ : Meas}, MeasRender F d c i m₁MeasRender F d c i m₂m₁ = m₂
MeasRender_deterministic
{
F: Factory α
F
:
Factory: TypeType
Factory
α: ?m.3
α
} {
m₁: Meas
m₁
m₂: Meas
m₂
:
Meas: {α : Type} → Type
Meas
} (
h₁: MeasRender F d c i m₁
h₁
: @
MeasRender: {α : Type} → Factory αDocMeasProp
MeasRender
α: ?m.3
α
F: Factory α
F
d: ?m.15
d
c: ?m.27
c
i: ?m.39
i
m₁: Meas
m₁
) (
h₂: MeasRender F d c i m₂
h₂
: @
MeasRender: {α : Type} → Factory αDocMeasProp
MeasRender
α: ?m.3
α
F: Factory α
F
d: ?m.15
d
c: ?m.27
c
i: ?m.39
i
m₂: Meas
m₂
) :
m₁: Meas
m₁
=
m₂: Meas
m₂
:=

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

F: Factory α

m₁, m₂: Meas

h₁: MeasRender F d c i m₁

h₂: MeasRender F d c i m₂


m₁ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

c✝, i✝:

s✝: String

m₂: Meas

h₂: MeasRender F (Doc.text s✝) c✝ i✝ m₂


text
{ last := c✝ + String.length s✝, cost := Factory.text F c✝ (String.length s✝), doc := Doc.text s✝, x := c✝ + String.length s✝, y := i✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

c✝, i✝:

m₂: Meas

h₂: MeasRender F Doc.nl c✝ i✝ m₂


nl
{ last := i✝, cost := Factory.nl F i✝, doc := Doc.nl, x := max c✝ i✝, y := i✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝: Meas

d₂✝: Doc

m₂✝, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝

h₂✝: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h✝: m✝ = Meas.concat F m₁✝ m₂✝

h₁_ih✝: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝ = m₂

h₂_ih✝: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝.last i✝ m₂m₂✝ = m₂

m₂: Meas

h₂: MeasRender F (Doc.concat d₁✝ d₂✝) c✝ i✝ m₂


concat
m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d✝: Doc

c✝, i✝, n✝, last✝:

cost✝: α

x✝, y✝:

h✝: MeasRender F d✝ c✝ (i✝ + n✝) { last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ }

h_ih✝: ∀ {m₂ : Meas}, MeasRender F d✝ c✝ (i✝ + n✝) m₂{ last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.nest n✝ d✝) c✝ i✝ m₂


nest
{ last := last✝, cost := cost✝, doc := Doc.nest n✝ d✝, x := x✝, y := y✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d✝: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d✝ c✝ c✝ { last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ }

h_ih✝: ∀ {m₂ : Meas}, MeasRender F d✝ c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.align d✝) c✝ i✝ m₂


align
{ last := last✝, cost := cost✝, doc := Doc.align d✝, x := x✝, y := max i✝ y✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁, m₂: Meas

h₁: MeasRender F d c i m₁

h₂: MeasRender F d c i m₂


m₁ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

c✝, i✝:

s✝: String

m₂: Meas

h₂: MeasRender F (Doc.text s✝) c✝ i✝ m₂


{ last := c✝ + String.length s✝, cost := Factory.text F c✝ (String.length s✝), doc := Doc.text s✝, x := c✝ + String.length s✝, y := i✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

c✝, i✝:

s✝: String

m₂: Meas

h₂: MeasRender F (Doc.text s✝) c✝ i✝ m₂


{ last := c✝ + String.length s✝, cost := Factory.text F c✝ (String.length s✝), doc := Doc.text s✝, x := c✝ + String.length s✝, y := i✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

c✝, i✝:


nl
{ last := i✝, cost := Factory.nl F i✝, doc := Doc.nl, x := max c✝ i✝, y := i✝ } = { last := i✝, cost := Factory.nl F i✝, doc := Doc.nl, x := max c✝ i✝, y := i✝ }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

F: Factory α

m₁, m₂: Meas

h₁: MeasRender F d c i m₁

h₂: MeasRender F d c i m₂


m₁ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d✝: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d✝ c✝ c✝ { last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d✝ c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.align d✝) c✝ i✝ m₂


{ last := last✝, cost := cost✝, doc := Doc.align d✝, x := x✝, y := max i✝ y✝ } = m₂
α: Type

d✝: Doc

c, i:

F: Factory α

m₁: Meas

d: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d c✝ c✝ { last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.align d) c✝ i✝ m₂


{ last := last✝, cost := cost✝, doc := Doc.align d, x := x✝, y := max i✝ y✝ } = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d✝: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d✝ c✝ c✝ { last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d✝ c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.align d✝) c✝ i✝ m₂


{ last := last✝, cost := cost✝, doc := Doc.align d✝, x := x✝, y := max i✝ y✝ } = m₂
α: Type

d✝: Doc

c, i:

F: Factory α

m₁: Meas

d: Doc

c✝, i✝, n✝, last✝¹:

cost✝¹: α

x✝¹, y✝¹:

h✝¹: MeasRender F d c✝ (i✝ + n✝) { last := last✝¹, cost := cost✝¹, doc := d, x := x✝¹, y := y✝¹ }

ih: ∀ {m₂ : Meas}, MeasRender F d c✝ (i✝ + n✝) m₂{ last := last✝¹, cost := cost✝¹, doc := d, x := x✝¹, y := y✝¹ } = m₂

last✝:

cost✝: α

x✝, y✝:

h✝: MeasRender F d c✝ (i✝ + n✝) { last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ }


nest
{ last := last✝¹, cost := cost✝¹, doc := Doc.nest n✝ d, x := x✝¹, y := y✝¹ } = { last := last✝, cost := cost✝, doc := Doc.nest n✝ d, x := x✝, y := y✝ }
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d✝: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d✝ c✝ c✝ { last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d✝ c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.align d✝) c✝ i✝ m₂


{ last := last✝, cost := cost✝, doc := Doc.align d✝, x := x✝, y := max i✝ y✝ } = m₂
α: Type

d✝: Doc

c, i:

F: Factory α

m₁: Meas

d: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d c✝ c✝ { last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ } = m₂

last₂:

cost₂: α

x₂, y₂:

h₂: MeasRender F d c✝ c✝ { last := last₂, cost := cost₂, doc := d, x := x₂, y := y₂ }


align
{ last := last✝, cost := cost✝, doc := Doc.align d, x := x✝, y := max i✝ y✝ } = { last := last₂, cost := cost₂, doc := Doc.align d, x := x₂, y := max i✝ y₂ }
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d✝: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d✝ c✝ c✝ { last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d✝ c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d✝, x := x✝, y := y✝ } = m₂

m₂: Meas

h₂: MeasRender F (Doc.align d✝) c✝ i✝ m₂


{ last := last✝, cost := cost✝, doc := Doc.align d✝, x := x✝, y := max i✝ y✝ } = m₂
α: Type

d✝: Doc

c, i:

F: Factory α

m₁: Meas

d: Doc

c✝, i✝, n✝, last✝:

cost✝: α

x✝, y✝:

h✝: MeasRender F d c✝ (i✝ + n✝) { last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d c✝ (i✝ + n✝) m₂{ last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ } = m₂

last₂:

cost₂: α

x₂, y₂:

h₂: MeasRender F d c✝ (i✝ + n✝) { last := last₂, cost := cost₂, doc := d, x := x₂, y := y₂ }


nest
{ last := last✝, cost := cost✝, doc := Doc.nest n✝ d, x := x✝, y := y✝ } = { last := last₂, cost := cost₂, doc := Doc.nest n✝ d, x := x₂, y := y₂ }
α: Type

d✝: Doc

c, i:

F: Factory α

m₁: Meas

d: Doc

c✝, last✝:

cost✝: α

x✝, y✝, i✝:

h✝: MeasRender F d c✝ c✝ { last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ }

ih: ∀ {m₂ : Meas}, MeasRender F d c✝ c✝ m₂{ last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ } = m₂

h₂: MeasRender F d c✝ c✝ { last := last✝, cost := cost✝, doc := d, x := x✝, y := y✝ }


align.refl
{ last := last✝, cost := cost✝, doc := Doc.align d, x := x✝, y := max i✝ y✝ } = { last := last✝, cost := cost✝, doc := Doc.align d, x := x✝, y := max i✝ y✝ }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

F: Factory α

m₁, m₂: Meas

h₁: MeasRender F d c i m₁

h₂: MeasRender F d c i m₂


m₁ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝: Meas

d₂✝: Doc

m₂✝, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝

h₂✝: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h✝: m✝ = Meas.concat F m₁✝ m₂✝

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝.last i✝ m₂m₂✝ = m₂

m₂: Meas

h₂: MeasRender F (Doc.concat d₁✝ d₂✝) c✝ i✝ m₂


m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝¹: Meas

d₂✝: Doc

m₂✝¹, m✝: Meas

h₁✝¹: MeasRender F d₁✝ c✝ i✝ m₁✝¹

h₂✝¹: MeasRender F d₂✝ m₁✝¹.last i✝ m₂✝¹

h✝¹: m✝ = Meas.concat F m₁✝¹ m₂✝¹

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝¹ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝¹.last i✝ m₂m₂✝¹ = m₂

m₂, m₁✝, m₂✝: Meas

h₂✝: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝

h✝: m₂ = Meas.concat F m₁✝ m₂✝


concat
m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝: Meas

d₂✝: Doc

m₂✝, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝

h₂✝: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h✝: m✝ = Meas.concat F m₁✝ m₂✝

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝.last i✝ m₂m₂✝ = m₂

m₂: Meas

h₂: MeasRender F (Doc.concat d₁✝ d₂✝) c✝ i✝ m₂


m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝¹: Meas

d₂✝: Doc

m₂✝¹, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝¹

h₂✝: MeasRender F d₂✝ m₁✝¹.last i✝ m₂✝¹

h✝: m✝ = Meas.concat F m₁✝¹ m₂✝¹

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝¹ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝¹.last i✝ m₂m₂✝¹ = m₂

m₂, m₁✝, m₂✝: Meas

h₂: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h₁: MeasRender F d₁✝ c✝ i✝ m₁✝

h: m₂ = Meas.concat F m₁✝ m₂✝


m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝: Meas

d₂✝: Doc

m₂✝¹, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝

h₂✝: MeasRender F d₂✝ m₁✝.last i✝ m₂✝¹

h✝: m✝ = Meas.concat F m₁✝ m₂✝¹

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝.last i✝ m₂m₂✝¹ = m₂

m₂, m₂✝: Meas

h₂: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h₁: MeasRender F d₁✝ c✝ i✝ m₁✝

h: m₂ = Meas.concat F m₁✝ m₂✝


refl
m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝¹: Meas

d₂✝: Doc

m₂✝¹, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝¹

h₂✝: MeasRender F d₂✝ m₁✝¹.last i✝ m₂✝¹

h✝: m✝ = Meas.concat F m₁✝¹ m₂✝¹

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝¹ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝¹.last i✝ m₂m₂✝¹ = m₂

m₂, m₁✝, m₂✝: Meas

h₂: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h₁: MeasRender F d₁✝ c✝ i✝ m₁✝

h: m₂ = Meas.concat F m₁✝ m₂✝


m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝: Meas

d₂✝: Doc

m₂✝, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝

h₂✝: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h✝: m✝ = Meas.concat F m₁✝ m₂✝

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝.last i✝ m₂m₂✝ = m₂

m₂: Meas

h₁: MeasRender F d₁✝ c✝ i✝ m₁✝

h₂: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h: m₂ = Meas.concat F m₁✝ m₂✝


refl.refl
m✝ = m₂
α: Type

d: Doc

c, i:

F: Factory α

m₁: Meas

d₁✝: Doc

c✝, i✝:

m₁✝¹: Meas

d₂✝: Doc

m₂✝¹, m✝: Meas

h₁✝: MeasRender F d₁✝ c✝ i✝ m₁✝¹

h₂✝: MeasRender F d₂✝ m₁✝¹.last i✝ m₂✝¹

h✝: m✝ = Meas.concat F m₁✝¹ m₂✝¹

ihₗ: ∀ {m₂ : Meas}, MeasRender F d₁✝ c✝ i✝ m₂m₁✝¹ = m₂

ihᵣ: ∀ {m₂ : Meas}, MeasRender F d₂✝ m₁✝¹.last i✝ m₂m₂✝¹ = m₂

m₂, m₁✝, m₂✝: Meas

h₂: MeasRender F d₂✝ m₁✝.last i✝ m₂✝

h₁: MeasRender F d₁✝ c✝ i✝ m₁✝

h: m₂ = Meas.concat F m₁✝ m₂✝


m✝ = m₂

Goals accomplished! 🐙
/-- Correctness of the measure computation relation when it results in one line (first part of Theorem 5.3) -/ theorem
MeasRender_single_correct: ∀ {α : Type} {d : Doc} {c i : } {s : String} (F : Factory α), Render d c i { fst := s, rst := [] }cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
MeasRender_single_correct
(
F: Factory α
F
:
Factory: TypeType
Factory
α: ?m.8192
α
) (
h_render: Render d c i { fst := s, rst := [] }
h_render
:
Render: DocLayoutProp
Render
d: ?m.8198
d
c: ?m.8204
c
i: ?m.8210
i
s: ?m.8218
s
,
[]: List ?m.8226
[]
⟩) : ∃
cost: ?m.8233
cost
y: ?m.8238
y
,
MeasRender: {α : Type} → Factory αDocMeasProp
MeasRender
F: Factory α
F
d: ?m.8198
d
c: ?m.8204
c
i: ?m.8210
i
c: ?m.8204
c
+
s: ?m.8218
s
.
length: String
length
,
cost: ?m.8233
cost
,
d: ?m.8198
d
,
c: ?m.8204
c
+
s: ?m.8218
s
.
length: String
length
,
y: ?m.8238
y
⟩ :=

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

s✝: String

c, i:

s: String

h_render: Render (Doc.text s✝) c i { fst := s, rst := [] }


text
cost y, MeasRender F (Doc.text s✝) c i { last := c + String.length s, cost := cost, doc := Doc.text s✝, x := c + String.length s, y := y }
α: Type

F: Factory α

c, i:

s: String

h_render: Render Doc.nl c i { fst := s, rst := [] }


nl
cost y, MeasRender F Doc.nl c i { last := c + String.length s, cost := cost, doc := Doc.nl, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

d₁_ih✝: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

d₂_ih✝: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := [] }


concat
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

d_ih✝: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

d_ih✝: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


align
cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

d₁_ih✝: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

d₂_ih✝: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.choice d₁✝ d₂✝) c i { fst := s, rst := [] }


choice
cost y, MeasRender F (Doc.choice d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.choice d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

s✝: String

c, i:

s: String

h_render: Render (Doc.text s✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.text s✝) c i { last := c + String.length s, cost := cost, doc := Doc.text s✝, x := c + String.length s, y := y }
α: Type

F: Factory α

s✝: String

c, i:

s: String

h_render: Render (Doc.text s✝) c i { fst := s, rst := [] }


MeasRender F (Doc.text s✝) c i { last := c + String.length s, cost := Factory.text F c (String.length s), doc := Doc.text s✝, x := c + String.length s, y := i }
α: Type

F: Factory α

s✝: String

c, i:

s: String

h_render: Render (Doc.text s✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.text s✝) c i { last := c + String.length s, cost := cost, doc := Doc.text s✝, x := c + String.length s, y := y }
α: Type

F: Factory α

s✝: String

c, i:


text
MeasRender F (Doc.text s✝) c i { last := c + String.length s✝, cost := Factory.text F c (String.length s✝), doc := Doc.text s✝, x := c + String.length s✝, y := i }
α: Type

F: Factory α

s✝: String

c, i:

s: String

h_render: Render (Doc.text s✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.text s✝) c i { last := c + String.length s, cost := cost, doc := Doc.text s✝, x := c + String.length s, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

c, i:

s: String

h_render: Render Doc.nl c i { fst := s, rst := [] }


cost y, MeasRender F Doc.nl c i { last := c + String.length s, cost := cost, doc := Doc.nl, x := c + String.length s, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h✝: Render d✝ c (i + n✝) { fst := s, rst := [] }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c (i + n✝) { fst := s, rst := [] }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c (i + n✝) { fst := s, rst := [] }

cost: α

y:

hh: MeasRender F d✝ c (i + n✝) { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c (i + n✝) { fst := s, rst := [] }

cost: α

y:

hh: MeasRender F d✝ c (i + n✝) { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }


nest
MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c (i + n✝) { fst := s, rst := [] }

cost: α

y:

hh: MeasRender F d✝ c (i + n✝) { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }


nest.h
MeasRender F d✝ c (i + n✝) { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := c + String.length s, cost := cost, doc := Doc.nest n✝ d✝, x := c + String.length s, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h✝: Render d✝ c c { fst := s, rst := [] }


align
cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c c { fst := s, rst := [] }


align
cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c c { fst := s, rst := [] }

cost: α

y:

hh: MeasRender F d✝ c c { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }


align
cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c c { fst := s, rst := [] }

cost: α

y:

hh: MeasRender F d✝ c c { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }


align
MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := max i y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h: Render d✝ c c { fst := s, rst := [] }

cost: α

y:

hh: MeasRender F d✝ c c { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }


align.h
MeasRender F d✝ c c { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String}, Render d✝ c i { fst := s, rst := [] }cost y, MeasRender F d✝ c i { last := c + String.length s, cost := cost, doc := d✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.align d✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.align d✝) c i { last := c + String.length s, cost := cost, doc := Doc.align d✝, x := c + String.length s, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

L: Layout

h_layout: { fst := s, rst := [] } = L

h_render: Render (Doc.concat d₁✝ d₂✝) c i L


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s, s✝, t✝: String

ts✝: List String

h₁✝: Render d₁✝ c i { fst := s✝, rst := [] }

h₂✝: Render d₂✝ (c + String.length s✝) i { fst := t✝, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s✝ ++ t✝, rst := ts✝ }


concat_one
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

ss✝: List String

slast✝, s✝, t✝: String

ts✝: List String

h_non_empty✝: ss✝ []

h_last✝: slast✝ = List.getLast ss✝ h_non_empty✝

h₂✝: Render d₂✝ (String.length slast✝) i { fst := t✝, rst := ts✝ }

h₁✝: Render d₁✝ c i { fst := s✝, rst := ss✝ }

h_layout: { fst := s, rst := [] } = { fst := s✝, rst := List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝ }


concat_multi
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s, s₁, s₂: String

ts✝: List String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s₁ ++ s₂, rst := ts✝ }


cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }


refl
cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length (s₁ ++ s₂), cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s, s₁, s₂: String

ts✝: List String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s₁ ++ s₂, rst := ts✝ }


cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }


refl
cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length (s₁ ++ s₂), cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s, s₁, s₂: String

ts✝: List String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s₁ ++ s₂, rst := ts✝ }


cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl
cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length (s₁ ++ s₂), cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s, s₁, s₂: String

ts✝: List String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s₁ ++ s₂, rst := ts✝ }


cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl
MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s, s₁, s₂: String

ts✝: List String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s₁ ++ s₂, rst := ts✝ }


cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl
MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


{ last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s, s₁, s₂: String

ts✝: List String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := ts✝ }

h_layout: { fst := s, rst := [] } = { fst := s₁ ++ s₂, rst := ts✝ }


cost y, MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁ d₂, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

h_ans: { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl
MeasRender F (Doc.concat d₁ d₂) c i { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ }
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

h_ans: { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl.h₁
MeasRender F d₁ c i ?refl.m₁
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

h_ans: { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl.h₂
MeasRender F d₂ ?refl.m₁.last i ?refl.m₂
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

h_ans: { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl.h
{ last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F ?refl.m₁ ?refl.m₂
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

h_ans: { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl.m₁
Meas
α: Type

F: Factory α

d₁, d₂: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁ c i { fst := s, rst := [] }cost y, MeasRender F d₁ c i { last := c + String.length s, cost := cost, doc := d₁, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂ c i { fst := s, rst := [] }cost y, MeasRender F d₂ c i { last := c + String.length s, cost := cost, doc := d₂, x := c + String.length s, y := y }

c, i:

s₁, s₂: String

h₁: Render d₁ c i { fst := s₁, rst := [] }

h₂: Render d₂ (c + String.length s₁) i { fst := s₂, rst := [] }

cost₁: α

y₁:

h✝¹: MeasRender F d₁ c i { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂ (c + String.length s₁) i { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }

h_ans: { last := c + String.length (s₁ ++ s₂), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁ d₂, x := c + String.length (s₁ ++ s₂), y := max y₁ y₂ } = Meas.concat F { last := c + String.length s₁, cost := cost₁, doc := d₁, x := c + String.length s₁, y := y₁ } { last := c + String.length s₁ + String.length s₂, cost := cost₂, doc := d₂, x := c + String.length s₁ + String.length s₂, y := y₂ }


refl.m₂
Meas

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

ss✝: List String

slast✝, s✝, t✝: String

ts✝: List String

h_non_empty✝: ss✝ []

h_last✝: slast✝ = List.getLast ss✝ h_non_empty✝

h₂✝: Render d₂✝ (String.length slast✝) i { fst := t✝, rst := ts✝ }

h₁✝: Render d₁✝ c i { fst := s✝, rst := ss✝ }

h_layout: { fst := s, rst := [] } = { fst := s✝, rst := List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

ss✝: List String

slast✝, s✝, t✝: String

ts✝: List String

h_non_empty✝: ss✝ []

h_last✝: slast✝ = List.getLast ss✝ h_non_empty✝

h₂✝: Render d₂✝ (String.length slast✝) i { fst := t✝, rst := ts✝ }

h₁✝: Render d₁✝ c i { fst := s✝, rst := ss✝ }

fst_eq✝: s = s✝

rst_eq✝: [] = List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

ih₂: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

ss✝: List String

slast✝, s✝, t✝: String

ts✝: List String

h_non_empty✝: ss✝ []

h_last✝: slast✝ = List.getLast ss✝ h_non_empty✝

h₂✝: Render d₂✝ (String.length slast✝) i { fst := t✝, rst := ts✝ }

h₁✝: Render d₁✝ c i { fst := s✝, rst := ss✝ }

h_layout: { fst := s, rst := [] } = { fst := s✝, rst := List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.concat d₁✝ d₂✝, x := c + String.length s, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

F: Factory α

h_render: Render d c i { fst := s, rst := [] }


cost y, MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

d₁_ih✝: ∀ {c i : } {s : String}, Render d₁✝ c i { fst := s, rst := [] }cost y, MeasRender F d₁✝ c i { last := c + String.length s, cost := cost, doc := d₁✝, x := c + String.length s, y := y }

d₂_ih✝: ∀ {c i : } {s : String}, Render d₂✝ c i { fst := s, rst := [] }cost y, MeasRender F d₂✝ c i { last := c + String.length s, cost := cost, doc := d₂✝, x := c + String.length s, y := y }

c, i:

s: String

h_render: Render (Doc.choice d₁✝ d₂✝) c i { fst := s, rst := [] }


cost y, MeasRender F (Doc.choice d₁✝ d₂✝) c i { last := c + String.length s, cost := cost, doc := Doc.choice d₁✝ d₂✝, x := c + String.length s, y := y }

Goals accomplished! 🐙
/-- Correctness of the measure computation relation when it results in multiple lines (second part of Theorem 5.3) -/ theorem
MeasRender_multi_correct: ∀ {α : Type} {d : Doc} {c i : } {s : String} {ss : List String} (F : Factory α), Render d c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
MeasRender_multi_correct
(
F: Factory α
F
:
Factory: TypeType
Factory
α: ?m.28209
α
) (
h_render: Render d c i { fst := s, rst := ss }
h_render
:
Render: DocLayoutProp
Render
d: ?m.28215
d
c: ?m.28221
c
i: ?m.28227
i
s: ?m.28235
s
,
ss: ?m.28243
ss
⟩) (
h_non_empty: ss []
h_non_empty
:
ss: ?m.28243
ss
[]: List ?m.28255
[]
) : ∃
cost: ?m.28262
cost
y: ?m.28267
y
,
MeasRender: {α : Type} → Factory αDocMeasProp
MeasRender
F: Factory α
F
d: ?m.28215
d
c: ?m.28221
c
i: ?m.28227
i
⟨(
List.getLast: {α : Type ?u.28279} → (as : List α) → as []α
List.getLast
ss: ?m.28243
ss
h_non_empty: ss []
h_non_empty
).
length: String
length
,
cost: ?m.28262
cost
,
d: ?m.28215
d
,
Layout.max_with_offset: Layout
Layout.max_with_offset
c: ?m.28221
c
s: ?m.28235
s
,
ss: ?m.28243
ss
⟩,
y: ?m.28267
y
⟩ :=

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

s✝: String

c, i:

s: String

ss: List String

h_render: Render (Doc.text s✝) c i { fst := s, rst := ss }

h_non_empty: ss []


text
cost y, MeasRender F (Doc.text s✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.text s✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

c, i:

s: String

ss: List String

h_render: Render Doc.nl c i { fst := s, rst := ss }

h_non_empty: ss []


nl
cost y, MeasRender F Doc.nl c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nl, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

d₁_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

d₂_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := ss }

h_non_empty: ss []


concat
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

d_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

d_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


align
cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

d₁_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

d₂_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.choice d₁✝ d₂✝) c i { fst := s, rst := ss }

h_non_empty: ss []


choice
cost y, MeasRender F (Doc.choice d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.choice d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

s✝: String

c, i:

s: String

ss: List String

h_render: Render (Doc.text s✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.text s✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.text s✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

s✝: String

c, i:

h_non_empty: [] []


text
cost y, MeasRender F (Doc.text s✝) c i { last := String.length (List.getLast [] h_non_empty), cost := cost, doc := Doc.text s✝, x := Layout.max_with_offset c { fst := s✝, rst := [] }, y := y }
α: Type

F: Factory α

s✝: String

c, i:

s: String

ss: List String

h_render: Render (Doc.text s✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.text s✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.text s✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

c, i:

s: String

ss: List String

h_render: Render Doc.nl c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F Doc.nl c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nl, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

c, i:

s: String

ss: List String

h_render: Render Doc.nl c i { fst := s, rst := ss }

h_non_empty: ss []


MeasRender F Doc.nl c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.nl F i, doc := Doc.nl, x := Layout.max_with_offset c { fst := s, rst := ss }, y := i }
α: Type

F: Factory α

c, i:

s: String

ss: List String

h_render: Render Doc.nl c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F Doc.nl c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nl, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

c, i:

h_non_empty: [List.asString (List.replicate i (Char.ofNat 32))] []


nl
MeasRender F Doc.nl c i { last := String.length (List.getLast [List.asString (List.replicate i (Char.ofNat 32))] h_non_empty), cost := Factory.nl F i, doc := Doc.nl, x := Layout.max_with_offset c { fst := "", rst := [List.asString (List.replicate i (Char.ofNat 32))] }, y := i }
α: Type

F: Factory α

c, i:

s: String

ss: List String

h_render: Render Doc.nl c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F Doc.nl c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nl, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

c, i:

h_non_empty: [List.asString (List.replicate i (Char.ofNat 32))] []


nl
MeasRender F Doc.nl c i { last := i, cost := Factory.nl F i, doc := Doc.nl, x := max c i, y := i }
α: Type

F: Factory α

c, i:

s: String

ss: List String

h_render: Render Doc.nl c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F Doc.nl c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nl, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h✝: Render d✝ c (i + n✝) { fst := s, rst := ss }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c (i + n✝) { fst := s, rst := ss }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c (i + n✝) { fst := s, rst := ss }

cost: α

y:

h✝: MeasRender F d✝ c (i + n✝) { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }


nest
cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c (i + n✝) { fst := s, rst := ss }

cost: α

y:

h✝: MeasRender F d✝ c (i + n✝) { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }


nest
MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c (i + n✝) { fst := s, rst := ss }

cost: α

y:

h✝: MeasRender F d✝ c (i + n✝) { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }


nest.h
MeasRender F d✝ c (i + n✝) { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

n✝:

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.nest n✝ d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.nest n✝ d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.nest n✝ d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h✝: Render d✝ c c { fst := s, rst := ss }


align
cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c c { fst := s, rst := ss }


align
cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c c { fst := s, rst := ss }

cost: α

y:

h✝: MeasRender F d✝ c c { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }


align
cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c c { fst := s, rst := ss }

cost: α

y:

h✝: MeasRender F d✝ c c { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }


align
MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := max i y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_non_empty: ss []

h: Render d✝ c c { fst := s, rst := ss }

cost: α

y:

h✝: MeasRender F d✝ c c { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }


align.h
MeasRender F d✝ c c { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d✝: Doc

ih: ∀ {c i : } {s : String} {ss : List String}, Render d✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.align d✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.align d✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.align d✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

d₁_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

d₂_ih✝: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.choice d₁✝ d₂✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.choice d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.choice d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

Goals accomplished! 🐙
α: Type

d: Doc

c, i:

s: String

ss: List String

F: Factory α

h_render: Render d c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F d c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s✝, t✝: String

h₁✝: Render d₁✝ c i { fst := s✝, rst := [] }

h₂✝: Render d₂✝ (c + String.length s✝) i { fst := t✝, rst := ss }


concat_one
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s✝ ++ t✝, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss✝: List String

slast✝, t✝: String

ts✝: List String

h_non_empty✝: ss✝ []

h_last✝: slast✝ = List.getLast ss✝ h_non_empty✝

h₂✝: Render d₂✝ (String.length slast✝) i { fst := t✝, rst := ts✝ }

h₁✝: Render d₁✝ c i { fst := s, rst := ss✝ }

h_non_empty: List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝ []


concat_multi
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss✝ ++ [slast✝ ++ t✝] ++ ts✝ }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := max y₁ y₂ }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }


Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }


Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }


Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })

Goals accomplished! 🐙

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s ++ t, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


h₁
MeasRender F d₁✝ c i ?m₁
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


h₂
MeasRender F d₂✝ ?m₁.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


h
{ last := String.length (List.getLast ss h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }), y := max y₁ y₂ } = Meas.concat F ?m₁ ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


m₁
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

ss: List String

h_non_empty: ss []

s, t: String

h₁: Render d₁✝ c i { fst := s, rst := [] }

h₂: Render d₂✝ (c + String.length s) i { fst := t, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := c + String.length s, cost := cost₁, doc := d₁✝, x := c + String.length s, y := y₁ }

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (c + String.length s) i { last := String.length (List.getLast ss h_non_empty), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (c + String.length s) { fst := t, rst := ss }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s ++ t, rst := ss } = max (c + String.length s) (Layout.max_with_offset (c + String.length s) { fst := t, rst := ss })


m₂
Meas

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

h_render: Render (Doc.concat d₁✝ d₂✝) c i { fst := s, rst := ss }

h_non_empty: ss []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


ss []

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }


ss []

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }



Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


nil
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

head✝: String

tail✝: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := head✝ :: tail✝ }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ head✝ :: tail✝ []


cons
cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ head✝ :: tail✝) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ head✝ :: tail✝ }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := max y₁ y₂ }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ [] []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast ss h_non_empty✝) + String.length t, cost := cost₂, doc := d₂✝, x := String.length (List.getLast ss h_non_empty✝) + String.length t, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)

Goals accomplished! 🐙

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


h₁
MeasRender F d₁✝ c i ?m₁
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


h₂
MeasRender F d₂✝ ?m₁.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


h
{ last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t), y := max y₁ y₂ } = Meas.concat F ?m₁ ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


m₁
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


m₂
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


h₂
MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


h
{ last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t), y := max y₁ y₂ } = Meas.concat F { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ } ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


m₂
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ [] []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast ss h_non_empty✝) + String.length t, cost := cost₂, doc := d₂✝, x := String.length (List.getLast ss h_non_empty✝) + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length (List.getLast ss h_non_empty✝) + String.length t)


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i (?m.143627 (_ : List.getLast ss h_non_empty✝ = List.getLast ss h_non_empty✝) h₂ h_non_empty h✝ h_x)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ [] []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast ss h_non_empty✝) + String.length t, cost := cost₂, doc := d₂✝, x := String.length (List.getLast ss h_non_empty✝) + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length (List.getLast ss h_non_empty✝) + String.length t)


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i (?m.143627 (_ : List.getLast ss h_non_empty✝ = List.getLast ss h_non_empty✝) h₂ h_non_empty h✝ h_x)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i ?m₂

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := [] }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ [] []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length slast + String.length t, cost := cost₂, doc := d₂✝, x := String.length slast + String.length t, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ [] } = max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t)


{ last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ []) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (String.length slast + String.length t), y := max y₁ y₂ } = Meas.concat F { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ } { last := String.length (List.getLast ss h_non_empty✝) + String.length t, cost := cost₂, doc := d₂✝, x := String.length (List.getLast ss h_non_empty✝) + String.length t, y := y₂ }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

ts: List String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := ts }

h₁: Render d₁✝ c i { fst := s, rst := ss }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ ts []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ ts) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ ts }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


hd :: tl []

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := max y₁ y₂ }

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }


α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }


h₁
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }


h₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }


h₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }


Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }



Goals accomplished! 🐙

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }), y := max y₁ y₂ }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


h₁
MeasRender F d₁✝ c i ?m₁
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


h₂
MeasRender F d₂✝ ?m₁.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


h
{ last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }), y := max y₁ y₂ } = Meas.concat F ?m₁ ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


m₁
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


m₂
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


h₂
MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


h
{ last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }), y := max y₁ y₂ } = Meas.concat F { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ } ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


m₂
Meas
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i ?m₂
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

t: String

h_non_empty✝: ss []

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

cost₂: α

y₂:

h₂: Render d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl []

h✝: MeasRender F d₂✝ (String.length (List.getLast ss h_non_empty✝)) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [List.getLast ss h_non_empty✝ ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl })


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i (?m.206236 (_ : List.getLast ss h_non_empty✝ = List.getLast ss h_non_empty✝) h₂ h_non_empty h✝ h_x)
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


MeasRender F d₂✝ { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }.last i ?m₂

Goals accomplished! 🐙
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []


cost y, MeasRender F (Doc.concat d₁✝ d₂✝) c i { last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := cost, doc := Doc.concat d₁✝ d₂✝, x := Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl }, y := y }
α: Type

F: Factory α

d₁✝, d₂✝: Doc

ih₁: ∀ {c i : } {s : String} {ss : List String}, Render d₁✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

ih₂: ∀ {c i : } {s : String} {ss : List String}, Render d₂✝ c i { fst := s, rst := ss }∀ (h_non_empty : ss []), cost y, MeasRender F d₂✝ c i { last := String.length (List.getLast ss h_non_empty), cost := cost, doc := d₂✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y }

c, i:

s: String

ss: List String

slast, t: String

h_non_empty✝: ss []

h_last: slast = List.getLast ss h_non_empty✝

h₁: Render d₁✝ c i { fst := s, rst := ss }

cost₁: α

y₁:

h✝¹: MeasRender F d₁✝ c i { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ }

h_droplast: List.map String.length ss = List.map String.length (List.dropLast ss ++ [List.getLast ss h_non_empty✝])

hd: String

tl: List String

h₂: Render d₂✝ (String.length slast) i { fst := t, rst := hd :: tl }

h_non_empty: List.dropLast ss ++ [slast ++ t] ++ hd :: tl []

cost₂: α

y₂:

h✝: MeasRender F d₂✝ (String.length slast) i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }, y := y₂ }

h_x: Layout.max_with_offset c { fst := s, rst := List.dropLast ss ++ [slast ++ t] ++ hd :: tl } = max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl })


{ last := String.length (List.getLast (List.dropLast ss ++ [slast ++ t] ++ hd :: tl) h_non_empty), cost := Factory.concat F cost₁ cost₂, doc := Doc.concat d₁✝ d₂✝, x := max (Layout.max_with_offset c { fst := s, rst := ss }) (Layout.max_with_offset (String.length slast) { fst := t, rst := hd :: tl }), y := max y₁ y₂ } = Meas.concat F { last := String.length (List.getLast ss h_non_empty✝), cost := cost₁, doc := d₁✝, x := Layout.max_with_offset c { fst := s, rst := ss }, y := y₁ } { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost₂, doc := d₂✝, x := Layout.max_with_offset (String.length (List.getLast ss h_non_empty✝)) { fst := t, rst := hd :: tl }, y := y₂ }

Goals accomplished! 🐙
/-- Totality of the measure computation relation (Section 5.3) -/ theorem
MeasRender_total: ∀ {α : Type} (F : Factory α) (d : Doc) (c i : ), Choiceless dm, MeasRender F d c i m
MeasRender_total
(
F: Factory α
F
:
Factory: TypeType
Factory
α: ?m.210313
α
) (
d: Doc
d
:
Doc: Type
Doc
) (
c:
c
i:
i
:
: Type
) (h :
Choiceless: DocProp
Choiceless
d: Doc
d
) : ∃
m: ?m.210329
m
,
MeasRender: {α : Type} → Factory αDocMeasProp
MeasRender
F: Factory α
F
d: Doc
d
c:
c
i:
i
m: ?m.210329
m
:=

Goals accomplished! 🐙
α: Type

F: Factory α

d: Doc

c, i:

h: Choiceless d


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s: String

ss: List String

h: Render d c i { fst := s, rst := ss }


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h: Choiceless d


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s: String

h: Render d c i { fst := s, rst := [] }


nil
m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s, head✝: String

tail✝: List String

h: Render d c i { fst := s, rst := head✝ :: tail✝ }


cons
m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h: Choiceless d


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s: String

h: Render d c i { fst := s, rst := [] }


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝¹: Choiceless d

s: String

h: Render d c i { fst := s, rst := [] }

cost: α

y:

h✝: MeasRender F d c i { last := c + String.length s, cost := cost, doc := d, x := c + String.length s, y := y }


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s: String

h: Render d c i { fst := s, rst := [] }


m, MeasRender F d c i m

Goals accomplished! 🐙
α: Type

F: Factory α

d: Doc

c, i:

h: Choiceless d


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }


m, MeasRender F d c i m

Goals accomplished! 🐙
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }


hd :: tl []

Goals accomplished! 🐙
α: Type

F: Factory α

d: Doc

c, i:

h✝¹: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }

cost: α

y:

h✝: MeasRender F d c i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := hd :: tl }, y := y }


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }


m, MeasRender F d c i m
α: Type

F: Factory α

d: Doc

c, i:

h✝¹: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }

cost: α

y:

h✝: MeasRender F d c i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := hd :: tl }, y := y }


m, MeasRender F d c i m

Goals accomplished! 🐙
α: Type

F: Factory α

d: Doc

c, i:

h✝¹: Choiceless d

s, hd: String

tl: List String

h: Render d c i { fst := s, rst := hd :: tl }

cost: α

y:

h✝: MeasRender F d c i { last := String.length (List.getLast (hd :: tl) (_ : ¬hd :: tl = [])), cost := cost, doc := d, x := Layout.max_with_offset c { fst := s, rst := hd :: tl }, y := y }


hd :: tl []

Goals accomplished! 🐙

Goals accomplished! 🐙