/- Copyright (c) 2020 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov ! This file was ported from Lean 3 source module data.list.nodup_equiv_fin ! leanprover-community/mathlib commit 008205aa645b3f194c1da47025c5f110c8406eab ! Please do not edit these lines, except to modify the commit id ! if you have ported upstream changes. -/ import Mathlib.Data.Fin.Basic import Mathlib.Data.List.Sort import Mathlib.Data.List.Duplicate /-! # Equivalence between `Fin (length l)` and elements of a list Given a list `l`, * if `l` has no duplicates, then `List.Nodup.getEquiv` is the equivalence between `Fin (length l)` and `{x // x β l}` sending `i` to `β¨get l i, _β©` with the inverse sending `β¨x, hxβ©` to `β¨indexOf x l, _β©`; * if `l` has no duplicates and contains every element of a type `Ξ±`, then `List.Nodup.getEquivOfForallMemList` defines an equivalence between `Fin (length l)` and `Ξ±`; if `Ξ±` does not have decidable equality, then there is a bijection `List.Nodup.getBijectionOfForallMemList`; * if `l` is sorted w.r.t. `(<)`, then `List.Sorted.getIso` is the same bijection reinterpreted as an `OrderIso`. -/ namespace List variable {Ξ± :Ξ±: Type ?u.2Type _} namespace Nodup /-- If `l` lists all the elements of `Ξ±` without duplicates, then `List.get` defines a bijection `Fin l.length β Ξ±`. See `List.Nodup.getEquivOfForallMemList` for a version giving an equivalence when there is decidable equality. -/ @[Type _: Type (?u.2+1)simps] defgetBijectionOfForallMemList (getBijectionOfForallMemList: {Ξ± : Type u_1} β (l : List Ξ±) β Nodup l β (β (x : Ξ±), x β l) β { f // Function.Bijective f }l : Listl: List Ξ±Ξ±) (Ξ±: Type ?u.5nd :nd: Nodup ll.Nodup) (l: List Ξ±h : βh: β (x : Ξ±), x β lx :x: Ξ±Ξ±,Ξ±: Type ?u.5x βx: Ξ±l) : { f : Finl: List Ξ±l.length βl: List Ξ±Ξ± // Function.Bijective f } := β¨funΞ±: Type ?u.5i =>i: ?m.89l.getl: List Ξ±i, funi: ?m.89__: ?m.106__: ?m.109h => Fin.ext <| (h: ?m.112nd.nthLe_inj_iff _ _).1nd: Nodup lh, funh: ?m.112x => let β¨i, hlβ© := List.mem_iff_get.1 (x: ?m.184hh: β (x : Ξ±), x β lx) β¨i, hlβ©β© #align list.nodup.nth_le_bijection_of_forall_mem_listx: ?m.184List.Nodup.getBijectionOfForallMemList variable [DecidableEqList.Nodup.getBijectionOfForallMemList: {Ξ± : Type u_1} β (l : List Ξ±) β Nodup l β (β (x : Ξ±), x β l) β { f // Function.Bijective f }Ξ±] /-- If `l` has no duplicates, then `List.get` defines an equivalence between `Fin (length l)` and the set of elements of `l`. -/ @[Ξ±: Type ?u.474simps] defgetEquiv (l : Listl: List Ξ±Ξ±) (Ξ±: Type ?u.474H : NodupH: Nodup ll) : Fin (lengthl: List Ξ±l) β {l: List Ξ±x //x: ?m.503x βx: ?m.503l } where toFunl: List Ξ±i := β¨geti: ?m.533ll: List Ξ±i, get_memi: ?m.533ll: List Ξ±ii: ?m.533i.2β© invFuni: ?m.533x := β¨indexOf (βx: ?m.667x)x: ?m.667l, indexOf_lt_length.2l: List Ξ±x.2β© left_invx: ?m.667i :=i: ?m.851Goals accomplished! πright_invGoals accomplished! πx :=x: ?m.857Goals accomplished! π#align list.nodup.nth_le_equiv List.Nodup.getEquiv /-- If `l` lists all the elements of `Ξ±` without duplicates, then `List.get` defines an equivalence between `Fin l.length` and `Ξ±`. See `List.Nodup.getBijectionOfForallMemList` for a version without decidable equality. -/ @[Goals accomplished! πsimps] defsimps: β {Ξ± : Type u_1} [inst : DecidableEq Ξ±] (l : List Ξ±) (nd : Nodup l) (h : β (x : Ξ±), x β l) (a : Ξ±), β(β(getEquivOfForallMemList l nd h).symm a) = indexOf a lgetEquivOfForallMemList (l : Listl: List Ξ±Ξ±) (Ξ±: Type ?u.2770nd :nd: Nodup ll.Nodup) (l: List Ξ±h : βh: β (x : Ξ±), x β lx :x: Ξ±Ξ±,Ξ±: Type ?u.2770x βx: Ξ±l) : Finl: List Ξ±l.length βl: List Ξ±Ξ± where toFunΞ±: Type ?u.2770i :=i: ?m.2840l.getl: List Ξ±i invFuni: ?m.2840a := β¨a: ?m.2851_, indexOf_lt_length.2 (_: βhh: β (x : Ξ±), x β la)β© left_inva: ?m.2851i :=i: ?m.2928Goals accomplished! πright_invGoals accomplished! πa :=a: ?m.2934Goals accomplished! π#align list.nodup.nth_le_equiv_of_forall_mem_list List.Nodup.getEquivOfForallMemList end Nodup namespace Sorted variable [PreorderGoals accomplished! πΞ±] {Ξ±: Type ?u.5749l : Listl: List Ξ±Ξ±} theorem get_mono (h :Ξ±: Type ?u.5740l.Sortedl: List Ξ±(Β· β€ Β·)) : Monotone(Β· β€ Β·): Ξ± β Ξ± β Propl.get := funl: List Ξ±__: ?m.5925_ => h.rel_get_of_le #align list.sorted.nth_le_mono List.Sorted.get_mono theorem_: ?m.5928get_strictMono (h :get_strictMono: Sorted (fun x x_1 => x < x_1) l β StrictMono (get l)l.Sortedl: List Ξ±(Β· < Β·)) : StrictMono(Β· < Β·): Ξ± β Ξ± β Propl.get := funl: List Ξ±__: ?m.6180_ => h.rel_get_of_lt #align list.sorted.nth_le_strict_mono List.Sorted.get_strictMono variable [DecidableEq_: ?m.6183Ξ±] /-- If `l` is a list sorted w.r.t. `(<)`, then `List.get` defines an order isomorphism between `Fin (length l)` and the set of elements of `l`. -/ defΞ±: Type ?u.6843getIso (l : Listl: List Ξ±Ξ±) (H : SortedΞ±: Type ?u.6253(Β· < Β·)(Β· < Β·): Ξ± β Ξ± β Propl) : Fin (lengthl: List Ξ±l) βo {l: List Ξ±x //x: ?m.6349x βx: ?m.6349l } where toEquiv := H.nodup.getEquivl: List Ξ±l map_rel_iff' := H.get_strictMono.l: List Ξ±le_iff_le #align list.sorted.nth_le_iso List.Sorted.getIso variable (H : Sortedle_iff_le: β {Ξ± : Type ?u.6541} {Ξ² : Type ?u.6540} [inst : LinearOrder Ξ±] [inst_1 : Preorder Ξ²] {f : Ξ± β Ξ²}, StrictMono f β β {a b : Ξ±}, f a β€ f b β a β€ b(Β· < Β·)(Β· < Β·): Ξ± β Ξ± β Propl) {l: List Ξ±x : {x: { x // x β l }x //x: ?m.7047x βx: ?m.6931l }} {i : Finl: List Ξ±l.length} @[simp] theoreml: List Ξ±coe_getIso_apply : (H.getIsol i :l: List Ξ±Ξ±) = getΞ±: Type ?u.6959l i := rfl #align list.sorted.coe_nth_le_iso_apply List.Sorted.coe_getIso_apply @[simp] theoreml: List Ξ±coe_getIso_symm_apply : ((H.getIsol).l: List Ξ±symmx :x: { x // x β l }β) = indexOf (ββ: Typex)x: { x // x β l }l := rfl #align list.sorted.coe_nth_le_iso_symm_apply List.Sorted.coe_getIso_symm_apply end Sorted section Sublist /-- If there is `f`, an order-preserving embedding of `β` into `β` such that any element of `l` found at index `ix` can be found at index `f ix` in `l'`, then `Sublist l l'`. -/ theoreml: List Ξ±sublist_of_orderEmbedding_get?_eq {ll: List Ξ±l' : Listl': List Ξ±Ξ±} (f :Ξ±: Type ?u.8214β βͺoβ: Typeβ) (hf : ββ: Typeix :ix: ββ,β: Typel.get?l: List Ξ±ix =ix: βl'.get? (fl': List Ξ±ix)) :ix: βl <+l: List Ξ±l' :=l': List Ξ±Goals accomplished! πΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? [] ix = get? l' (βf ix)
nil[] <+ l'Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? [] ix = get? l' (βf ix)
nil[] <+ l'Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
consGoals accomplished! πΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: some hd = get? l' (βf 0)
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: some hd = get? l' (βf 0)
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: get? l' (βf 0) = some hd
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: some hd = get? l' (βf 0)
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: β h, get l' { val := βf 0, isLt := h } = hd
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: β h, get l' { val := βf 0, isLt := h } = hd
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
this: β h, get l' { val := βf 0, isLt := h } = hd
consΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
cons.introΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
cons.introGoals accomplished! πΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
a, b: βGoals accomplished! πΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
cons.introGoals accomplished! πΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
ix: βΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo βGoals accomplished! πΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)
cons.introΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)
cons.introΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)
cons.introΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)
cons.introΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)
cons.introΞ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)Ξ±: Type u_1
l, l'β: List Ξ±
fβ: β βͺo β
hfβ: β (ix : β), get? l ix = get? l'β (βfβ ix)
hd: Ξ±
tl: List Ξ±
IH: β {l' : List Ξ±} (f : β βͺo β), (β (ix : β), get? tl ix = get? l' (βf ix)) β tl <+ l'
l': List Ξ±
f: β βͺo β
hf: β (ix : β), get? (hd :: tl) ix = get? l' (βf ix)
w: βf 0 < length l'
h: get l' { val := βf 0, isLt := w } = hd
f':= OrderEmbedding.ofMapLEIff (fun i => βf (i + 1) - (βf 0 + 1)) (_ : β (a b : β), (fun i => βf (i + 1) - (βf 0 + 1)) a β€ (fun i => βf (i + 1) - (βf 0 + 1)) b β a β€ b): β βͺo β
this: β (ix : β), get? tl ix = get? (drop (βf 0 + 1) l') (βf' ix)#align list.sublist_of_order_embedding_nth_eq List.sublist_of_orderEmbedding_get?_eq /-- A `l : List Ξ±` is `Sublist l l'` for `l' : List Ξ±` iff there is `f`, an order-preserving embedding of `β` into `β` such that any element of `l` found at index `ix` can be found at index `f ix` in `l'`. -/ theoremGoals accomplished! πsublist_iff_exists_orderEmbedding_get?_eq {ll: List Ξ±l' : Listl': List Ξ±Ξ±} :Ξ±: Type ?u.16327l <+l: List Ξ±l' β β f :l': List Ξ±β βͺoβ: Typeβ, ββ: Typeix :ix: ββ,β: Typel.get?l: List Ξ±ix =ix: βl'.get? (fl': List Ξ±ix) :=ix: βGoals accomplished! πGoals accomplished! πGoals accomplished! πGoals accomplished! πGoals accomplished! πΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_1.zero.zeroΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_1.zero.succΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_1.succ.zeroΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβΒΉ, nβ: β
mp.consβ.intro.refine'_1.succ.succΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_1.zero.zeroΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_1.zero.succΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_1.succ.zeroΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβΒΉ, nβ: β
mp.consβ.intro.refine'_1.succ.succGoals accomplished! πΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2β (ix : β), get? (x :: xs) ix = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) ix)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2β (ix : β), get? (x :: xs) ix = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) ix)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2.zeroget? (x :: xs) Nat.zero = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) Nat.zero)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_2.succget? (x :: xs) (Nat.succ nβ) = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) (Nat.succ nβ))Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2β (ix : β), get? (x :: xs) ix = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) ix)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2.zeroget? (x :: xs) Nat.zero = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) Nat.zero)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2.zeroget? (x :: xs) Nat.zero = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) Nat.zero)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_2.succget? (x :: xs) (Nat.succ nβ) = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) (Nat.succ nβ))Goals accomplished! πΞ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
mp.consβ.intro.refine'_2β (ix : β), get? (x :: xs) ix = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) ix)Ξ±: Type u_1
l, l', xs, ys: List Ξ±
x: Ξ±
_H: xs <+ ys
f: β βͺo β
hf: β (ix : β), get? xs ix = get? ys (βf ix)
nβ: β
mp.consβ.intro.refine'_2.succget? (x :: xs) (Nat.succ nβ) = get? (x :: ys) (β(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) (_ : β (a b : β), (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) a β€ (fun ix => if ix = 0 then 0 else Nat.succ (βf (Nat.pred ix))) b β a β€ b)) (Nat.succ nβ))