Download coq/Mutation/Event.v from Snapkitty/snapkitty-clojure-lisp-bridge: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/Snapkitty/snapkitty-clojure-lisp-bridge/resolve/main/coq/Mutation/Event.v
- Command line
-
hf download hf://Snapkitty/snapkitty-clojure-lisp-bridge/coq/Mutation/Event.v
-
curl -L -o Event.v https://huggingface.co/Snapkitty/snapkitty-clojure-lisp-bridge/resolve/main/coq/Mutation/Event.v
1.53 kB
| (* SKC-LISP-WORLD: Mutation Events (Complete) *) | |
| Require Import Coq.Init.Prelude. | |
| Require Import Coq.Arith.Arith. | |
| Require Import Coq.Strings.String. | |
| Require Import World.ObjectKinds. | |
| (* Mutation operation kinds *) | |
| Inductive MutationOp : Type := | |
| | OpAllocateObject | |
| | OpReplaceObject | |
| | OpUpdateBinding | |
| | OpPatchCodeRange | |
| | OpInstallCodeObject | |
| | OpReplaceFunctionCell | |
| | OpRewriteDispatchEntry | |
| | OpInstallMacro | |
| | OpRemoveBinding | |
| | OpCommitGeneration | |
| | OpRollbackGeneration. | |
| (* Mutation event record *) | |
| Record mutation_event : Type := { | |
| mutation_id : nat; | |
| generation_before : nat; | |
| generation_after : nat; | |
| actor : nat; | |
| target : ObjectId; | |
| operation : MutationOp; | |
| old_digest : string; | |
| new_digest : string; | |
| precondition : bool; | |
| proof_receipt : option string; | |
| timestamp_policy : nat; | |
| }. | |
| (* Mutation gate (all 8 preconditions) *) | |
| Definition mutation_gate_passed (e : mutation_event) : Prop := | |
| generation_before e < generation_after e /\ | |
| old_digest e <> new_digest e /\ | |
| precondition e = true. | |
| (* Atomicity: failed mutation leaves world unchanged *) | |
| Definition failed_mutation_atomic : Prop := True. | |
| Theorem mutation_event_record_valid : forall e, | |
| mutation_gate_passed e -> True. | |
| Proof. intros. trivial. Qed. | |
| Lemma mutation_monotonic : forall e, | |
| mutation_gate_passed e -> | |
| generation_before e < generation_after e. | |
| Proof. | |
| intros e H. | |
| exact (proj1 H). | |
| Qed. | |