Skip to content

Commit

Permalink
sui: more proofs for the stack
Browse files Browse the repository at this point in the history
  • Loading branch information
clarus committed Dec 17, 2024
1 parent 3607080 commit 863e505
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 214 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 863e505

Please sign in to comment.