α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
⊢ p (get n as)
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
⊢ p default → (∀ (x : α), x ∈ as → p x) → ∀ (n : ℕ), p (get n as)
intro h1 h2 n
case pos
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : n < length as
⊢ p (get n as)

case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : ¬n < length as
⊢ p (get n as)
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
⊢ p (get n as)
by_cases h3 : n < as.length
no goals
case pos
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : n < length as
⊢ p (get n as)
apply h2 _ (mem_get_of_le h3)
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : length as ≤ n
⊢ p (get n as)
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : ¬n < length as
⊢ p (get n as)
rw [not_lt] at h3
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : length as ≤ n
⊢ p default
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : length as ≤ n
⊢ p (get n as)
rw [get_eq_default_of_le _ h3]
no goals
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : length as ≤ n
⊢ p default
apply h1