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.
/-
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.2
Ξ±
:
Type _: Type (?u.2+1)
Type _
} 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. -/ @[
simps: βˆ€ {Ξ± : Type u_1} (l : List Ξ±) (nd : Nodup l) (h : βˆ€ (x : Ξ±), x ∈ l) (i : Fin (length l)), ↑(getBijectionOfForallMemList l nd h) i = get l i
simps
] def
getBijectionOfForallMemList: {Ξ± : Type u_1} β†’ (l : List Ξ±) β†’ Nodup l β†’ (βˆ€ (x : Ξ±), x ∈ l) β†’ { f // Function.Bijective f }
getBijectionOfForallMemList
(
l: List Ξ±
l
:
List: Type ?u.8 β†’ Type ?u.8
List
Ξ±: Type ?u.5
Ξ±
) (
nd: Nodup l
nd
:
l: List Ξ±
l
.
Nodup: {Ξ± : Type ?u.11} β†’ List Ξ± β†’ Prop
Nodup
) (
h: βˆ€ (x : Ξ±), x ∈ l
h
: βˆ€
x: Ξ±
x
:
Ξ±: Type ?u.5
Ξ±
,
x: Ξ±
x
∈
l: List Ξ±
l
) : {
f: Fin (length l) β†’ Ξ±
f
:
Fin: β„• β†’ Type
Fin
l: List Ξ±
l
.
length: {Ξ± : Type ?u.52} β†’ List Ξ± β†’ β„•
length
β†’
Ξ±: Type ?u.5
Ξ±
//
Function.Bijective: {Ξ± : Sort ?u.60} β†’ {Ξ² : Sort ?u.59} β†’ (Ξ± β†’ Ξ²) β†’ Prop
Function.Bijective
f: Fin (length l) β†’ Ξ±
f
} := ⟨fun
i: ?m.89
i
=>
l: List Ξ±
l
.
get: {Ξ± : Type ?u.91} β†’ (as : List Ξ±) β†’ Fin (length as) β†’ Ξ±
get
i: ?m.89
i
, fun
_: ?m.106
_
_: ?m.109
_
h: ?m.112
h
=>
Fin.ext: βˆ€ {n : β„•} {a b : Fin n}, ↑a = ↑b β†’ a = b
Fin.ext
<| (
nd: Nodup l
nd
.
nthLe_inj_iff: βˆ€ {Ξ± : Type ?u.120} {l : List Ξ±}, Nodup l β†’ βˆ€ {i j : β„•} (hi : i < length l) (hj : j < length l), nthLe l i hi = nthLe l j hj ↔ i = j
nthLe_inj_iff
_: ?m.132 < length ?m.129
_
_: ?m.133 < length ?m.129
_
).
1: βˆ€ {a b : Prop}, (a ↔ b) β†’ a β†’ b
1
h: ?m.112
h
, fun
x: ?m.184
x
=> let ⟨
i: Fin (length l)
i
,
hl: get l i = x
hl
⟩ :=
List.mem_iff_get: βˆ€ {Ξ± : Type ?u.186} {a : Ξ±} {l : List Ξ±}, a ∈ l ↔ βˆƒ n, get l n = a
List.mem_iff_get
.
1: βˆ€ {a b : Prop}, (a ↔ b) β†’ a β†’ b
1
(
h: βˆ€ (x : Ξ±), x ∈ l
h
x: ?m.184
x
) ⟨
i: Fin (length l)
i
,
hl: get l i = x
hl
⟩⟩ #align list.nodup.nth_le_bijection_of_forall_mem_list
List.Nodup.getBijectionOfForallMemList: {Ξ± : Type u_1} β†’ (l : List Ξ±) β†’ Nodup l β†’ (βˆ€ (x : Ξ±), x ∈ l) β†’ { f // Function.Bijective f }
List.Nodup.getBijectionOfForallMemList
variable [
DecidableEq: Sort ?u.465 β†’ Sort (max1?u.465)
DecidableEq
Ξ±: Type ?u.474
Ξ±
] /-- If `l` has no duplicates, then `List.get` defines an equivalence between `Fin (length l)` and the set of elements of `l`. -/ @[
simps: βˆ€ {Ξ± : Type u_1} [inst : DecidableEq Ξ±] (l : List Ξ±) (H : Nodup l) (i : Fin (length l)), ↑(↑(getEquiv l H) i) = get l i
simps
] def
getEquiv: {Ξ± : Type u_1} β†’ [inst : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Nodup l β†’ Fin (length l) ≃ { x // x ∈ l }
getEquiv
(
l: List Ξ±
l
:
List: Type ?u.486 β†’ Type ?u.486
List
Ξ±: Type ?u.474
Ξ±
) (
H: Nodup l
H
:
Nodup: {Ξ± : Type ?u.489} β†’ List Ξ± β†’ Prop
Nodup
l: List Ξ±
l
) :
Fin: β„• β†’ Type
Fin
(
length: {Ξ± : Type ?u.497} β†’ List Ξ± β†’ β„•
length
l: List Ξ±
l
) ≃ {
x: ?m.503
x
//
x: ?m.503
x
∈
l: List Ξ±
l
} where toFun
i: ?m.533
i
:= ⟨
get: {Ξ± : Type ?u.547} β†’ (as : List Ξ±) β†’ Fin (length as) β†’ Ξ±
get
l: List Ξ±
l
i: ?m.533
i
,
get_mem: βˆ€ {Ξ± : Type ?u.550} (l : List Ξ±) (n : β„•) (h : n < length l), get l { val := n, isLt := h } ∈ l
get_mem
l: List Ξ±
l
i: ?m.533
i
i: ?m.533
i
.
2: βˆ€ {n : β„•} (self : Fin n), ↑self < n
2
⟩ invFun
x: ?m.667
x
:= ⟨
indexOf: {Ξ± : Type ?u.673} β†’ [inst : BEq Ξ±] β†’ Ξ± β†’ List Ξ± β†’ β„•
indexOf
(↑
x: ?m.667
x
)
l: List Ξ±
l
,
indexOf_lt_length: βˆ€ {Ξ± : Type ?u.735} [inst : DecidableEq Ξ±] {a : Ξ±} {l : List Ξ±}, indexOf a l < length l ↔ a ∈ l
indexOf_lt_length
.
2: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
2
x: ?m.667
x
.
2: βˆ€ {Ξ± : Sort ?u.811} {p : Ξ± β†’ Prop} (self : Subtype p), p ↑self
2
⟩ left_inv
i: ?m.851
i
:=

Goals accomplished! πŸ™
Ξ±: Type ?u.474

inst✝: DecidableEq α

l: List Ξ±

H: Nodup l

i: Fin (length l)


(fun x => { val := indexOf (↑x) l, isLt := (_ : indexOf (↑x) l < length l) }) ((fun i => { val := get l i, property := (_ : get l { val := ↑i, isLt := (_ : ↑i < length l) } ∈ l) }) i) = i

Goals accomplished! πŸ™
right_inv
x: ?m.857
x
:=

Goals accomplished! πŸ™
Ξ±: Type ?u.474

inst✝: DecidableEq α

l: List Ξ±

H: Nodup l

x: { x // x ∈ l }


(fun i => { val := get l i, property := (_ : get l { val := ↑i, isLt := (_ : ↑i < length l) } ∈ l) }) ((fun x => { val := indexOf (↑x) l, isLt := (_ : indexOf (↑x) l < length l) }) x) = x

Goals accomplished! πŸ™
#align list.nodup.nth_le_equiv
List.Nodup.getEquiv: {Ξ± : Type u_1} β†’ [inst : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Nodup l β†’ Fin (length l) ≃ { x // x ∈ l }
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. -/ @[
simps: βˆ€ {Ξ± : Type u_1} [inst : DecidableEq Ξ±] (l : List Ξ±) (nd : Nodup l) (h : βˆ€ (x : Ξ±), x ∈ l) (a : Ξ±), ↑(↑(getEquivOfForallMemList l nd h).symm a) = indexOf a l
simps
] def
getEquivOfForallMemList: (l : List Ξ±) β†’ Nodup l β†’ (βˆ€ (x : Ξ±), x ∈ l) β†’ Fin (length l) ≃ Ξ±
getEquivOfForallMemList
(
l: List Ξ±
l
:
List: Type ?u.2782 β†’ Type ?u.2782
List
Ξ±: Type ?u.2770
Ξ±
) (
nd: Nodup l
nd
:
l: List Ξ±
l
.
Nodup: {Ξ± : Type ?u.2785} β†’ List Ξ± β†’ Prop
Nodup
) (
h: βˆ€ (x : Ξ±), x ∈ l
h
: βˆ€
x: Ξ±
x
:
Ξ±: Type ?u.2770
Ξ±
,
x: Ξ±
x
∈
l: List Ξ±
l
) :
Fin: β„• β†’ Type
Fin
l: List Ξ±
l
.
length: {Ξ± : Type ?u.2824} β†’ List Ξ± β†’ β„•
length
≃
Ξ±: Type ?u.2770
Ξ±
where toFun
i: ?m.2840
i
:=
l: List Ξ±
l
.
get: {Ξ± : Type ?u.2842} β†’ (as : List Ξ±) β†’ Fin (length as) β†’ Ξ±
get
i: ?m.2840
i
invFun
a: ?m.2851
a
:= ⟨_,
indexOf_lt_length: βˆ€ {Ξ± : Type ?u.2858} [inst : DecidableEq Ξ±] {a : Ξ±} {l : List Ξ±}, indexOf a l < length l ↔ a ∈ l
indexOf_lt_length
.
2: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
2
(
h: βˆ€ (x : Ξ±), x ∈ l
h
a: ?m.2851
a
)⟩ left_inv
i: ?m.2928
i
:=

Goals accomplished! πŸ™
Ξ±: Type ?u.2770

inst✝: DecidableEq α

l: List Ξ±

nd: Nodup l

h: βˆ€ (x : Ξ±), x ∈ l

i: Fin (length l)


(fun a => { val := indexOf a l, isLt := (_ : indexOf a l < length l) }) ((fun i => get l i) i) = i

Goals accomplished! πŸ™
right_inv
a: ?m.2934
a
:=

Goals accomplished! πŸ™
Ξ±: Type ?u.2770

inst✝: DecidableEq α

l: List Ξ±

nd: Nodup l

h: βˆ€ (x : Ξ±), x ∈ l

a: Ξ±


(fun i => get l i) ((fun a => { val := indexOf a l, isLt := (_ : indexOf a l < length l) }) a) = a

Goals accomplished! πŸ™
#align list.nodup.nth_le_equiv_of_forall_mem_list
List.Nodup.getEquivOfForallMemList: {Ξ± : Type u_1} β†’ [inst : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Nodup l β†’ (βˆ€ (x : Ξ±), x ∈ l) β†’ Fin (length l) ≃ Ξ±
List.Nodup.getEquivOfForallMemList
end Nodup namespace Sorted variable [
Preorder: Type ?u.6846 β†’ Type ?u.6846
Preorder
Ξ±: Type ?u.5749
Ξ±
] {
l: List Ξ±
l
:
List: Type ?u.6013 β†’ Type ?u.6013
List
Ξ±: Type ?u.5740
Ξ±
} theorem
get_mono: Sorted (fun x x_1 => x ≀ x_1) l β†’ Monotone (get l)
get_mono
(
h: Sorted (fun x x_1 => x ≀ x_1) l
h
:
l: List Ξ±
l
.
Sorted: {Ξ± : Type ?u.5758} β†’ (Ξ± β†’ Ξ± β†’ Prop) β†’ List Ξ± β†’ Prop
Sorted
(Β· ≀ Β·): Ξ± β†’ Ξ± β†’ Prop
(Β· ≀ Β·)
) :
Monotone: {Ξ± : Type ?u.5831} β†’ {Ξ² : Type ?u.5830} β†’ [inst : Preorder Ξ±] β†’ [inst : Preorder Ξ²] β†’ (Ξ± β†’ Ξ²) β†’ Prop
Monotone
l: List Ξ±
l
.
get: {Ξ± : Type ?u.5872} β†’ (as : List Ξ±) β†’ Fin (length as) β†’ Ξ±
get
:= fun
_: ?m.5925
_
_: ?m.5928
_
=>
h: Sorted (fun x x_1 => x ≀ x_1) l
h
.
rel_get_of_le: βˆ€ {Ξ± : Type ?u.5930} {r : Ξ± β†’ Ξ± β†’ Prop} [inst : IsRefl Ξ± r] {l : List Ξ±}, Sorted r l β†’ βˆ€ {a b : Fin (length l)}, a ≀ b β†’ r (get l a) (get l b)
rel_get_of_le
#align list.sorted.nth_le_mono
List.Sorted.get_mono: βˆ€ {Ξ± : Type u_1} [inst : Preorder Ξ±] {l : List Ξ±}, Sorted (fun x x_1 => x ≀ x_1) l β†’ Monotone (get l)
List.Sorted.get_mono
theorem
get_strictMono: Sorted (fun x x_1 => x < x_1) l β†’ StrictMono (get l)
get_strictMono
(
h: Sorted (fun x x_1 => x < x_1) l
h
:
l: List Ξ±
l
.
Sorted: {Ξ± : Type ?u.6016} β†’ (Ξ± β†’ Ξ± β†’ Prop) β†’ List Ξ± β†’ Prop
Sorted
(Β· < Β·): Ξ± β†’ Ξ± β†’ Prop
(Β· < Β·)
) :
StrictMono: {Ξ± : Type ?u.6086} β†’ {Ξ² : Type ?u.6085} β†’ [inst : Preorder Ξ±] β†’ [inst : Preorder Ξ²] β†’ (Ξ± β†’ Ξ²) β†’ Prop
StrictMono
l: List Ξ±
l
.
get: {Ξ± : Type ?u.6127} β†’ (as : List Ξ±) β†’ Fin (length as) β†’ Ξ±
get
:= fun
_: ?m.6180
_
_: ?m.6183
_
=>
h: Sorted (fun x x_1 => x < x_1) l
h
.
rel_get_of_lt: βˆ€ {Ξ± : Type ?u.6185} {r : Ξ± β†’ Ξ± β†’ Prop} {l : List Ξ±}, Sorted r l β†’ βˆ€ {a b : Fin (length l)}, a < b β†’ r (get l a) (get l b)
rel_get_of_lt
#align list.sorted.nth_le_strict_mono
List.Sorted.get_strictMono: βˆ€ {Ξ± : Type u_1} [inst : Preorder Ξ±] {l : List Ξ±}, Sorted (fun x x_1 => x < x_1) l β†’ StrictMono (get l)
List.Sorted.get_strictMono
variable [
DecidableEq: Sort ?u.6244 β†’ Sort (max1?u.6244)
DecidableEq
Ξ±: Type ?u.6843
Ξ±
] /-- 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
getIso: {Ξ± : Type u_1} β†’ [inst : Preorder Ξ±] β†’ [inst_1 : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Sorted (fun x x_1 => x < x_1) l β†’ Fin (length l) ≃o { x // x ∈ l }
getIso
(
l: List Ξ±
l
:
List: Type ?u.6271 β†’ Type ?u.6271
List
Ξ±: Type ?u.6253
Ξ±
) (
H: Sorted (fun x x_1 => x < x_1) l
H
:
Sorted: {Ξ± : Type ?u.6274} β†’ (Ξ± β†’ Ξ± β†’ Prop) β†’ List Ξ± β†’ Prop
Sorted
(Β· < Β·): Ξ± β†’ Ξ± β†’ Prop
(Β· < Β·)
l: List Ξ±
l
) :
Fin: β„• β†’ Type
Fin
(
length: {Ξ± : Type ?u.6343} β†’ List Ξ± β†’ β„•
length
l: List Ξ±
l
) ≃o {
x: ?m.6349
x
//
x: ?m.6349
x
∈
l: List Ξ±
l
} where toEquiv :=
H: Sorted (fun x x_1 => x < x_1) l
H
.
nodup: βˆ€ {Ξ± : Type ?u.6438} {r : Ξ± β†’ Ξ± β†’ Prop} [inst : IsIrrefl Ξ± r] {l : List Ξ±}, Sorted r l β†’ Nodup l
nodup
.
getEquiv: {Ξ± : Type ?u.6476} β†’ [inst : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Nodup l β†’ Fin (length l) ≃ { x // x ∈ l }
getEquiv
l: List Ξ±
l
map_rel_iff' :=
H: Sorted (fun x x_1 => x < x_1) l
H
.
get_strictMono: βˆ€ {Ξ± : Type ?u.6530} [inst : Preorder Ξ±] {l : List Ξ±}, Sorted (fun x x_1 => x < x_1) l β†’ StrictMono (get l)
get_strictMono
.
le_iff_le: βˆ€ {Ξ± : Type ?u.6541} {Ξ² : Type ?u.6540} [inst : LinearOrder Ξ±] [inst_1 : Preorder Ξ²] {f : Ξ± β†’ Ξ²}, StrictMono f β†’ βˆ€ {a b : Ξ±}, f a ≀ f b ↔ a ≀ b
le_iff_le
#align list.sorted.nth_le_iso
List.Sorted.getIso: {Ξ± : Type u_1} β†’ [inst : Preorder Ξ±] β†’ [inst_1 : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Sorted (fun x x_1 => x < x_1) l β†’ Fin (length l) ≃o { x // x ∈ l }
List.Sorted.getIso
variable (
H: Sorted (fun x x_1 => x < x_1) l
H
:
Sorted: {Ξ± : Type ?u.6977} β†’ (Ξ± β†’ Ξ± β†’ Prop) β†’ List Ξ± β†’ Prop
Sorted
(Β· < Β·): Ξ± β†’ Ξ± β†’ Prop
(Β· < Β·)
l: List Ξ±
l
) {
x: { x // x ∈ l }
x
: {
x: ?m.7047
x
//
x: ?m.6931
x
∈
l: List Ξ±
l
}} {
i: Fin (length l)
i
:
Fin: β„• β†’ Type
Fin
l: List Ξ±
l
.
length: {Ξ± : Type ?u.7069} β†’ List Ξ± β†’ β„•
length
} @[simp] theorem
coe_getIso_apply: βˆ€ {Ξ± : Type u_1} [inst : Preorder Ξ±] {l : List Ξ±} [inst_1 : DecidableEq Ξ±] (H : Sorted (fun x x_1 => x < x_1) l) {i : Fin (length l)}, ↑(↑(getIso l H) i) = get l i
coe_getIso_apply
: (
H: Sorted (fun x x_1 => x < x_1) l
H
.
getIso: {Ξ± : Type ?u.7091} β†’ [inst : Preorder Ξ±] β†’ [inst_1 : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Sorted (fun x x_1 => x < x_1) l β†’ Fin (length l) ≃o { x // x ∈ l }
getIso
l: List Ξ±
l
i: Fin (length l)
i
:
Ξ±: Type ?u.6959
Ξ±
) =
get: {Ξ± : Type ?u.7389} β†’ (as : List Ξ±) β†’ Fin (length as) β†’ Ξ±
get
l: List Ξ±
l
i: Fin (length l)
i
:=
rfl: βˆ€ {Ξ± : Sort ?u.7394} {a : Ξ±}, a = a
rfl
#align list.sorted.coe_nth_le_iso_apply
List.Sorted.coe_getIso_apply: βˆ€ {Ξ± : Type u_1} [inst : Preorder Ξ±] {l : List Ξ±} [inst_1 : DecidableEq Ξ±] (H : Sorted (fun x x_1 => x < x_1) l) {i : Fin (length l)}, ↑(↑(getIso l H) i) = get l i
List.Sorted.coe_getIso_apply
@[simp] theorem
coe_getIso_symm_apply: βˆ€ {Ξ± : Type u_1} [inst : Preorder Ξ±] {l : List Ξ±} [inst_1 : DecidableEq Ξ±] (H : Sorted (fun x x_1 => x < x_1) l) {x : { x // x ∈ l }}, ↑(↑(OrderIso.symm (getIso l H)) x) = indexOf (↑x) l
coe_getIso_symm_apply
: ((
H: Sorted (fun x x_1 => x < x_1) l
H
.
getIso: {Ξ± : Type ?u.7612} β†’ [inst : Preorder Ξ±] β†’ [inst_1 : DecidableEq Ξ±] β†’ (l : List Ξ±) β†’ Sorted (fun x x_1 => x < x_1) l β†’ Fin (length l) ≃o { x // x ∈ l }
getIso
l: List Ξ±
l
).
symm: {Ξ± : Type ?u.7679} β†’ {Ξ² : Type ?u.7678} β†’ [inst : LE Ξ±] β†’ [inst_1 : LE Ξ²] β†’ Ξ± ≃o Ξ² β†’ Ξ² ≃o Ξ±
symm
x: { x // x ∈ l }
x
:
β„•: Type
β„•
) =
indexOf: {Ξ± : Type ?u.7931} β†’ [inst : BEq Ξ±] β†’ Ξ± β†’ List Ξ± β†’ β„•
indexOf
(↑
x: { x // x ∈ l }
x
)
l: List Ξ±
l
:=
rfl: βˆ€ {Ξ± : Sort ?u.8090} {a : Ξ±}, a = a
rfl
#align list.sorted.coe_nth_le_iso_symm_apply
List.Sorted.coe_getIso_symm_apply: βˆ€ {Ξ± : Type u_1} [inst : Preorder Ξ±] {l : List Ξ±} [inst_1 : DecidableEq Ξ±] (H : Sorted (fun x x_1 => x < x_1) l) {x : { x // x ∈ l }}, ↑(↑(OrderIso.symm (getIso l H)) x) = indexOf (↑x) l
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'`. -/ theorem
sublist_of_orderEmbedding_get?_eq: βˆ€ {l l' : List Ξ±} (f : β„• β†ͺo β„•), (βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)) β†’ l <+ l'
sublist_of_orderEmbedding_get?_eq
{
l: List Ξ±
l
l': List Ξ±
l'
:
List: Type ?u.8220 β†’ Type ?u.8220
List
Ξ±: Type ?u.8214
Ξ±
} (f :
β„•: Type
β„•
β†ͺo
β„•: Type
β„•
) (
hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
hf
: βˆ€
ix: β„•
ix
:
β„•: Type
β„•
,
l: List Ξ±
l
.
get?: {Ξ± : Type ?u.8236} β†’ List Ξ± β†’ β„• β†’ Option Ξ±
get?
ix: β„•
ix
=
l': List Ξ±
l'
.
get?: {Ξ± : Type ?u.8242} β†’ List Ξ± β†’ β„• β†’ Option Ξ±
get?
(f
ix: β„•
ix
)) :
l: List Ξ±
l
<+
l': List Ξ±
l'
:=

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ l'
Ξ±: 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
hd :: tl <+ l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ l'
Ξ±: 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)

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
hd :: tl <+ l'

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

this: some hd = get? l' (↑f 0)


cons
hd :: tl <+ l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

this: some hd = get? l' (↑f 0)


cons
hd :: tl <+ 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)

this: get? l' (↑f 0) = some hd


cons
hd :: tl <+ 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)

this: some hd = get? l' (↑f 0)


cons
hd :: tl <+ 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)

this: βˆƒ h, get l' { val := ↑f 0, isLt := h } = hd


cons
hd :: tl <+ 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)

this: βˆƒ h, get l' { val := ↑f 0, isLt := h } = hd


cons
hd :: tl <+ 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)

this: βˆƒ h, get l' { val := ↑f 0, isLt := h } = hd


cons
hd :: tl <+ l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

w: ↑f 0 < length l'

h: get l' { val := ↑f 0, isLt := w } = hd


cons.intro
hd :: tl <+ l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

w: ↑f 0 < length l'

h: get l' { val := ↑f 0, isLt := w } = hd


cons.intro
hd :: tl <+ l'

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

a, b: β„•


(fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≀ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ 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: β„•


↑f (a + 1) - (↑f 0 + 1) ≀ ↑f (b + 1) - (↑f 0 + 1) ↔ 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: β„•


(fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≀ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ 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: β„•


↑f (a + 1) - (↑f 0 + 1) ≀ ↑f (b + 1) - (↑f 0 + 1) ↔ 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: β„•


↑f (a + 1) ≀ ↑f (b + 1) ↔ 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: β„•


↑f 0 + 1 ≀ ↑f (b + 1)
Ξ±: 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: β„•


↑f (a + 1) - (↑f 0 + 1) ≀ ↑f (b + 1) - (↑f 0 + 1) ↔ 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: β„•


a + 1 ≀ b + 1 ↔ 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: β„•


↑f 0 + 1 ≀ ↑f (b + 1)
Ξ±: 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: β„•


↑f (a + 1) - (↑f 0 + 1) ≀ ↑f (b + 1) - (↑f 0 + 1) ↔ 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: β„•


↑f 0 + 1 ≀ ↑f (b + 1)
Ξ±: 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: β„•


↑f 0 + 1 ≀ ↑f (b + 1)
Ξ±: 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: β„•


(fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≀ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ 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: β„•


↑f 0 + 1 ≀ ↑f (b + 1)
Ξ±: 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: β„•


↑f 0 < ↑f (b + 1)
Ξ±: 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: β„•


↑f 0 + 1 ≀ ↑f (b + 1)
Ξ±: 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: β„•


0 < b + 1
Ξ±: 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: β„•


0 < b + 1
Ξ±: 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: β„•


(fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≀ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≀ b

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

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.intro
hd :: tl <+ l'

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 β„•


βˆ€ (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 β„•

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 β„•


βˆ€ (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 β„•

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 β„•

ix: β„•


get? tl ix = get? l' (↑f 0 + 1 + ↑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 β„•

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 β„•

ix: β„•


get? tl ix = get? l' (↑f 0 + 1 + (↑f (ix + 1) - (↑f 0 + 1)))
Ξ±: 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: β„•


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 β„•

ix: β„•


get? tl ix = get? l' (↑f (ix + 1))
Ξ±: 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: β„•


↑f 0 + 1 ≀ ↑f (ix + 1)
Ξ±: 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: β„•


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 β„•

ix: β„•


get? tl ix = get? (hd :: tl) (ix + 1)
Ξ±: 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: β„•


↑f 0 + 1 ≀ ↑f (ix + 1)
Ξ±: 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: β„•


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 β„•

ix: β„•


get? tl ix = get? tl 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: β„•


↑f 0 + 1 ≀ ↑f (ix + 1)
Ξ±: 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: β„•


↑f 0 + 1 ≀ ↑f (ix + 1)
Ξ±: 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 : β„•), 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 β„•

ix: β„•


↑f 0 + 1 ≀ ↑f (ix + 1)
Ξ±: 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: β„•


↑f 0 < ↑f (ix + 1)
Ξ±: 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: β„•


↑f 0 + 1 ≀ ↑f (ix + 1)
Ξ±: 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: β„•


0 < ix + 1
Ξ±: 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: β„•


0 < ix + 1
Ξ±: 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 : β„•), get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

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
hd :: tl <+ 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)

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
hd :: tl <+ take (↑f 0 + 1) l' ++ drop (↑f 0 + 1) 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)

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
hd :: tl <+ 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)

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
[hd] ++ tl <+ take (↑f 0 + 1) l' ++ drop (↑f 0 + 1) 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)

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
[hd] ++ tl <+ take (↑f 0 + 1) l' ++ drop (↑f 0 + 1) l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

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)


[hd] <+ take (↑f 0 + 1) l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ 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)

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)


[hd] <+ take (↑f 0 + 1) 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)

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)


hd ∈ take (↑f 0 + 1) 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)

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)


[hd] <+ take (↑f 0 + 1) 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)

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)


get l' { val := ↑f 0, isLt := w } ∈ take (↑f 0 + 1) 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)

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)


[hd] <+ take (↑f 0 + 1) 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)

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)


get (take (Nat.succ (↑f 0)) l') { val := ↑f 0, isLt := (_ : ↑f 0 < length (take (Nat.succ (↑f 0)) l')) } ∈ take (↑f 0 + 1) 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)

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)


get (take (Nat.succ (↑f 0)) l') { val := ↑f 0, isLt := (_ : ↑f 0 < length (take (Nat.succ (↑f 0)) l')) } ∈ take (↑f 0 + 1) l'
Ξ±: Type u_1

l, l': List Ξ±

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)


l <+ l'

Goals accomplished! πŸ™
#align list.sublist_of_order_embedding_nth_eq
List.sublist_of_orderEmbedding_get?_eq: βˆ€ {Ξ± : Type u_1} {l l' : List Ξ±} (f : β„• β†ͺo β„•), (βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)) β†’ l <+ l'
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'`. -/ theorem
sublist_iff_exists_orderEmbedding_get?_eq: βˆ€ {l l' : List Ξ±}, l <+ l' ↔ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
sublist_iff_exists_orderEmbedding_get?_eq
{
l: List Ξ±
l
l': List Ξ±
l'
:
List: Type ?u.16333 β†’ Type ?u.16333
List
Ξ±: Type ?u.16327
Ξ±
} :
l: List Ξ±
l
<+
l': List Ξ±
l'
↔ βˆƒ f :
β„•: Type
β„•
β†ͺo
β„•: Type
β„•
, βˆ€
ix: β„•
ix
:
β„•: Type
β„•
,
l: List Ξ±
l
.
get?: {Ξ± : Type ?u.16355} β†’ List Ξ± β†’ β„• β†’ Option Ξ±
get?
ix: β„•
ix
=
l': List Ξ±
l'
.
get?: {Ξ± : Type ?u.16360} β†’ List Ξ± β†’ β„• β†’ Option Ξ±
get?
(f
ix: β„•
ix
) :=

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±


l <+ l' ↔ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mpr
(βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)) β†’ l <+ l'
Ξ±: Type u_1

l, l': List Ξ±


l <+ l' ↔ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mpr
(βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)) β†’ l <+ l'
Ξ±: Type u_1

l, l': List Ξ±

H: l <+ l'


mp
βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp.slnil
βˆƒ f, βˆ€ (ix : β„•), get? [] ix = get? [] (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp.slnil
βˆƒ f, βˆ€ (ix : β„•), get? [] ix = get? [] (↑f ix)
Ξ±: Type u_1

l, l': List Ξ±


mp.slnil
βˆƒ f, βˆ€ (ix : β„•), get? [] ix = get? [] (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f ix)

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons.intro
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons.intro
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)

x✝: β„•


βˆ€ ⦃b : ℕ⦄, x✝ < b β†’ (fun x => x + 1) x✝ < (fun x => x + 1) b

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

f: β„• β†ͺo β„•

hf: βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons.intro
βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑(RelEmbedding.trans f (OrderEmbedding.ofStrictMono (fun x => x + 1) (_ : βˆ€ (x a : β„•), x < a β†’ x + 1 < a + 1))) ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

y: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.cons
βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? (y :: ys) (↑f ix)

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l': List Ξ±


mp
l <+ l' β†’ βˆƒ f, βˆ€ (ix : β„•), get? l ix = get? l' (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f 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
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f 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'_1
βˆ€ (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
Ξ±: 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))) ?mp.consβ‚‚.intro.refine'_1) ix)
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f 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'_1
βˆ€ (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
Ξ±: 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
βˆ€ (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
Ξ±: 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))) ?mp.consβ‚‚.intro.refine'_1) 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'_1.zero.zero
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ↔ Nat.zero ≀ 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'_1.zero.succ
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ↔ Nat.zero ≀ 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)

n✝: β„•


mp.consβ‚‚.intro.refine'_1.succ.zero
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ↔ Nat.succ n✝ ≀ 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✝¹, n✝: β„•


mp.consβ‚‚.intro.refine'_1.succ.succ
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝¹) ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ↔ Nat.succ n✝¹ ≀ 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'_1
βˆ€ (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
Ξ±: 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
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ↔ Nat.zero ≀ 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'_1.zero.succ
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ↔ Nat.zero ≀ 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)

n✝: β„•


mp.consβ‚‚.intro.refine'_1.succ.zero
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ↔ Nat.succ n✝ ≀ 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✝¹, n✝: β„•


mp.consβ‚‚.intro.refine'_1.succ.succ
(fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝¹) ≀ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ↔ Nat.succ n✝¹ ≀ 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'_1
βˆ€ (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

Goals accomplished! πŸ™
Ξ±: Type u_1

l, l', xs, ys: List Ξ±

x: Ξ±

_H: xs <+ ys

IH: βˆƒ f, βˆ€ (ix : β„•), get? xs ix = get? ys (↑f ix)


mp.consβ‚‚
βˆƒ f, βˆ€ (ix : β„•), get? (x :: xs) ix = get? (x :: ys) (↑f 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
βˆ€ (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.zero
get? (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.succ
get? (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.zero
get? (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.zero
get? (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.succ
get? (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.succ
get? (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)

n✝: β„•


mp.consβ‚‚.intro.refine'_2.succ
get? (x ::