rocq/theories/Locale.v
Trusted setlocale boundary for the selected glibc categories. Names are borrowed strings, not caller-owned allocations. The epoch marks a validity window, not a claim that every stale pointer traps. Native representation, prefix coverage and safepoint stability remain independent obligations; there are no new runtime axioms.
This selected glibc has thirteen categories; CTYPE is 0 and ALL 6.
One authoritative logical locale state. The codec is opaque, not inferred from an ASCII name. Representation owns internal roots and exclusive release permissions; names themselves confer no ownership.
| locale_epoch | : nat | |
| locale_name | : Z → ptr | |
| locale_text | : Z → listZ | |
| locale_codec | : term | |
| locale_reads | : listspan | |
| locale_roots | : listspan | |
| locale_owned | : listZ |
Release eligibility is distinct from writable pointer authority. Exclusive ownership itself belongs to the trusted representation.
The selected implementation's borrowed names have aligned object bases, even when the returned character address is unaligned. This is the source-object premise of copy_domain, not write permission.
Every current name is readable through NUL and every write root is independently writable. The opaque representation includes actual initialized libc/environment/TLS state and exclusive release rights. locale_names_aligned holds at entry and after every setter endpoint.
A current name can supply memcpy's object-base alignment without aligning its character address or changing its borrowed capability.
Explore proof 2 tactics
Initial goal
intros rep m w category _ & _ & _ & _ & _ & Haligned Hcat
exact Halignedcategory Hcat
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A current name's NUL-inclusive borrowed source span.
Private objects whose own capabilities may survive a setter. Neither the caller's input nor capabilities loaded from aux enter this pool.
Retained authority has object-level private provenance. Zero-sized spans still carry their object's own capability. Fresh objects may be retained as Obj or Ro; old authority is never upgraded.
Null is tested by address, as in native C. No capability or input string is required for the null-query operand.
Independent input admission; computing a source span never admits an unterminated or incorrectly-capabilitied setter string.
Exact P result and W/P argument classes, including discarded results.
Existing libc roots and current borrowed names supply retained authority. The setter input contributes its independently admitted string span, but never becomes writable merely by being an input.
Only setters may mutate or allocate. Querying is a pure projection.
Queries have no release permission either.
Keeping an epoch preserves every current borrowed pointer. A successor may replace them, even when effective locale names stay the same; a setter never promises persistence of an old borrow.
Refusal leaves the effective locale unchanged, not necessarily all internal allocations or errno. Its borrow window stays valid.
Successful selection may change the requested category and ALL's composite name. Encoding changes only for CTYPE or ALL. Empty input selects from the represented environment; no C/ASCII restriction.
Retained names, read spans and roots inherit only private own capabilities or born objects, not the setter input or aux-loaded caller authority. Apply this to all three to prevent laundering on a later call, including through a zero-sized root. Ordinary transient effects still use locale_sources; exclusive releases stay separate.
The entire next private pool, not just this call's returned name, has private provenance. Clients apply object-level separation and fresh-allocation facts to this lemma across repeated setters.
Explore proof 7 tactics
Initial goal
intros xs m w born m′ w′ source Hroots & Hnames & Hreads & _ Hin
unfold locale_private_sources in Hin
apply in_app_or in Hin as Hin | Hin
2 openfocused goal
–apply in_app_or in Hin as Hin | Hin ; apply Hreads | apply proj1Hrootssource Hin ; auto
deferred goal
–apply in_map_iff in Hin as category & ← & Hcat
apply Hnames
exact Hcat
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Silent logical segment endpoints, NOT arbitrary native instruction cutpoints: setname can free before installing a replacement. Native allocation/resource/safepoint coverage needs an in-progress view. Serialized coherent locale/environment access remains trusted.
Queries return exactly the current name, never NULL at an admitted initialized category. Setters may refuse, or return the new current category's readable borrowed name. Neither path transfers ownership.
The complete trusted call contract. Allocation policy is explicit; refusal as NULL and terminal runtime resource endings stay distinct.
The identity evolution retains the logical locale and its window.
Explore proof 2 tactics
Initial goal
intros w
repeat split ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Current names are explicit sources, not unexplained return authority.
Explore proof 14 tactics
Initial goal
intros xs m w born m′ c base & Hin & Hcap | source & Hin & Hcap
2 openfocused goal
–right
2 opendeferred goal
right
2 opendeferred goal
right
2 opendeferred goal
exists base
2 opendeferred goal
auto
deferred goal
–right
left
exists source
split ; | exact Hcap
unfold locale_sources
apply in_or_app
left
exact Hin
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 9 tactics
Initial goal
intros w born category Hcategory
right
exists locale_name_spanw category
split ; | reflexivity
unfold locale_private_sources
apply in_or_app
right
apply in_map
exact Hcategory
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 4 tactics
Initial goal
intros xs m w born category Hcategory
apply locale_retained_available
apply locale_name_retained
exact Hcategory
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
An unchanged represented world requires no newly delegated authority.
Explore proof 38 tactics
Initial goal
intros rep xs m w _ & Hroots & _ & Hreads & Howned & _
split
2 openfocused goal
–intros root Hin
2 opendeferred goal
split
3 openfocused goal
deferred goal
+right
3 opendeferred goal
deferred goal
exists root
3 opendeferred goal
deferred goal
split ; | reflexivity
3 opendeferred goal
deferred goal
unfold locale_private_sources
3 opendeferred goal
deferred goal
apply in_or_app
3 opendeferred goal
deferred goal
left
3 opendeferred goal
deferred goal
apply in_or_app
3 opendeferred goal
deferred goal
right
3 opendeferred goal
deferred goal
exact Hin
2 opendeferred goal
deferred goal
+intros a Ha
2 opendeferred goal
left
2 opendeferred goal
exists root
2 opendeferred goal
split ; exact Hin |
2 opendeferred goal
split ; | exact Ha
2 opendeferred goal
rewrite Forall_forall in Hroots
2 opendeferred goal
apply Hroots
2 opendeferred goal
exact Hin
deferred goal
–split ; intros ; apply locale_name_retained ; assumption |
split
2 openfocused goal
+intros source Hin
2 opendeferred goal
right
2 opendeferred goal
exists source
2 opendeferred goal
split ; | reflexivity
2 opendeferred goal
unfold locale_private_sources
2 opendeferred goal
apply in_or_app
2 opendeferred goal
left
2 opendeferred goal
apply in_or_app
2 opendeferred goal
left
2 opendeferred goal
exact Hin
deferred goal
+intros base Hin
split ; apply in_or_app ; left ; exact Hin |
rewrite Forall_forall in Howned
apply Howned
exact Hin
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A retained epoch preserves exact borrowed pointers, contents and codec interpretation. No such transport is offered after a change.
Explore proof 3 tactics
Initial goal
intros rep m′ w w′ category He Hp Ht Hcodec | He Hsame _ & _ & Hnames & _ Hcat
2 openfocused goal
–split ; rewrite <- Hp , <- Ht ; exact proj2Hnamescategory Hcat | exact Hcodec
deferred goal
–lia
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Call constructions and exact extraction over the caller's machine. A separately instantiated machine has different inductive types.
A null query is constructively inhabited from its independent represented input facts, with exact memory, world and runtime.
Explore proof 28 tactics
Initial goal
intros rep requests r args category p s m w Habi Hready Hcat Hnull
assert Hquery : locale_queryWIntcategory; WPtrp = true
2 openfocused goal
{unfold locale_query
2 opendeferred goal
rewrite Hnull
2 opendeferred goal
reflexivity
deferred goal
eapply E.invoke_normal with born := [ ]
7 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
–exact Habi
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–split ; exact Hready |
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
exists category, p
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
auto
5 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–split ; constructor |
5 opendeferred goal
deferred goal
deferred goal
deferred goal
split ; reflexivity |
5 opendeferred goal
deferred goal
deferred goal
deferred goal
rewrite Hquery
5 opendeferred goal
deferred goal
deferred goal
deferred goal
auto
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–exists category, p
4 opendeferred goal
deferred goal
deferred goal
split ; reflexivity |
4 opendeferred goal
deferred goal
deferred goal
rewrite Hquery
4 opendeferred goal
deferred goal
deferred goal
reflexivity
3 opendeferred goal
deferred goal
deferred goal
–intros why Hbad
3 opendeferred goal
deferred goal
discriminate
2 opendeferred goal
deferred goal
–intros values Heq
2 opendeferred goal
injection Heq as ←
2 opendeferred goal
split
3 openfocused goal
deferred goal
+eexists
4 opendeferred goal
deferred goal
shelved goal
split ; reflexivity
2 opendeferred goal
deferred goal
+constructor ; apply locale_name_available ; exact Hcat | constructor
deferred goal
–intros status Hbad
discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A setter's ordinary refusal is possible without allocations or input mutation. This is conservative specification nonvacuity, not a claim that native selection always fails or always returns.
Proof 35 steps Qed
Successful selection is inhabited from an independent effects path, represented result and delegated authority, not assumed merely because the arguments were admitted.
Proof 40 steps Qed
Every completion exposes the exact trace/world/effect endpoint; queries cannot allocate, fail for resources or change the snapshot. For setters, callers frame their pieces with the existing effects rules using roots_apart and exclusive-release separation.
Proof 31 steps Qed
Queries, successful/refused setters and terminal resource endpoints all retain aligned current-name bases, through endpoint readiness.
Explore proof 8 tactics
Initial goal
intros rep requests r args xs s m w trace ending s′ m′ w′ Hcall
destruct setlocale_invocation_ _ _ _ _ _ _ _ _ _ _ _ _ Hcall as Hready _ & _ & born & _ & Hend
destruct locale_queryxs
2 openfocused goal
–destruct Hend as _ & _ & → & _
2 opendeferred goal
destruct Hready as _ & _ & _ & _ & _ & Haligned
2 opendeferred goal
exact Haligned
deferred goal
–destruct Hend as _ & _ & _ & _ & _ & Haligned _
exact Haligned
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The pure-query runtime cannot advance through an allocation; all query completions have exactly the starting runtime state too.
Explore proof 16 tactics
Initial goal
intros rep requests r args category p s m w trace ending s′ m′ w′ Hnull Hcall
assert Hquery : locale_queryWIntcategory; WPtrp = true
2 openfocused goal
{unfold locale_query
2 opendeferred goal
rewrite Hnull
2 opendeferred goal
reflexivity
deferred goal
destruct setlocale_invocation_ _ _ _ _ _ _ _ _ _ _ _ _ Hcall as Hpre & Htrace & born & He & Hresult
rewrite Hquery in Hresult
destruct Hresult as Hb & Hm & Hw & cat & q & Hxs & Hend
injection Hxs as ← Hp
split ; exact Htrace |
split
2 openfocused goal
–clear - He Hquery
2 opendeferred goal
induction He ; reflexivity | exact IHHe |
2 opendeferred goal
destruct H as Hfalse _
2 opendeferred goal
congruence
deferred goal
–auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A setter result observed as NULL is ordinary refusal, not a successful locale change whose readable name happens to live at 0.
Explore proof 17 tactics
Initial goal
intros rep requests r args category p q s m w trace s′ m′ w′ Hnonzero Hzero Hcall
assert Hquery : locale_queryWIntcategory; WPtrp = false by apply Z.eqb_neq ; exact Hnonzero
destruct setlocale_invocation_ _ _ _ _ _ _ _ _ _ _ _ _ Hcall as Hpre & Htrace & born & He & Hresult
rewrite Hquery in Hresult
destruct Hresult as Hr & Hd & Hpost | why & Hbad & _ ; | discriminate Hbad
destruct Hpre as _ & cat & operand & Hxs & Hcat & _
injection Hxs as ← Hp
destruct Hpost as cat & operand′ & Hxs & Hpost
injection Hxs as ← Hoperand
rewrite Hquery in Hpost
destruct Hpost as _ Hsame | Heq Hselected ; exact Hsame |
injection Heq as Hpointer
destruct Hr as _ & _ & Hnames & _
pose proof f_equalptr_addr Hpointer as Haddr
exfalso
apply proj1Hnamescategory Hcat
congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Standalone compatibility wrapper; logic clients use LocaleOn with their actual exported machine instance instead.
Independent logical controls: non-C names, a separate canonical built-in C name, a POSIX input, a mutable empty name, and an unrelated caller object. These are not native locale data or a representation proof.
Current names have different authority; canonical C belongs only to the internal read-source pool, not to a current name or input.
The same physical memory can represent a selected canonical name; the logical window changes even though no new allocation is needed.
Both fixture worlds have independently established checked names and roots, including the persistent internal readable source.
Explore proof 37 tactics
Initial goal
assert Hroot : Forallwritable_spanlocale_fixture locale_rootslocale_before
2 openfocused goal
{constructor ; | constructor
2 opendeferred goal
split ; simpl ; lia |
2 opendeferred goal
exists 3072, mkRegion3072 3080 Heap Live
2 opendeferred goal
repeat split ; reflexivity
deferred goal
assert Hread : Forallλsource ⇒ readable_byteslocale_fixture span_ptrsource span_sizesource locale_readslocale_before
2 openfocused goal
{constructor ; | constructor
2 opendeferred goal
split ; simpl ; lia |
2 opendeferred goal
split
3 openfocused goal
deferred goal
–exists 2048, mkRegion2048 2056 GlobalData Live
3 opendeferred goal
deferred goal
repeat split ; auto
2 opendeferred goal
deferred goal
–split ; reflexivity |
2 opendeferred goal
intros i Hi
2 opendeferred goal
change 0 ≤ m_byteslocale_fixture 2048 + i < 256
2 opendeferred goal
assert i = 0 ∨ i = 1 by simpl in Hi ; lia
2 opendeferred goal
destruct H as → | → ; vm_compute ; intuition congruence
deferred goal
split ; split ; exact I | | exact I | ; split ; exact Hroot | ; split
4 openfocused goal
focused goal
focused goal
–intros category _
4 opendeferred goal
deferred goal
deferred goal
cbn [ locale_name locale_text locale_before ]
4 opendeferred goal
deferred goal
deferred goal
destruct category =? 5 ; vm_compute ; repeat split ; congruence
3 opendeferred goal
deferred goal
deferred goal
–split ; exact Hread |
3 opendeferred goal
deferred goal
split ; constructor |
3 opendeferred goal
deferred goal
intros category _
3 opendeferred goal
deferred goal
cbn [ locale_name locale_before ]
3 opendeferred goal
deferred goal
destruct category =? 5
4 openfocused goal
deferred goal
deferred goal
+exists 3072
4 opendeferred goal
deferred goal
deferred goal
split ; left ; reflexivity | reflexivity
3 opendeferred goal
deferred goal
deferred goal
+exists 1024
3 opendeferred goal
deferred goal
split ; right ; reflexivity | reflexivity
2 opendeferred goal
deferred goal
–intros category _
2 opendeferred goal
vm_compute
2 opendeferred goal
repeat split ; congruence
deferred goal
–split ; exact Hread |
split ; constructor |
intros category _
exists 2048
split ; right ; reflexivity | reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The character pointer need not be aligned when its object's base is.
Explore proof 11 tactics
Initial goal
split ; | reflexivity
split ; exact I |
split ; constructor |
split
2 openfocused goal
–intros category _
2 opendeferred goal
vm_compute ; repeat split ; congruence
deferred goal
–split ; constructor |
split ; constructor |
intros category _
exists 1024
split ; right ; reflexivity | reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Readability alone admitted this unaligned-base string before the strengthened readiness premise. Alignment is an independent fact.
Explore proof 3 tactics
Initial goal
split ; vm_compute ; repeat split ; congruence |
intros _ & _ & _ & _ & _ & Haligned
destruct Haligned0 or_introleq_refl as base & Hcap | Hcap & Hmod ; discriminate Hcap | injection Hcap as ← ; discriminate Hmod
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Ordinary calls use the exact selected W/P signature.
One fixed registry supports exact CTYPE and MESSAGES null queries.
Explore proof 7 tactics
Initial goal
intros category Hcat
apply InterpLocale.setlocale_query_admitted
4 openfocused goal
focused goal
–split ; right ; eexists ; reflexivity |
4 opendeferred goal
deferred goal
eexists ; eexists ; reflexivity
3 opendeferred goal
deferred goal
–exact proj1locale_fixture_ready
2 opendeferred goal
–destruct Hcat as → | → ; vm_compute ; tauto
–reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The source-pool fix matters: canonical C's Ro is not supplied by any current name or by the independently allocated POSIX input.
Explore proof 8 tactics
Initial goal
destruct locale_delegates_refl_ WInt6; WPtrmkPtr4096 Obj4096 _ _ proj1locale_fixture_ready as Hroots _ Hreads Howned
split ; exact Hroots |
split
2 openfocused goal
–intros category _
2 opendeferred goal
right
2 opendeferred goal
exists mkSpanmkPtr2048 Ro2048 2
2 opendeferred goal
split ; unfold locale_private_sources ; simpl ; auto | reflexivity
deferred goal
–split ; exact Hreads | exact Howned
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A non-C world can switch through POSIX to a separately represented canonical C name without fabricating or downgrading its capability.
Explore proof 13 tactics
Initial goal
eapply InterpLocale.setlocale_success_admitted with bytes := 80; 79; 83; 73; 88 born := [ ] w′ := locale_after category := 6
9 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
–split ; right ; eexists ; reflexivity |
9 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
eexists ; eexists ; reflexivity
8 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–exact proj1locale_fixture_ready
7 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–vm_compute ; tauto
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–discriminate
5 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–vm_compute
5 opendeferred goal
deferred goal
deferred goal
deferred goal
repeat split ; congruence
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–constructor
3 opendeferred goal
deferred goal
deferred goal
–exact proj2locale_fixture_ready
2 opendeferred goal
deferred goal
–exact locale_canonical_delegated
deferred goal
–split ; right ; reflexivity |
split ; intros ; congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Empty environment selection and an input borrowed from an earlier query both admit ordinary refusal, without mutating caller data.
Explore proof 8 tactics
Initial goal
intros p bytes Hcases
eapply InterpLocale.setlocale_refusal_admitted with bytes := bytes
5 openfocused goal
focused goal
focused goal
focused goal
–split ; left ; reflexivity |
5 opendeferred goal
deferred goal
deferred goal
deferred goal
eexists ; eexists ; reflexivity
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–exact proj1locale_fixture_ready
3 opendeferred goal
deferred goal
deferred goal
–vm_compute ; tauto
2 opendeferred goal
deferred goal
–destruct Hcases as → → | → → ; discriminate
deferred goal
–destruct Hcases as → → | → → ; vm_compute ; repeat split ; congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
All public null-query completions have the handwritten exact pointer/capability, empty trace and unchanged snapshots.
Explore proof 2 tactics
Initial goal
intros
eapply InterpLocale.setlocale_query_invocation with category := 5 w := locale_before p := mkPtr0 CNone ; reflexivity | exact H
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Read/write authority must not grow into exclusive release rights.
Explore proof 3 tactics
Initial goal
intros _ & _ & _ & Howned
destruct Howned3072 or_introleq_refl as Hbad _
exact Hbad
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Equal text alone does not extend a borrow through pointer replacement.
Explore proof 3 tactics
Initial goal
intros _ Hnames _ | Hepoch ; | discriminate Hepoch
pose proof f_equalλnames ⇒ names0 Hnames as H
discriminate H
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A nonreturned category cannot smuggle the unrelated caller object's capability into the world for exposure by a later pure query.
Explore proof 10 tactics
Initial goal
intros _ & Hnames & _
specialize Hnames5 ltac:vm_compute ; tauto
assert Hcaps : Forallλsource ⇒ ptr_capspan_ptrsource ≠ Obj5120 locale_private_sourceslocale_before
2 openfocused goal
{vm_compute
2 opendeferred goal
repeat constructor ; discriminate
deferred goal
destruct Hnames as base & & _ | source & Hin & Hcap
rewrite Forall_forall in Hcaps
apply Hcapssource Hin
symmetry
exact Hcap
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Both transient sources really can supply the caller capability: its input pointer and a complete private root slot. Neither may become retained authority, even through a zero-sized future span.
Explore proof 27 tactics
Initial goal
split
2 openfocused goal
–right
2 opendeferred goal
left
2 opendeferred goal
exists mkSpanmkPtr5120 Obj5120 string_lengthlocale_caller_memory mkPtr5120 Obj5120 + 1
2 opendeferred goal
split ; unfold locale_sources ; apply in_or_app ; right ; simpl ; auto | reflexivity
deferred goal
–split
2 openfocused goal
+right
2 opendeferred goal
right
2 opendeferred goal
left
2 opendeferred goal
exists mkSpanmkPtr3072 Obj3072 8, 3072
2 opendeferred goal
split
3 openfocused goal
deferred goal
∗unfold locale_sources , locale_private_sources
3 opendeferred goal
deferred goal
apply in_or_app
3 opendeferred goal
deferred goal
left
3 opendeferred goal
deferred goal
apply in_or_app
3 opendeferred goal
deferred goal
left
3 opendeferred goal
deferred goal
apply in_or_app
3 opendeferred goal
deferred goal
right
3 opendeferred goal
deferred goal
simpl
3 opendeferred goal
deferred goal
auto
2 opendeferred goal
deferred goal
∗split ; change 3072 ≤ 3072 < 3080 ; lia |
2 opendeferred goal
split ; simpl ; lia |
2 opendeferred goal
split ; reflexivity
deferred goal
+assert Hcaps : Forallλsource ⇒ ptr_capspan_ptrsource ≠ Obj5120 ∧ ptr_capspan_ptrsource ≠ Ro5120 locale_private_sourceslocale_before
2 openfocused goal
{vm_compute
2 opendeferred goal
repeat constructor ; discriminate
deferred goal
split ; intros base & & _ | source & Hin & Hcap ; rewrite Forall_forall in Hcaps ; destruct Hcapssource Hin as Hobj Hro ; congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Each role independently attempts the two-call laundering step: installing the caller as a name, a zero-sized read, or a zero-sized root. A subsequent query/setter can never receive such a pool.
Explore proof 26 tactics
Initial goal
intros role Hrole Hd
apply proj1proj2proj2locale_caller_transient_only
destruct Hrole as → | → | →
3 openfocused goal
focused goal
–apply locale_delegates_private_ _ _ _ _ _ locale_name_spanlocale_caller_endpoint0 0 Hd
3 opendeferred goal
deferred goal
unfold locale_private_sources
3 opendeferred goal
deferred goal
apply in_or_app
3 opendeferred goal
deferred goal
right
3 opendeferred goal
deferred goal
apply in_map
3 opendeferred goal
deferred goal
simpl
3 opendeferred goal
deferred goal
auto
2 opendeferred goal
deferred goal
–apply locale_delegates_private_ _ _ _ _ _ mkSpanmkPtr5120 Obj5120 0 Hd
2 opendeferred goal
unfold locale_private_sources
2 opendeferred goal
apply in_or_app
2 opendeferred goal
left
2 opendeferred goal
apply in_or_app
2 opendeferred goal
left
2 opendeferred goal
simpl
2 opendeferred goal
auto
deferred goal
–apply locale_delegates_private_ _ _ _ _ _ mkSpanmkPtr5120 Obj5120 0 Hd
unfold locale_private_sources
apply in_or_app
left
apply in_or_app
right
simpl
auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Public-call rejection: no-request setters cannot install any of those future pools. The effects path cannot disguise caller storage as a fresh allocation by choosing a nonempty born list.
Explore proof 10 tactics
Initial goal
intros role r args s trace ending s′ Hrole Hcall
destruct InterpLocale.setlocale_invocation_ _ _ _ _ _ _ _ _ _ _ _ _ Hcall as _ & _ & born & He & Hpost
assert born = [ ] as →
2 openfocused goal
{clear - He
2 opendeferred goal
induction He ; reflexivity | exact IHHe |
2 opendeferred goal
destruct H as _ Hfalse
2 opendeferred goal
contradiction
deferred goal
cbn [ locale_query ptr_addr Z.eqb ] in Hpost
destruct Hpost as _ & Hd & _
exact locale_no_caller_endpointrole Hrole Hd
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Born allocation authority permits interior name pointers without aligning their character addresses or inventing old-object authority.
Explore proof 2 tactics
Initial goal
intros base
split ; left ; exists base ; simpl ; auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Model access at address zero can be readable, but a current locale name there is independently rejected as NULL.
Explore proof 3 tactics
Initial goal
split ; vm_compute ; repeat split ; congruence |
intros _ & _ & Hnames & _
exact proj1Hnames0 or_introleq_refl eq_refl
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
A real runtime refusal is a different invocation from a NULL return; the permitted request is witnessed, not inferred from admission.
Explore proof 26 tactics
Initial goal
eapply InterpLocale.E.invoke_resource with born := [ ]
5 openfocused goal
focused goal
focused goal
focused goal
–split ; left ; reflexivity |
5 opendeferred goal
deferred goal
deferred goal
deferred goal
eexists ; eexists ; reflexivity
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–split ; exact proj1locale_fixture_ready |
4 opendeferred goal
deferred goal
deferred goal
exists 6, hello_ptr
4 opendeferred goal
deferred goal
deferred goal
split ; reflexivity |
4 opendeferred goal
deferred goal
deferred goal
split ; vm_compute ; tauto |
4 opendeferred goal
deferred goal
deferred goal
right
4 opendeferred goal
deferred goal
deferred goal
exists hello_bytes
4 opendeferred goal
deferred goal
deferred goal
vm_compute
4 opendeferred goal
deferred goal
deferred goal
repeat split ; congruence
3 opendeferred goal
deferred goal
deferred goal
–split ; constructor |
3 opendeferred goal
deferred goal
split ; reflexivity |
3 opendeferred goal
deferred goal
split ; exact proj1locale_fixture_ready |
3 opendeferred goal
deferred goal
split ; eapply locale_delegates_refl ; exact proj1locale_fixture_ready |
3 opendeferred goal
deferred goal
exists 6, hello_ptr
3 opendeferred goal
deferred goal
split ; reflexivity |
3 opendeferred goal
deferred goal
left
3 opendeferred goal
deferred goal
apply locale_unchanged_refl
2 opendeferred goal
deferred goal
–eapply InterpLocale.E.failure_oom with align := 16 size := 32
4 openfocused goal
focused goal
deferred goal
+repeat split ; reflexivity
3 opendeferred goal
deferred goal
deferred goal
+unfold max_allocation_size
3 opendeferred goal
deferred goal
lia
2 opendeferred goal
deferred goal
+reflexivity
deferred goal
–left
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Invalid categories and ABI classes are not libc refusals. Query permissions and requests stay empty even under a broad setter policy.
Explore proof 9 tactics
Initial goal
split ; reflexivity |
split ; reflexivity |
split ; intros ? ? H _ ; discriminate H |
split
2 openfocused goal
–intros H | d & H _ ; discriminate H
deferred goal
–intros _ & category & p & Hxs & Hcat & _
injection Hxs as ← Hp
vm_compute in Hcat
intuition discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.