Skip to content

Comment on Formally Verifying Rust's Opaque Types

Comments

The manual proof style was nice to see for pedagogical purposes, however it should be noted that the statement is just a intuitionistic tautology, so much so that the entire proof can be automated with the built-in firstorder tactic:

  Theorem impl_trait_transform: forall (Trait: Type -> Prop) (Result: Prop),
      ((exists t, Trait(t)) -> Result) <-> (forall t, (Trait(t) -> Result)).
  Proof.
    firstorder.
  Qed.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.