Theorem: Digraph.Walk.cons_isCycle_iff (GraphProjects/DigraphConnectivity.lean)

State before:
V : Type u
V' : Type v
V'' : Type w
G : Digraph V
G' : Digraph V'
G'' : Digraph V''
u v : V
p : Walk G v u
h : G.Adj u v
⊢ IsCycle (cons h p) ↔ IsPath p ∧ ¬(u, v) ∈ edges p
Tactic:
simp only [Walk.isCycle_def, Walk.isPath_def, Walk.isTrail_def, edges_cons, List.nodup_cons,
  support_cons, List.tail_cons]
State after:
V : Type u
V' : Type v
V'' : Type w
G : Digraph V
G' : Digraph V'
G'' : Digraph V''
u v : V
p : Walk G v u
h : G.Adj u v
⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔
    List.Nodup (support p) ∧ ¬(u, v) ∈ edges p

State before:
V : Type u
V' : Type v
V'' : Type w
G : Digraph V
G' : Digraph V'
G'' : Digraph V''
u v : V
p : Walk G v u
h : G.Adj u v
⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔
    List.Nodup (support p) ∧ ¬(u, v) ∈ edges p
Tactic:
have : p.support.Nodup → p.edges.Nodup := edges_nodup_of_support_nodup
State after:
V : Type u
V' : Type v
V'' : Type w
G : Digraph V
G' : Digraph V'
G'' : Digraph V''
u v : V
p : Walk G v u
h : G.Adj u v
this : List.Nodup (support p) → List.Nodup (edges p)
⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔
    List.Nodup (support p) ∧ ¬(u, v) ∈ edges p

State before:
V : Type u
V' : Type v
V'' : Type w
G : Digraph V
G' : Digraph V'
G'' : Digraph V''
u v : V
p : Walk G v u
h : G.Adj u v
this : List.Nodup (support p) → List.Nodup (edges p)
⊢ (¬(u, v) ∈ edges p ∧ List.Nodup (edges p)) ∧ cons h p ≠ nil ∧ List.Nodup (support p) ↔
    List.Nodup (support p) ∧ ¬(u, v) ∈ edges p
Tactic:
tauto
State after:
no goals