Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
714 commits
Select commit Hold shift + click to select a range
914b4bc
Retain direct owner descriptor reuse validation
Oct 15, 2026
9336360
Bind owner descriptor reuse to its exact source and artifacts
Oct 15, 2026
516f3e2
Retain current-main integration and revised acceptance evidence
Oct 15, 2026
d7652b9
Bind revised acceptance proofs and current-main validation
Oct 15, 2026
21905a8
Record metadata exit statuses and unchanged implementation sources
Oct 15, 2026
fb8f466
Bind explicit metadata checks and source identity validation
Oct 15, 2026
5714e81
Continue original algebraic input integration on issue-10358
Oct 15, 2026
9b6e311
Prepare native algebraic packet inputs from checked source expressions
Oct 15, 2026
91d504b
Scope preparation proof auxiliaries and test domains and false verdicts
Oct 15, 2026
694e853
Keep native preparation guard check within narrow manual layout
Oct 15, 2026
fb75891
Retain native source preparation validation and interrupted stage dia…
Oct 15, 2026
9f7d804
Bind native source preparation report and all retained artifacts
Oct 15, 2026
6db3d5f
Check cancellation around native algebraic preparation and packet pro…
Oct 15, 2026
0e3f092
Retain cancellation integration and fresh public codec exposure probes
Oct 15, 2026
a30af3d
Bind current cancellation and API boundary validation artifacts
Oct 15, 2026
e9b99f9
Integrate landed finite replay and current library acceptance
Oct 15, 2026
be97969
Retain current-main algebraic preparation integration evidence
Oct 15, 2026
b755c7f
Bind landed-owner integration logs to exact documents and sources
Oct 15, 2026
b23d570
Integrate landed original-input native packet tranche
Oct 15, 2026
49aa1cd
Strengthen source preparation rollback and completed regressions
Oct 15, 2026
daaf143
Retain corrected source preparation validation and compiler ordering
Oct 15, 2026
d2a9418
Bind corrected validation to exact source and artifact commits
Oct 15, 2026
f304805
Exercise post-mutation exceptions and mixed native input roles
Oct 15, 2026
d4e32fb
Retain final source preparation conformance and review evidence
Oct 15, 2026
c04095b
Bind final conformance to its exact evidence commit
Oct 15, 2026
cf60237
Replay complete cell packets through checked supplied operations
Oct 15, 2026
31315b4
Merge branch 'issue-10358' into issue-10358-cell-decision
Oct 15, 2026
af54c35
Merge remote-tracking branch 'origin/main' into issue-10358-cell-deci…
Oct 15, 2026
9b68218
Construct checked real models of retained algebraic towers
Oct 15, 2026
f4f25d7
Merge remote-tracking branch 'origin/main' into issue-10358-cell-deci…
Oct 15, 2026
30fdfd8
Quote checked supplied-operation predicates at original goals
Oct 15, 2026
d007863
Check original goals from actual reached-record assembly
Oct 15, 2026
73d0818
Fit supplied-operation example on narrow manual pages
Oct 15, 2026
5ba3b80
Retain supplied-operation assembly proofs and validation evidence
Oct 15, 2026
b203c7b
Bind assembly evidence to committed documents and artifacts
Oct 15, 2026
7ca2455
Merge remote-tracking branch 'origin/main' into issue-10358-cell-deci…
Oct 15, 2026
4d0c9cf
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 15, 2026
45abf28
Abstract maximal closed coefficients and preserve polynomial bounds
Oct 15, 2026
1437b4f
Assert exact replay refusals and actual record dependencies
Oct 15, 2026
007dcb8
Record exact refusal and reached-record audit validation
Oct 15, 2026
cf9e8e4
Bind expanded replay controls to committed evidence
Oct 15, 2026
ce19c04
Retain scalar codec provenance and wrong-program refusal coverage
Oct 15, 2026
0b04314
Retain scalar provenance, wrong-program checks and isolated memory ev…
Oct 16, 2026
b3b09bd
Bind final scalar-provenance control validation
Oct 16, 2026
ba11378
Prove maximal closed coefficient goals in fresh kernel modules
Oct 16, 2026
e0d3846
Check evidence log versions and identify sampled resource values
Oct 16, 2026
4bc1dd7
Bind checked evidence provenance to committed documents
Oct 16, 2026
febb5f0
Document maximal closed coefficients with checked tactic examples
Oct 16, 2026
49c47eb
Describe maximal coefficient recognition and proof boundaries
Oct 16, 2026
e0a2cb6
Fit maximal coefficient examples on narrow manual screens
Oct 16, 2026
8469a5a
Use square-root notation to fit the checked manual examples
Oct 16, 2026
4dc14ea
Retain source-scoped maximal coefficient validation and manual captures
Oct 16, 2026
44b3de9
Bind maximal coefficient report and artifacts to their retained commit
Oct 16, 2026
ae0931c
Include closed coefficient examples as a focused manual subsection
Oct 16, 2026
573922a
Place the included subsection after the parent section blocks
Oct 16, 2026
0c23abb
Retain included-subsection validation with final metadata and inspect…
Oct 16, 2026
6342a2a
Bind the final manual validation report to its artifact commit
Oct 16, 2026
6deb3d9
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 16, 2026
f969127
Merge commit '4bc1dd7bb0accc3ad21cbca1668d9fc90c065586' into issue-10358
Oct 16, 2026
05180c1
Retain formula and negative-embedding refusal under maximal abstraction
Oct 16, 2026
0a041ad
Preserve existing conformance target order when adding maximal checks
Oct 16, 2026
7cc0272
Record integrated kernel proofs and the compiled missing-record diagn…
Oct 16, 2026
73cc1a0
Bind integration and compiled diagnostic artifacts to their report co…
Oct 16, 2026
795fab8
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 16, 2026
aa450f3
Validate maximal coefficients against the landed parent and public gr…
Oct 16, 2026
9a78ec5
Bind final merged-main evidence to its committed artifacts
Oct 16, 2026
dc7c722
Preserve equality witnesses and strengthen maximal coefficient controls
Oct 16, 2026
9483d01
Handle metadata and aliases in checked equality-witness selection
Oct 16, 2026
c6ea838
Require provider evidence in the aliased witness proof
Oct 16, 2026
4257d8c
Retain checked equality-witness and maximal-source validation evidence
Oct 16, 2026
fd8b7c4
Bind final witness evidence to the committed report and captures
Oct 16, 2026
8038da1
Merge remote-tracking branch 'origin/main' into issue-10358-cell-deci…
Oct 16, 2026
ac3d0a9
Authenticate selected source coefficients from checked scalar replay
Oct 16, 2026
9fe614f
Check registered zero guards and import the source selection manual API
Oct 16, 2026
30055f9
Check maximal registered zero products and terminal divisor refusals
Oct 16, 2026
aa0bcf7
Merge branch 'issue-10358-cell-decision' into issue-10358
Oct 16, 2026
4a857a1
test(HexRCF): bind guarded fixtures to whole source coefficients
Oct 16, 2026
434261e
docs(HexRCF): retain selected-source proof and full compatibility evi…
Oct 16, 2026
b997b49
docs(HexRCF): bind retained source evidence to committed artifacts
Oct 16, 2026
35bb1c7
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 16, 2026
7188977
fix(HexRCF): preserve maximal metadata and order source guards consis…
Oct 16, 2026
07e92d8
docs(HexRCF): bind source audits, base tests and routing observations
Oct 16, 2026
205195e
docs(HexRCF): identify committed review-validation artifacts
Oct 16, 2026
41f1aba
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 16, 2026
f279f6c
feat(HexRCF): characterize algebraic producer acceptance
Oct 16, 2026
1e4db97
Merge commit '41f1aba4b22ffedb5cf4989a5ebcbba23f3313d8' into issue-10…
Oct 16, 2026
0da75d3
fix(HexRCF): retain finite leaf witnesses and canonical metadata
Oct 16, 2026
3d1d9b0
Merge branch 'issue-10358' into issue-10358-cell-decision
Oct 16, 2026
e944b04
fix(HexRCF): preserve quotient witnesses without duplicate bounds
Oct 16, 2026
1433553
Merge branch 'issue-10358' into issue-10358-cell-decision
Oct 16, 2026
291c74d
Merge remote-tracking branch 'origin/main' into issue-10358-cell-deci…
Oct 16, 2026
8940124
fix(HexRCF): check finite witness evidence consistently
Oct 16, 2026
b73a362
Merge branch 'issue-10358' into issue-10358-cell-decision
Oct 16, 2026
8d6f01e
docs(HexRCF): retain final finite compatibility and manual evidence
Oct 16, 2026
c185a7d
feat(HexRCF): prove acceptance at checked original algebraic sources
Oct 16, 2026
b1f0c80
fix(HexRCF): preserve proof budgets and exact source acceptance bindings
Oct 16, 2026
466e399
fix(HexRCF): account retained identities within preparation budgets
Oct 16, 2026
0b9df89
fix(HexRCF): give manual proof checks private auxiliary names
Oct 16, 2026
5270043
docs(HexRCF): fit source acceptance example to narrow pages
Oct 16, 2026
25c5f7a
docs(HexRCF): shorten narrow example failure text
Oct 16, 2026
4029fa2
docs(HexRCF): retain complete source acceptance validation
Oct 16, 2026
dd32822
Merge remote-tracking branch 'origin/main' into issue-10358-cell-deci…
Oct 16, 2026
a815127
docs(HexRCF): retain landed-parent integration evidence
Oct 16, 2026
6f0ae42
fix(HexRCF): validate original source guard inventories
Oct 16, 2026
cdc9b74
test(HexRCF): bound repeated original-source scans
Oct 16, 2026
db4041d
docs(HexRCF): retain guard and budget validation
Oct 16, 2026
5b6234c
Merge branch 'main' of github.com:kim-em/hex-dev into issue-10358
Oct 16, 2026
543c5f5
Quote supplied root replay with ordinary kernel equations
Oct 16, 2026
ee2578e
Keep the root quotation example readable on narrow screens
Oct 16, 2026
a88b424
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 16, 2026
189d74d
Authenticate frozen cubic scalar payloads through merged public codecs
Oct 16, 2026
64b1b5f
Retain source-bound root quotation validation and rendered evidence
Oct 16, 2026
26b6fda
Strengthen quotation validation and interpret the frozen cubic over t…
Oct 16, 2026
bc04ae8
Handle function-valued Boolean recursors through checked prefix trans…
Oct 16, 2026
51420aa
Record final quotation controls, real-witness audit and bounded valid…
Oct 16, 2026
f0c3785
Merge branch 'issue-10358' into issue-10358-cell-decision
Oct 16, 2026
53cc610
Keep rational algebraic inputs in their checked parent context
Oct 16, 2026
25ca8f8
Record checked rational-point preparation and bounded diagnostic evid…
Oct 16, 2026
5d09541
Retain the stronger stress timeout after rational-point preparation
Oct 16, 2026
d938fb5
Quote canonical rational payloads through checked public codec equations
Oct 16, 2026
f1e753a
Record generic rational quotation proofs and checked manual rendering
Oct 16, 2026
8566db1
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 16, 2026
ae5c451
Merge branch 'issue-10358-cell-decision' into issue-10358
Oct 16, 2026
05732a9
Audit imported caller-registered pi and exp proof bodies
Oct 16, 2026
0b3ed6a
Bound rational codec recognition and strengthen independent quotation…
Oct 16, 2026
791d1dd
Record bounded codec decline and final independent quotation audit
Oct 16, 2026
807e97d
Retain fresh ordinary-kernel evidence for caller-registered constants
Oct 16, 2026
5615884
Retain named-constant audit dependency and admission checks
Oct 16, 2026
e15bc23
Clarify rational decoder eligibility and pin original coefficient values
Oct 16, 2026
62a975a
Retain final rational quotation eligibility and manual evidence
Oct 16, 2026
c983fc1
Merge branch 'issue-10358' into issue-10358-cell-decision
Oct 16, 2026
def227e
Quote selected-field scalars using checked sign facts and exact codec…
Oct 16, 2026
bc8e1ba
Retain exact scalar quotation, producer-free proof audit and manual e…
Oct 16, 2026
6c99a18
Merge main after rational quotation lands
Oct 16, 2026
cde546e
Quote polynomial readers by refinement within shared reflection budgets
Oct 16, 2026
0ccfe54
Fit shared quotation manual examples on narrow screens
Oct 16, 2026
d2627df
Audit named proof auxiliaries and scalar data; validate quotation inputs
Oct 16, 2026
ffe8e98
Retain full scalar data and named auxiliary-body proof evidence
Oct 16, 2026
d951490
Merge validated scalar input and proof audits into shared quotation
Oct 16, 2026
973997c
Meter instantiated inputs and enforce exact scalar reader targets
Oct 16, 2026
3a7c1a2
Record instantiated-input audits and enforced resource controls
Oct 16, 2026
f00244b
Retain shared-request quotation proof and manual evidence
Oct 16, 2026
31bc27b
Merge scalar resource guards into shared polynomial quotation
Oct 16, 2026
5a7a831
Pin final transport exhaustion and assigned fact accounting
Oct 16, 2026
2463968
Record shared quotation input guards and bounded validation
Oct 16, 2026
55edc30
Merge commit '5a7a8314e66a4c74d98dea774a6e0848e9f93498' into issue-10…
Oct 16, 2026
f0fc305
Retain exact transport-budget regressions and final proof evidence
Oct 16, 2026
e574e3f
Merge commit 'f0fc30516d70e2da5ca259012ff8f1551c59f6a8' into issue-10…
Oct 16, 2026
99db8ba
Retain shared-request transport and final manual evidence
Oct 16, 2026
5d334ca
Reconcile shared quotation with merged scalar prerequisite
Oct 17, 2026
cb5f98a
Check nested predecessor transport without native codec reduction
Oct 17, 2026
e2e08f7
Retain nested quotation and module validation evidence
Oct 17, 2026
23df34b
Quote normalized coefficient vectors through public owner laws
Oct 17, 2026
323c2be
Retain public polynomial quotation validation and failed probes
Oct 17, 2026
ce6f235
Preserve original instances and export quoted polynomial data
Oct 17, 2026
e3042fa
Retain exact-instance and cross-module quotation evidence
Oct 17, 2026
3aabe2d
Compose scalar quotation through selected predecessors
Oct 17, 2026
1bf1443
Check nested scalar refusal and late rollback
Oct 17, 2026
d5c05ce
Use the published cubic source link in the manual
Oct 17, 2026
7884e61
Protect annotated scalar decodes and check charged retries
Oct 17, 2026
8d374b0
Fit the scalar lookup signature on narrow screens
Oct 17, 2026
73776d2
Quote original sign packets through checked prepared contexts
Oct 17, 2026
f47e495
Check sign-packet provenance and complete caller restoration
Oct 17, 2026
6220ac4
Wrap sign-packet manual examples for narrow displays
Oct 17, 2026
bfc7efd
Reconcile sign-packet quotation with the landed root-table tranche
Oct 17, 2026
e6d7087
Record checked sign-packet quotation and public replay gate
Oct 17, 2026
8689a43
Keep the renderer snapshot as immutable text evidence
Oct 17, 2026
9a0a042
Derive evidence checks from captured tracked-file results
Oct 17, 2026
b22ca86
Generate checked coefficient tuple selectors
Oct 17, 2026
7a7d485
Assemble and authenticate selected fixed-field coordinates
Oct 17, 2026
4e6f14b
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 17, 2026
1fd2234
Exercise public field assembly and independent source controls
Oct 17, 2026
371efb0
Preserve the inherited coordinate proof boundary
Oct 17, 2026
f6d780d
Use published source links in the rendered RCF manual
Oct 17, 2026
33ab55f
Wrap the public fixed-field manual example for narrow pages
Oct 17, 2026
ad075f3
Record source-bound fixed-field authentication evidence
Oct 17, 2026
af95bda
Retain exact sample and reader ties in selected-source proofs
Oct 17, 2026
02ad9d5
Bind revised source proof evidence to actual sample and reader tests
Oct 17, 2026
a891bdd
Regenerate negative-root fixtures and check the direct point row
Oct 17, 2026
3c216a8
Verify complete source, audit and literal evidence bindings
Oct 17, 2026
185e98b
Retain and check negative fixture provenance
Oct 17, 2026
8023d64
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 17, 2026
1a26322
Quote public scalar packets through dependent matches
Oct 17, 2026
1bb906c
Retain public packet validation and proof-cost diagnostics
Oct 17, 2026
baefcc3
Keep dependent replay conversion abstract
Oct 17, 2026
3b65efe
Retain dependent quotation audits and conversion diagnostics
Oct 17, 2026
956cd62
Bind quoted roots to their original raw headers
Oct 17, 2026
43a3701
Retain original root-header quotation evidence
Oct 17, 2026
aaf0dce
Assemble checked native root contexts and real models
Oct 17, 2026
d04903c
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 17, 2026
5773bfb
Keep native context manual examples readable on narrow screens
Oct 17, 2026
3e3a0ff
Retain native root context validation and proof audit
Oct 17, 2026
eb70459
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 17, 2026
8092a1e
Quote frozen signature payloads through public owner equations
Oct 17, 2026
8219d98
Document root quotation modules and wrap signature examples
Oct 17, 2026
6b6237c
Retain frozen signature and native context quotation evidence
Oct 17, 2026
1875bff
feat(rcf): prepare reconstructed root contexts for quotation
Oct 17, 2026
1b0f245
test(rcf): retain reconstructed-root quotation evidence
Oct 17, 2026
08d2995
feat(rcf): transport functions with proof inputs during quotation
Oct 17, 2026
e2a43c3
test(rcf): retain proof-input transport validation
Oct 17, 2026
c2869b4
fix(rcf): quote quotient representatives and certify branch proofs
Oct 17, 2026
4da7dc2
test(rcf): retain quotient and checked-branch validation
Oct 17, 2026
e1c3724
fix(rcf): quote public replay tree equations
Oct 18, 2026
a370d0a
test(rcf): retain public tree quotation evidence
Oct 18, 2026
0e931b9
feat(rcf): quote stored sign rows and dependent replay helpers
Oct 18, 2026
9445293
docs(rcf): retain checked row quotation evidence and limits
Oct 18, 2026
223c711
fix(rcf): preserve replay helper types during quotation
Oct 18, 2026
287f54f
docs(rcf): retain replay helper type repair evidence
Oct 18, 2026
b4a71cc
test(rcf): set explicit source selection quotation allowance
Oct 18, 2026
a47cf41
docs(rcf): retain source selection CI repair and full replay limit
Oct 18, 2026
372368f
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 18, 2026
465ee03
feat(rcf): quote complete cell packets by checked pointwise stages
Oct 18, 2026
34a4eb7
docs(rcf): retain pointwise cell quotation proofs and diagnostics
Oct 18, 2026
fd394a4
Share checked row graphs and quote original algebraic sources
Oct 18, 2026
e6c2feb
Record checked graph memos and original algebraic source evidence
Oct 18, 2026
a4b44be
feat(rcf): authenticate selected source from literal sign packets
Oct 18, 2026
5bffeb3
docs(rcf): retain packet source identity validation
Oct 18, 2026
2475e17
fix(rcf): add required conformance copyright headers
Oct 18, 2026
f911849
docs(rcf): record tracked header CI repair without repinning proof ev…
Oct 18, 2026
b38a112
feat(rcf): continue source finishing in the replay budget
Oct 18, 2026
b61b16e
docs(rcf): retain continued-budget source proof evidence
Oct 18, 2026
111ce08
test(rcf): restore quoted cells after late source exhaustion
Oct 18, 2026
1a666ea
docs(rcf): bind joint rollback regression evidence
Oct 18, 2026
637da4c
perf(rcf): share local dependency traversal within admission checks
Oct 18, 2026
bd83ea2
docs(rcf): retain source-bound admission traversal evidence
Oct 18, 2026
75713cb
fix(rcf): include admission tests in release manifest
Oct 18, 2026
686a00a
ci(rcf): retain factor measurements for admission test registration
Oct 18, 2026
35a8894
feat(rcf): produce selected-source packets from enumerated roots
Oct 19, 2026
f839368
docs(rcf): retain enumerated-source production and replay evidence
Oct 19, 2026
a92cb42
feat(rcf): construct selected-source packets on bounded intervals
Oct 19, 2026
ff85306
docs(rcf): retain bounded-source proof and integration evidence
Oct 19, 2026
ad5afa7
feat(rcf): prove bounded-source proposal progress
Oct 19, 2026
48644cb
docs(rcf): retain source proposal progress evidence
Oct 19, 2026
3fe93a4
feat(rcf): prove accepted source packet production and identity
Oct 19, 2026
46c6114
docs(rcf): retain scalar acceptance and source identity evidence
Oct 19, 2026
b842ec5
docs(rcf): retain compiled source packet dimension measurements
Oct 19, 2026
d1c6351
docs(rcf): document compiled packet costs in the manual
Oct 19, 2026
583df51
feat(rcf): prove enumerated source progress and acceptance
Oct 19, 2026
8691b38
docs(rcf): retain enumerated source progress evidence
Oct 19, 2026
9f5f63d
feat(rcf): assemble authenticated source quotation requests
Oct 19, 2026
9f0de97
docs(rcf): retain combined source quotation evidence
Oct 19, 2026
edd8c09
feat(rcf): authenticate sources within complete goal quotation
Oct 19, 2026
7684744
docs(rcf): retain joint source and goal quotation evidence
Oct 19, 2026
e928d26
Merge remote-tracking branch 'origin/main' into issue-10358
Oct 19, 2026
94f094d
docs(rcf): document retained source quotation and public model integr…
Oct 19, 2026
95d616e
docs(rcf): retain public model consumption and fresh proof checks
Oct 19, 2026
a655d33
feat(rcf): compile authenticated coefficient arithmetic in retained t…
Oct 19, 2026
805d2ab
docs(rcf): retain checked tower source compilation evidence
Oct 19, 2026
8f7774e
feat(rcf): assemble checked prepared source valuations
Oct 19, 2026
5709cc1
docs(rcf): retain prepared source valuation proof evidence
Oct 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
434 changes: 434 additions & 0 deletions HexManual/Chapters/HexRCF/AlgebraicCells.lean

Large diffs are not rendered by default.

293 changes: 277 additions & 16 deletions HexManual/Chapters/HexRCF/RootQuote.lean

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion HexManual/Chapters/HexRCF/RootTableQuote.lean
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ example :
```


The fresh importing conformance module checks all 86 reachable example theorem
The fresh importing conformance module checks all 103 reachable example theorem
bodies and 14 definitions under the kernel producer guard, including private
auxiliaries and the final witness. The complete axiom closure contains only
`propext`, `Classical.choice` and `Quot.sound`. The stored polynomial request
Expand Down
78 changes: 78 additions & 0 deletions HexRCF/HandlerTests/Admission.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/-
Copyright (c) 2026 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/

module

public import HexRCF.Tactic

public section

open Lean Meta
namespace Hex.RCF.AdmissionTests
opaque hidden : Nat := 13
inductive Link where
| nil
| cons (tail : Link)
private meta def reference (expression : Expr) : MetaM Bool := do
let expression ← instantiateMVars expression
if expression.hasExprMVar then return false
for name in expression.getUsedConstants do
for axiomName in ← collectAxioms name do
unless [``propext,``Classical.choice,``Quot.sound].contains axiomName do return false
return true
run_meta do
withoutModifyingEnv do
let mut previous := mkConst ``hidden
let mut expressions := #[previous,mkConst ``Link,mkConst ``Link.rec,
mkConst ``Quot.mk [.zero],mkConst ``Classical.choice [.zero],
mkConst ``sorryAx [.zero],mkConst ``sorryAx [.succ .zero]]
for i in [:64] do
let value ← mkAppM ``Nat.add #[previous,previous]
let name := mkPrivateName (← getEnv) (← mkFreshUserName `diamond)
previous ← mkAuxDefinition name (mkConst ``Nat) value (compile := false)
if i % 8 == 0 then expressions := expressions.push previous
expressions := expressions.push (← mkAppM ``Nat.add #[previous,previous])
let value ← mkAppM ``Nat.add #[previous,mkNatLit 1]
let left ← mkAuxDefinition (mkPrivateName (← getEnv) (← mkFreshUserName `left))
(mkConst ``Nat) value (compile := false)
let right ← mkAuxDefinition (mkPrivateName (← getEnv) (← mkFreshUserName `right))
(mkConst ``Nat) value (compile := false)
expressions := expressions.push (← mkAppM ``Nat.add #[left,right])
expressions := expressions.push (← mkFreshExprMVar (mkConst ``True))
let forbidden := mkConst ``sorryAx [.zero]
expressions := expressions.push (mkApp (mkLambda `unused .default (← inferType forbidden)
(mkConst ``True.intro)) forbidden)
for expression in expressions do
let expected ← reference expression
let actual ← try
Hex.RCF.checkAxioms `forestProbe expression
pure true
catch _ => pure false
unless expected == actual do
throwError "forest and authoritative admission policies disagree: {expression}"
logInfo m!"forest/reference agree on {expressions.size} imported/local/opaque/inductive/shared/forbidden/unresolved cases"
-- Reuse an identical declaration name across rolled-back environments. A
-- previous successful check must not mask a later forbidden dependency, and
-- a failed check must not poison a later valid declaration with that name.
run_meta do
let reused := Name.mkSimple "__rcfForestEnvironmentProbe"
for forbidden in #[false,true,false] do
let saved ← saveState
try
let value ← if forbidden then mkSorry (mkConst ``Nat) false else pure (mkNatLit 3)
let root ← mkAuxDefinition reused (mkConst ``Nat) value (compile := false)
let shared ← mkAppM ``Nat.add #[root,root]
let expected ← reference shared
let actual ← try
Hex.RCF.checkAxioms `forestEnvironment shared
pure true
catch _ => pure false
unless expected == !forbidden && actual == expected do
throwError "admission retained results across an environment rollback"
finally
saved.restore
logInfo "forest admission follows all three rolled-back environments"
end Hex.RCF.AdmissionTests
28 changes: 26 additions & 2 deletions HexRCF/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,32 @@ slots. It quotes a nonconstant scalar query, decodes a coefficient from that
fact alone and proves its selected real value. Dependent branch proofs move
by checked equality elimination; explicit replay functions remain abstract
during conversion before instantiation. A fresh audit rechecks imported bodies
with the unchanged producer guard. This does not supply the missing numerical
signature equation or install the general tactic.
with the unchanged producer guard. This does not install the general tactic.
`RootHeader.quoteWith` reconstructs a root and independently parses its original
raw subject through `RootReplay.readDescriptor_subject`. Their checked binding,
quoted under one reflection budget, supplies the raw-root identity needed by a
subsequent scalar packet. The [public consumer](../conformance/HexRCF/RootHeaderPacket.lean)
constructs a new root/context, and the [coefficient consumer](../conformance/HexRCF/RootHeaderValues.lean)
proves its selected real value and positivity without the old fixture's root
identity. Canonical signature roundtrips use the existing public law at the
actual encoded subject. `SignatureQuote.decoder` consumes the owner's public
literal equation and a checked binding to the exact supplied signature. The
new cubic packet retains frozen numerical node and nested-moment signatures;
the [fresh signature tests](../conformance/HexRCF/FrozenSignatureProofs.lean)
check distinct subjects and wrong bindings. This does not authenticate arbitrary
registries or construct origin histories or deeper frozen root frames.
`RootContext.packWith` assembles the actual native child from a closed retained
parent and a checked descriptor, retaining the owner's serialization expression
and checking its signature. The [ordinary-model regression](../conformance/HexRCF/RootContextConformance.lean)
retains the coefficient's selected value and positive sign; its fresh audit
also excludes serialization and graph encoding in the new packing bodies.
This is checked typed-context construction, not fully frozen history assembly.
`RootPrepare.prepareWith` retains a reconstructed descriptor and native context
behind checked private definitions, with exact header and context equations.
The [anonymous-reader regression](../conformance/HexRCF/RootPreparePacket.lean)
composes its decoder with `ScalarPacket.quoteWith` to recover the original
reader's equation. Header reconstruction, retention and replay share one
request; its proof budget includes simplifier visits and generated expressions.
`SectionQuote.finish` freshly reifies the original target and checks its matrix,
valuation and ordered original-divisor identities before transporting a proof.
The [fresh-source tests](../conformance/HexRCF/SectionProduceConformance.lean)
Expand Down
55 changes: 45 additions & 10 deletions HexRCF/Tactic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,58 @@ private meta opaque evalHandler (name : Name) : MetaM Handler
private meta def ordinaryAxiom (name : Name) : Bool :=
[``propext, ``Classical.choice, ``Quot.sound].contains name

/-- Visit each local dependency once within one admission check. Imported
closures use Lean's authoritative module inventories, including hidden bodies.
The state is discarded before returning; no environment-sensitive cache persists. -/
private meta partial def checkConstant (handler : Name) (environment : Environment)
(root current : Name) : StateRefT NameSet MetaM Unit := do
let seen : NameSet ← get
if seen.contains current then return
modify fun (seen : NameSet) => seen.insert current
if (environment.getModuleIdxFor? current).isSome then
for dependency in ← collectAxioms current do
unless ordinaryAxiom dependency do
throwError "rcf: handler {handler} proposed a proof using forbidden axiom {dependency} (through {root})"
return
let visit (expression : Expr) := expression.getUsedConstants.forM fun dependency =>
checkConstant handler environment root dependency
match environment.checked.get.find? current with
| some (.axiomInfo info) =>
unless ordinaryAxiom current do
throwError "rcf: handler {handler} proposed a proof using forbidden axiom {current} (through {root})"
visit info.type
| some (.defnInfo info) => visit info.type; visit info.value
| some (.thmInfo info) => visit info.type; visit info.value
| some (.opaqueInfo info) => visit info.type; visit info.value
| some (.quotInfo _) => pure ()
| some (.ctorInfo info) => visit info.type
| some (.recInfo info) => visit info.type
| some (.inductInfo info) =>
visit info.type
info.ctors.forM (checkConstant handler environment root)
| none => pure ()

/-- Optional solvers may depend only on Lean's standard logical axioms.
Imported dependency inventories also cover theorem bodies hidden by modules. -/
meta def checkAxioms (name : Name) (proof : Expr) : MetaM Unit := do
let proof ← instantiateMVars proof
-- Universe metavariables do not hide declarations in an inventory probe.
-- Expression metavariables can hide arbitrary proof dependencies.
if proof.hasExprMVar then throwError "rcf: handler {name} returned an unresolved proof"
for constant in proof.getUsedConstants do
for dependency in ← collectAxioms constant do
unless ordinaryAxiom dependency do
throwError "rcf: handler {name} proposed a proof using forbidden axiom {dependency} (through {constant})"
profileitM Exception "rcf axiom dependency check" (← getOptions) do
let proof ← instantiateMVars proof
-- Universe metavariables do not hide declarations in an inventory probe.
-- Expression metavariables can hide arbitrary proof dependencies.
if proof.hasExprMVar then throwError "rcf: handler {name} returned an unresolved proof"
let environment ← getEnv
let _ ← (proof.getUsedConstants.forM fun constant =>
checkConstant name environment constant constant).run ({} : NameSet)

/-- Screen closed expression data before native evaluation or proof acceptance.
Local hypotheses remain permitted; unresolved and nonstandard dependencies do not. -/
meta def checkExpr (name : Name) (expression : Expr) : MetaM Expr := do
let expression ← instantiateMVars expression
if expression.hasMVar then throwError "rcf: {name} contains unresolved metavariables"
checkAxioms name expression
if (← getEnv).hasUnsafe expression then
let usesUnsafe ← profileitM Exception "rcf unsafe dependency check" (← getOptions) do
pure ((← getEnv).hasUnsafe expression)
if usesUnsafe then
throwError "rcf: {name} uses an unsafe declaration"
return expression

Expand All @@ -110,7 +143,9 @@ meta def checkProof (name : Name) (target proof : Expr)
unless agrees do
throwError "rcf: handler {name} proposed a proof of a different goal"
checkAxioms name proof
if (← getEnv).hasUnsafe proof then
let usesUnsafe ← profileitM Exception "rcf unsafe dependency check" (← getOptions) do
pure ((← getEnv).hasUnsafe proof)
if usesUnsafe then
throwError "rcf: handler {name} proposed a proof using an unsafe declaration"
let proof ← profileitM Exception (category ++ " candidate check") (← getOptions) do
withOptions (fun opts => debug.skipKernelTC.set (Elab.async.set opts false) false) do
Expand Down
10 changes: 10 additions & 0 deletions adapters/HexRCF/RealCoefficients.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public meta import HexRCF.RealCoefficients.AlgebraicBounds
public meta import HexRCF.RealCoefficients.Finite
public meta import HexRCF.RealCoefficients.Reify
public meta import HexRCF.RealCoefficients.Interpret
public import HexRCF.RealCoefficients.TowerCompile
public meta import HexRCF.RealCoefficients.TowerCompile
public import HexRCF.RealCoefficients.RationalRoot
public meta import HexRCF.RealCoefficients.RationalRoot
public import HexRCF.RealCoefficients.RootAliases
Expand All @@ -24,6 +26,8 @@ public import HexRCF.RealCoefficients.Formula
public import HexRCF.RealCoefficients.Field
public import HexRCF.RealCoefficients.CommonPresentation
public import HexRCF.RealCoefficients.SourceIdentity
public meta import HexRCF.RealCoefficients.SourceIdentityQuote
public import HexRCF.RealCoefficients.SourceBuild
public import HexRCF.RealCoefficients.LiteralSign
public import HexRCF.RealCoefficients.SignIndex
public import HexRCF.RealCoefficients.FieldIndex
Expand Down Expand Up @@ -52,6 +56,12 @@ public meta import HexRCF.RealCoefficients.Quote
public import HexRCF.RealCoefficients.RootReplay
public import HexRCF.RealCoefficients.RootBuild
public import HexRCF.RealCoefficients.RootQuote
public import HexRCF.RealCoefficients.RowQuote
public meta import HexRCF.RealCoefficients.RowQuote
public meta import HexRCF.RealCoefficients.RootHeader
public meta import HexRCF.RealCoefficients.RootPrepare
public meta import HexRCF.RealCoefficients.RootContext
public meta import HexRCF.RealCoefficients.SignatureQuote
public meta import HexRCF.RealCoefficients.RootQuote
public meta import HexRCF.RealCoefficients.RationalQuote
public import HexRCF.RealCoefficients.ScalarQuote
Expand Down
47 changes: 47 additions & 0 deletions adapters/HexRCF/RealCoefficients/CellOperations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,34 @@ theorem formulaSector_eq (operations : Hex.RealClosure.Replay.Operations parent.
formulaSector operations value roots cut values formula sectorFields[cut])
return ⟨sections, fun cut => (sectors cut).sector, fun cut => (sectors cut).row⟩

/-- Checked layout and pointwise row equations restore the complete dependent
cell family. Original guards precede every layout and row read. -/
theorem readCells_of_parts (operations : Hex.RealClosure.Replay.Operations parent.sign)
(value : ValueCodec parent.Value) (guards : List parent.Value)
(roots : RootReplay.Result p .negInf .posInf) (values : Fin n → parent.Value)
(formula : RealFormula.QF (n+1)) (packet : Codec.Json)
(fields : Vector Codec.Json 2)
(sectionFields : Vector Codec.Json roots.roots.length)
(sectorFields : Vector Codec.Json (roots.roots.length+1))
(sections : (i : Fin roots.roots.length) →
SelectedSigns (roots.roots.get i) (RepresentationSpecialize.prepare values formula))
(sectors : (cut : Fin (roots.roots.length+1)) → SectorReplay.Result roots cut values formula)
(guarded : guards.all (fun d => Decidable.decide (d ≠ 0)) = true)
(layout : Codec.tuple 2 packet = .ok fields)
(sectionLayout : Codec.tuple roots.roots.length fields[0] = .ok sectionFields)
(sectorLayout : Codec.tuple (roots.roots.length+1) fields[1] = .ok sectorFields)
(sectionChecked : ∀ i, formulaRow operations value (roots.roots.get i) values formula
sectionFields[i] = .ok (sections i))
(sectorChecked : ∀ cut, formulaSector operations value roots cut values formula
sectorFields[cut] = .ok (sectors cut)) :
readCells operations value guards roots values formula packet =
.ok ⟨sections, fun cut => (sectors cut).sector, fun cut => (sectors cut).row⟩ := by
have sectionRead := CellRead.collectWith_eq .binding _ _ sections sectionChecked
have sectorRead := CellRead.collectWith_eq .binding _ _ sectors sectorChecked
simp only [readCells, guarded, ite_true,
layout, sectionLayout, sectorLayout, CellRead.collect, sectionRead, sectorRead,
bind, Except.bind, pure, Except.pure]

theorem readCells_eq (operations : Hex.RealClosure.Replay.Operations parent.sign)
(value : ValueCodec parent.Value) (guards : List parent.Value)
(roots : RootReplay.Result p .negInf .posInf) (values : Fin n → parent.Value)
Expand Down Expand Up @@ -387,6 +415,25 @@ theorem check_eq (operations : Hex.RealClosure.Replay.Operations parent.sign)
check operations value values formula guards cert quantifier rootGraph cells =
CompleteReplay.check value values formula guards cert quantifier rootGraph cells := by
simp only [check, CompleteReplay.check, read_eq, fold_eq]

/-- Compose independently checked root, cell and fold equations at the exact
original packet. The dependent cell type retains the root reader's result. -/
theorem check_of_parts (operations : Hex.RealClosure.Replay.Operations parent.sign)
(value : ValueCodec parent.Value) (values : Fin n → parent.Value)
(formula : RealFormula.QF (n+1)) (guards : List parent.Value)
(cert : RadicalCert parent.Value Signature) (quantifier : RealFormula.Quantifier)
(rootGraph cells : Codec.Json) (roots : RootReplay.Result cert.core .negInf .posInf)
(data : CellReplay.Evidence roots values formula) (verdict : Bool)
(rootChecked : RootReplay.readWith value guards cert.core .negInf .posInf
operations.one operations.add operations.sub operations.mul operations.natCast
operations.one_eq operations.add_eq operations.sub_eq operations.mul_eq operations.natCast_eq
rootGraph = .ok roots)
(cellsChecked : readCells operations value guards roots values formula cells = .ok data)
(foldChecked : fold operations values formula guards cert roots data quantifier = .ok verdict) :
check operations value values formula guards cert quantifier rootGraph cells = .ok verdict := by
simpa only [check, read, rootChecked, cellsChecked, bind, Except.bind, pure, Except.pure]
using foldChecked

/-- The owner assembly API checks an optional success predicate. Only an
accepted true verdict is a success; the public checker retains typed failures
and the diagnostic false result. -/
Expand Down
Loading
Loading