Theorem: Assignment.removePos_addPos_cancel (LeanSAT/LRAT/Assignment.lean)

State before:
assignment : Assignment
h : ¬assignment.hasPosAssignment = true
⊢ assignment.addPosAssignment.removePosAssignment = assignment
Tactic:
rw [removePosAssignment, addPosAssignment]
State after:
assignment : Assignment
h : ¬assignment.hasPosAssignment = true
⊢ (match
      match assignment with
      | pos => pos
      | neg => both
      | both => both
      | unassigned => pos with
    | pos => unassigned
    | neg => neg
    | both => neg
    | unassigned => unassigned) =
    assignment

State before:
assignment : Assignment
h : ¬assignment.hasPosAssignment = true
⊢ (match
      match assignment with
      | pos => pos
      | neg => both
      | both => both
      | unassigned => pos with
    | pos => unassigned
    | neg => neg
    | both => neg
    | unassigned => unassigned) =
    assignment
Tactic:
rw [hasPosAssignment] at h
State after:
assignment : Assignment
h :
  ¬(match assignment with
      | pos => true
      | neg => false
      | both => true
      | unassigned => false) =
      true
⊢ (match
      match assignment with
      | pos => pos
      | neg => both
      | both => both
      | unassigned => pos with
    | pos => unassigned
    | neg => neg
    | both => neg
    | unassigned => unassigned) =
    assignment

State before:
assignment : Assignment
h :
  ¬(match assignment with
      | pos => true
      | neg => false
      | both => true
      | unassigned => false) =
      true
⊢ (match
      match assignment with
      | pos => pos
      | neg => both
      | both => both
      | unassigned => pos with
    | pos => unassigned
    | neg => neg
    | both => neg
    | unassigned => unassigned) =
    assignment
Tactic:
cases assignment <;> simp_all
State after:
no goals