Lean4
/-- Apply symmetry to `H`, which is an `Eq` or a `HEq`.
* If `heqProofs` is true, ensure the result is a `HEq` (otherwise it is assumed to be `Eq`).
* If `flipped` is true, apply `symm`, otherwise keep the same direction. -/
def flipProof (H : EntryExpr) (flipped heqProofs : Bool) : CCM EntryExpr :=
match H with
| .ofExpr H => EntryExpr.ofExpr <$> flipProofCore H flipped heqProofs
| .ofDExpr H => EntryExpr.ofDExpr <$> flipDelayedProofCore H flipped heqProofs
| _ => return H