Documentation

Pretty.Supports.LastAndCost

Various lemmas about list of measures when they are decreasing in last length and increasing in cost.

theorem last_decreasing_head :
∀ {α : Type} {x y : Meas} {xs : List Meas}, last_decreasing (x :: y :: xs)x.last > y.last
theorem last_decreasing_rest :
∀ {α : Type} {x : Meas} {xs : List Meas}, last_decreasing (x :: xs)last_decreasing xs
theorem last_decreasing_one :
∀ {α : Type} {x : Meas}, last_decreasing [x]
theorem last_decreasing_cons {α : Type} (x : Meas) (y : Meas) (xs : List Meas) (h_last : x.last > y.last) (h : last_decreasing (y :: xs)) :
theorem last_decreasing_strong :
∀ {α : Type} {ms : List Meas}, last_decreasing ms∀ (i j : ) (h_i : i < List.length ms) (h_j : j < List.length ms), i < j(List.get ms { val := i, isLt := h_i }).last > (List.get ms { val := j, isLt := h_j }).last
theorem cost_increasing_head :
∀ {α : Type} {F : Factory α} {x y : Meas} {xs : List Meas}, cost_increasing F (x :: y :: xs)Factory.lt F x.cost y.cost
theorem cost_increasing_rest :
∀ {α : Type} {F : Factory α} {x : Meas} {xs : List Meas}, cost_increasing F (x :: xs)cost_increasing F xs
theorem cost_increasing_empty :
∀ {α : Type} {F : Factory α}, cost_increasing F []
theorem cost_increasing_one :
∀ {α : Type} {F : Factory α} {x : Meas}, cost_increasing F [x]
theorem cost_increasing_cons :
∀ {α : Type} {F : Factory α} (x y : Meas) (xs : List Meas), Factory.lt F x.cost y.costcost_increasing F (y :: xs)cost_increasing F (x :: y :: xs)
theorem cost_increasing_strong :
∀ {α : Type} {F : Factory α} {ms : List Meas}, cost_increasing F ms∀ (i j : ) (h_i : i < List.length ms) (h_j : j < List.length ms), i < jFactory.lt F (List.get ms { val := i, isLt := h_i }).cost (List.get ms { val := j, isLt := h_j }).cost
theorem cost_increasing_non_strict_head :
∀ {α : Type} {F : Factory α} {x y : Meas} {xs : List Meas}, cost_increasing_non_strict F (x :: y :: xs)Factory.le F x.cost y.cost = true
theorem cost_increasing_non_strict_rest :
∀ {α : Type} {F : Factory α} {x : Meas} {xs : List Meas}, cost_increasing_non_strict F (x :: xs)cost_increasing_non_strict F xs
theorem cost_increasing_non_strict_cons :
∀ {α : Type} {F : Factory α} (x y : Meas) (xs : List Meas), Factory.le F x.cost y.cost = truecost_increasing_non_strict F (y :: xs)cost_increasing_non_strict F (x :: y :: xs)
theorem last_decreasing_concat {α : Type} {ms : List Meas} (F : Factory α) (m : Meas) (h : last_decreasing ms) :
last_decreasing (List.map (fun m' => Meas.concat F m m') ms)
theorem cost_increasing_non_strict_concat :
∀ {α : Type} {F : Factory α} {ms : List Meas} (m : Meas), cost_increasing F mscost_increasing_non_strict F (List.map (fun m' => Meas.concat F m m') ms)
theorem last_decreasing_bound :
∀ {α : Type} {ms : List Meas}, last_decreasing ms∀ (i : ) (hi : List.length ms - 1 - i < List.length ms), i < List.length ms(List.get ms { val := List.length ms - 1 - i, isLt := hi }).last i