def internal_sorted_take_cons

bend-mathlib@0.8.1.0 · list.bend:901

import bend-mathlib@0.8.1.0/list.bend as List
import Base

901def internal_sorted_take_cons(t: List<&2, Nat>, n: Nat, +x: Nat, h: sorted_by(~Nat, ~Nat.is_le, x <> t)) -> sorted_by(~Nat, ~Nat.is_le, x <> List.take(&2, Nat, t, n)):
902  match t n:
903    case Nil{} _:
904      {==}
905    case y <> u 0n:
906      {==}
907    case +y <> u 1n+q:
908      +u = u
909      +h = h
910      sorted_cons_cons_intro(x, y, List.take(&2, Nat, u, q), sorted_cons_cons_elim_le(x, y, u, h), internal_sorted_take_cons(u, q, y, sorted_cons_cons_elim_tail(x, y, u, h)))

Uses (8)

Used by (1)