case zero
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs✝ : List α
h✝ : Nodup xs✝
n : ℕ
hn✝ : n + 1 < length xs✝
xs : List α
h : Nodup xs
hn : Nat.zero + 1 < length xs
⊢ ↑(formPerm xs) (nthLe xs Nat.zero (_ : Nat.zero < length xs)) = nthLe xs (Nat.zero + 1) hn

case succ
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs✝ : List α
h✝ : Nodup xs✝
n✝ : ℕ
hn✝ : n✝ + 1 < length xs✝
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
xs : List α
h : Nodup xs
hn : Nat.succ n + 1 < length xs
⊢ ↑(formPerm xs) (nthLe xs (Nat.succ n) (_ : Nat.succ n < length xs)) = nthLe xs (Nat.succ n + 1) hn
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs : List α
h : Nodup xs
n : ℕ
hn : n + 1 < length xs
⊢ ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
induction' n with n IH generalizing xs
no goals
case zero
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs✝ : List α
h✝ : Nodup xs✝
n : ℕ
hn✝ : n + 1 < length xs✝
xs : List α
h : Nodup xs
hn : Nat.zero + 1 < length xs
⊢ ↑(formPerm xs) (nthLe xs Nat.zero (_ : Nat.zero < length xs)) = nthLe xs (Nat.zero + 1) hn
simpa using formPerm_apply_nthLe_zero _ h _
case succ.nil
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
h : Nodup []
hn : Nat.succ n + 1 < length []
⊢ ↑(formPerm []) (nthLe [] (Nat.succ n) (_ : Nat.succ n < length [])) = nthLe [] (Nat.succ n + 1) hn

case succ.cons.nil
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x : α
h : Nodup [x]
hn : Nat.succ n + 1 < length [x]
⊢ ↑(formPerm [x]) (nthLe [x] (Nat.succ n) (_ : Nat.succ n < length [x])) = nthLe [x] (Nat.succ n + 1) hn

case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
⊢ ↑(formPerm (x :: y :: l)) (nthLe (x :: y :: l) (Nat.succ n) (_ : Nat.succ n < length (x :: y :: l))) =
    nthLe (x :: y :: l) (Nat.succ n + 1) hn
case succ
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs✝ : List α
h✝ : Nodup xs✝
n✝ : ℕ
hn✝ : n✝ + 1 < length xs✝
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
xs : List α
h : Nodup xs
hn : Nat.succ n + 1 < length xs
⊢ ↑(formPerm xs) (nthLe xs (Nat.succ n) (_ : Nat.succ n < length xs)) = nthLe xs (Nat.succ n + 1) hn
rcases xs with (_ | ⟨x, _ | ⟨y, l⟩⟩)
no goals
case succ.nil
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
h : Nodup []
hn : Nat.succ n + 1 < length []
⊢ ↑(formPerm []) (nthLe [] (Nat.succ n) (_ : Nat.succ n < length [])) = nthLe [] (Nat.succ n + 1) hn
simp at hn
no goals
case succ.cons.nil
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x : α
h : Nodup [x]
hn : Nat.succ n + 1 < length [x]
⊢ ↑(formPerm [x]) (nthLe [x] (Nat.succ n) (_ : Nat.succ n < length [x])) = nthLe [x] (Nat.succ n + 1) hn
simp
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
⊢ n + 1 < length (y :: l)

case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH : ↑(formPerm (y :: l)) (nthLe (y :: l) n (_ : n < length (y :: l))) = nthLe (y :: l) (n + 1) ?succ.cons.cons
⊢ ↑(formPerm (x :: y :: l)) (nthLe (x :: y :: l) (Nat.succ n) (_ : Nat.succ n < length (x :: y :: l))) =
    nthLe (x :: y :: l) (Nat.succ n + 1) hn
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
⊢ ↑(formPerm (x :: y :: l)) (nthLe (x :: y :: l) (Nat.succ n) (_ : Nat.succ n < length (x :: y :: l))) =
    nthLe (x :: y :: l) (Nat.succ n + 1) hn
specialize IH (y :: l) h.of_cons _
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (nthLe (y :: l) n (_ : n < length (y :: l))) =
    nthLe (y :: l) (n + 1) (_ : n + 1 < length (y :: l))
⊢ ↑(formPerm (y :: l)) (nthLe (x :: y :: l) (Nat.succ n) (_ : Nat.succ n < length (x :: y :: l))) =
    ↑(swap x y) (nthLe (x :: y :: l) (Nat.succ n + 1) hn)
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (nthLe (y :: l) n (_ : n < length (y :: l))) =
    nthLe (y :: l) (n + 1) (_ : n + 1 < length (y :: l))
⊢ ↑(formPerm (x :: y :: l)) (nthLe (x :: y :: l) (Nat.succ n) (_ : Nat.succ n < length (x :: y :: l))) =
    nthLe (x :: y :: l) (Nat.succ n + 1) hn
simp only [swap_apply_eq_iff, coe_mul, formPerm_cons_cons, Function.comp]
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
⊢ ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    ↑(swap x y) (get l { val := n, isLt := (_ : n < length l) })
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (nthLe (y :: l) n (_ : n < length (y :: l))) =
    nthLe (y :: l) (n + 1) (_ : n + 1 < length (y :: l))
⊢ ↑(formPerm (y :: l)) (nthLe (x :: y :: l) (Nat.succ n) (_ : Nat.succ n < length (x :: y :: l))) =
    ↑(swap x y) (nthLe (x :: y :: l) (Nat.succ n + 1) hn)
simp only [nthLe, get_cons_succ] at *
no goals
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
⊢ ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    ↑(swap x y) (get l { val := n, isLt := (_ : n < length l) })
rw [← IH, swap_apply_of_ne_of_ne] <;>
. intro hx
  rw [← hx, IH] at h
  simp [get_mem] at h
no goals
case succ.cons.cons
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH :
  ∀ (xs : List α),
    Nodup xs → ∀ (hn : n + 1 < length xs), ↑(formPerm xs) (nthLe xs n (_ : n < length xs)) = nthLe xs (n + 1) hn
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
⊢ n + 1 < length (y :: l)
simpa [Nat.succ_lt_succ_iff] using hn
case succ.cons.cons.a
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
hx : ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) = y
⊢ False
case succ.cons.cons.a
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
⊢ ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) ≠ y
intro hx
case succ.cons.cons.a
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
hn : Nat.succ n + 1 < length (x :: y :: l)
h : Nodup (x :: get l { val := n, isLt := (_ : n < length l) } :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
hx : ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) = y
⊢ False
case succ.cons.cons.a
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
h : Nodup (x :: y :: l)
hn : Nat.succ n + 1 < length (x :: y :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
hx : ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) = y
⊢ False
rw [← hx, IH] at h
no goals
case succ.cons.cons.a
α : Type u_1
β : Type ?u.750411
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
xs : List α
h✝ : Nodup xs
n✝ : ℕ
hn✝ : n✝ + 1 < length xs
n : ℕ
IH✝ :
  ∀ (xs : List α),
    Nodup xs →
      ∀ (hn : n + 1 < length xs),
        ↑(formPerm xs) (get xs { val := n, isLt := (_ : n < length xs) }) = get xs { val := n + 1, isLt := hn }
x y : α
l : List α
hn : Nat.succ n + 1 < length (x :: y :: l)
h : Nodup (x :: get l { val := n, isLt := (_ : n < length l) } :: l)
IH :
  ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) =
    get l { val := n, isLt := (_ : n < length l) }
hx : ↑(formPerm (y :: l)) (get (y :: l) { val := n, isLt := (_ : n < length (y :: l)) }) = y
⊢ False
simp [get_mem] at h