Skip to content

Commit

Permalink
Merge pull request #636 from formal-land/guillaume-claret@more-stack-…
Browse files Browse the repository at this point in the history
…verification

More stack verification
  • Loading branch information
clarus authored Dec 19, 2024
2 parents 3607080 + 0f6bd82 commit eb75e1f
Show file tree
Hide file tree
Showing 7 changed files with 415 additions and 243 deletions.
2 changes: 2 additions & 0 deletions CoqOfRust/RecordUpdate.v
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Class Setter{R E: Type}(getter: R -> E): Type :=
set : E -> R -> R.

Arguments set {R E} (getter) {Setter} (fieldUpdater) (r).
(* Reduce when calling the [cbn] tactic *)
Arguments set /.

Global Hint Extern 1 (@Setter ?R ?E ?getter) =>
exact_setter R getter : typeclass_instances.
Expand Down
8 changes: 8 additions & 0 deletions CoqOfRust/core/simulations/eq.v
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ Module Eq.
Class Trait (Self : Set) : Set := {
eqb: Self -> Self -> bool
}.

Module Valid.
(** An equality [equal] is valid when it decides the standard equality [=]. *)
Definition t {Self : Set} `{Trait Self} (domain : Self -> Prop) : Prop :=
forall x y,
domain x -> domain y ->
(x = y) <-> (eqb x y = true).
End Valid.
End Eq.

Module Notations.
Expand Down
Loading

0 comments on commit eb75e1f

Please # to comment.