The question appeared in a MC setting, but it's really about Coq.
During one of my experimental proofs, a rewrite (propT H314159).
made a True /\ ...
appear within the goal.
I found how to rewrite/simplify the equivalent for booleans (andb_true_l
), but nothing for Prop
. I searched both using (True /\ _)
and using left_id
, but nothing turned up.
I ended up using a have foo: ...
then rewrite foo; clear foo
, which is pretty ugly.
Did I miss something obvious or is there something missing?
one option is to use AAC Tactics with the Prop instances: https://github.com/coq-community/aac-tactics/blob/master/theories/Instances.v#L206
By default True /\ P = P
fails and you only get True /\ P <-> P
— might be too restrictive for ssrfun.left_id
? Definition left_id e op := forall x, op e x = x.
right, the AAC stuff only works under the iff
relation. I don't think many people do much reasoning under =
on Prop
?
mostly I was pointing out why an ssreflect left_id
lemma can't be proven (in axiom-free Coq).
@Julien Puydt BTW, rewrite foo; clear foo
is rewrite {}foo
, and there's even rewrite (_ : A = B)
(or here rewrite (_ : A <-> B)
)
Ok, so now it's:
have foo: forall P: Prop, (True /\ P) <-> P.
move=> P.
split.
by move=> [_ -].
by [].
rewrite {}foo.
but indeed I didn't use an equality but equivalence, so left_id
wasn't a good search.
So, should I report it as wishlist issue against Coq?
Julien Puydt has marked this topic as resolved.
Last updated: Oct 04 2023 at 23:01 UTC