uor-foundation 0.3.3

UOR Foundation — typed Rust traits for the complete ontology. Import and implement.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
// @generated by uor-crate from uor-ontology — do not edit manually

//! Phase 10 — Path-2 VerifiedMint witness scaffolds. Generated from every `Path2TheoremWitness` classification; one `Mint{Foo}` + `Mint{Foo}Inputs<H>` + `Certificate` + `OntologyVerifiedMint` per class. Routes to per-family primitive stubs in `crate::primitives::*`.

#![allow(clippy::module_name_repetitions)]

use crate::enforcement::{
    Certificate, ContentFingerprint, GenericImpossibilityWitness, OntologyTarget,
};
use crate::HostTypes;
use core::marker::PhantomData;

/// Phase 10 — sealed mint trait for ontology-derived Path-2 witnesses.
/// Distinct from `VerifiedMint` (used by the partition-algebra
/// amendment): the new trait carries a `HostTypes`-parameterized GAT
/// `Inputs<H>` so witness inputs can hold `H::Decimal` /
/// `{Range}Handle<H>` fields without leaking f64 into the trait shape.
/// Sealed via the `Certificate` supertrait.
pub trait OntologyVerifiedMint: Certificate {
    /// Caller-supplied input bundle, parameterized over the host's
    /// chosen `HostTypes` so witness inputs can carry `H::Decimal`,
    /// `{Range}Handle<H>`, etc.
    ///
    /// The `'static` bound is required because some MintInputs carry
    /// `&'static [{Range}Handle<H>]` non-functional fields, which
    /// require `H: 'static` for `Handle<H>: 'static`. All in-tree
    /// `HostTypes` impls (DefaultHostTypes, host marker structs) are
    /// `'static`, so this is satisfied trivially.
    type Inputs<H: HostTypes + 'static>;

    /// Op-namespace identity that this witness attests. Phase 10a
    /// resolves this via `proof:provesIdentity` inverse lookup.
    const THEOREM_IDENTITY: &'static str;

    /// Verify the inputs and mint a witness. Phase-15 each verify_*
    /// performs structural-invariant validation; on rejection it
    /// returns a typed `GenericImpossibilityWitness` whose IRI cites
    /// the specific failing op-namespace identity.
    /// # Errors
    /// Returns `GenericImpossibilityWitness::for_identity(iri)` whenever
    /// the underlying primitive rejects the inputs.
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness>
    where
        Self: Sized;
}

/// Phase 10 sealed witness for `https://uor.foundation/cert/BornRuleVerification`. Attests `https://uor.foundation/op/QM_5`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::br::verify_cert_born_rule_verification`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintBornRuleVerification {
    content_fingerprint: ContentFingerprint,
}

impl MintBornRuleVerification {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintBornRuleVerification {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintBornRuleVerification {}
impl OntologyTarget for MintBornRuleVerification {}

impl Certificate for MintBornRuleVerification {
    const IRI: &'static str = "https://uor.foundation/cert/BornRuleVerification";
    type Evidence = ();
}

/// Inputs to `MintBornRuleVerification::ontology_mint`. One field per property of `https://uor.foundation/cert/BornRuleVerification` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintBornRuleVerificationInputs<H: HostTypes> {
    /// bornRuleVerified
    pub born_rule_verified: bool,
    /// certifies
    pub certifies: &'static H::HostString,
    /// method
    pub method: crate::enums::ProofStrategy,
    /// timestamp
    pub timestamp: &'static H::WitnessBytes,
    /// verified
    pub verified: bool,
    /// wittLength
    pub witt_length: u64,
}

impl<H: HostTypes> Copy for MintBornRuleVerificationInputs<H> {}
impl<H: HostTypes> Clone for MintBornRuleVerificationInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintBornRuleVerificationInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            born_rule_verified: false,
            certifies: H::EMPTY_HOST_STRING,
            method: crate::enums::ProofStrategy::default(),
            timestamp: H::EMPTY_WITNESS_BYTES,
            verified: false,
            witt_length: 0,
        }
    }
}

impl OntologyVerifiedMint for MintBornRuleVerification {
    type Inputs<H: HostTypes + 'static> = MintBornRuleVerificationInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/QM_5";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::br::verify_cert_born_rule_verification::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/effect/DisjointnessWitness`. Attests `https://uor.foundation/op/FX_4`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::dp::verify_effect_disjointness_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintDisjointnessWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintDisjointnessWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintDisjointnessWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintDisjointnessWitness {}
impl OntologyTarget for MintDisjointnessWitness {}

impl Certificate for MintDisjointnessWitness {
    const IRI: &'static str = "https://uor.foundation/effect/DisjointnessWitness";
    type Evidence = ();
}

/// Inputs to `MintDisjointnessWitness::ontology_mint`. One field per property of `https://uor.foundation/effect/DisjointnessWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintDisjointnessWitnessInputs<H: HostTypes> {
    /// disjointnessLeft
    pub disjointness_left: crate::kernel::effect::EffectTargetHandle<H>,
    /// disjointnessRight
    pub disjointness_right: crate::kernel::effect::EffectTargetHandle<H>,
}

impl<H: HostTypes> Copy for MintDisjointnessWitnessInputs<H> {}
impl<H: HostTypes> Clone for MintDisjointnessWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintDisjointnessWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            disjointness_left: crate::kernel::effect::EffectTargetHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            disjointness_right: crate::kernel::effect::EffectTargetHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
        }
    }
}

impl OntologyVerifiedMint for MintDisjointnessWitness {
    type Inputs<H: HostTypes + 'static> = MintDisjointnessWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/FX_4";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::dp::verify_effect_disjointness_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/morphism/GroundingWitness`. Attests `https://uor.foundation/op/surfaceSymmetry`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::oa::verify_morphism_grounding_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintMorphismGroundingWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintMorphismGroundingWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintMorphismGroundingWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintMorphismGroundingWitness {}
impl OntologyTarget for MintMorphismGroundingWitness {}

impl Certificate for MintMorphismGroundingWitness {
    const IRI: &'static str = "https://uor.foundation/morphism/GroundingWitness";
    type Evidence = ();
}

/// Inputs to `MintMorphismGroundingWitness::ontology_mint`. One field per property of `https://uor.foundation/morphism/GroundingWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintMorphismGroundingWitnessInputs<H: HostTypes> {
    /// groundedAddress
    pub grounded_address: crate::kernel::address::ElementHandle<H>,
    /// surfaceSymbol
    pub surface_symbol: crate::kernel::schema::SurfaceSymbolHandle<H>,
}

impl<H: HostTypes> Copy for MintMorphismGroundingWitnessInputs<H> {}
impl<H: HostTypes> Clone for MintMorphismGroundingWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintMorphismGroundingWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            grounded_address: crate::kernel::address::ElementHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            surface_symbol: crate::kernel::schema::SurfaceSymbolHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
        }
    }
}

impl OntologyVerifiedMint for MintMorphismGroundingWitness {
    type Inputs<H: HostTypes + 'static> = MintMorphismGroundingWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/surfaceSymmetry";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::oa::verify_morphism_grounding_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/morphism/ProjectionWitness`. Attests `https://uor.foundation/op/surfaceSymmetry`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::oa::verify_morphism_projection_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintProjectionWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintProjectionWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintProjectionWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintProjectionWitness {}
impl OntologyTarget for MintProjectionWitness {}

impl Certificate for MintProjectionWitness {
    const IRI: &'static str = "https://uor.foundation/morphism/ProjectionWitness";
    type Evidence = ();
}

/// Inputs to `MintProjectionWitness::ontology_mint`. One field per property of `https://uor.foundation/morphism/ProjectionWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintProjectionWitnessInputs<H: HostTypes> {
    /// projectionOutput
    pub projection_output: crate::user::morphism::SymbolSequenceHandle<H>,
    /// projectionSource
    pub projection_source: crate::enforcement::PartitionHandle<H>,
}

impl<H: HostTypes> Copy for MintProjectionWitnessInputs<H> {}
impl<H: HostTypes> Clone for MintProjectionWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintProjectionWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            projection_output: crate::user::morphism::SymbolSequenceHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            projection_source: crate::enforcement::PartitionHandle::<H>::from_fingerprint(
                crate::enforcement::ContentFingerprint::zero(),
            ),
        }
    }
}

impl OntologyVerifiedMint for MintProjectionWitness {
    type Inputs<H: HostTypes + 'static> = MintProjectionWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/surfaceSymmetry";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::oa::verify_morphism_projection_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/morphism/Witness`. Attests `https://uor.foundation/op/surfaceSymmetry`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::oa::verify_morphism_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintWitness {}
impl OntologyTarget for MintWitness {}

impl Certificate for MintWitness {
    const IRI: &'static str = "https://uor.foundation/morphism/Witness";
    type Evidence = ();
}

/// Inputs to `MintWitness::ontology_mint`. One field per property of `https://uor.foundation/morphism/Witness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintWitnessInputs<H: HostTypes> {
    /// Abstract supertype with no per-property fields.
    pub _phantom: PhantomData<H>,
}

impl<H: HostTypes> Copy for MintWitnessInputs<H> {}
impl<H: HostTypes> Clone for MintWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            _phantom: PhantomData,
        }
    }
}

impl OntologyVerifiedMint for MintWitness {
    type Inputs<H: HostTypes + 'static> = MintWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/surfaceSymmetry";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::oa::verify_morphism_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/proof/ImpossibilityWitness`. Attests `https://uor.foundation/op/IH_1`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::ih::verify_proof_impossibility_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintImpossibilityWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintImpossibilityWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintImpossibilityWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintImpossibilityWitness {}
impl OntologyTarget for MintImpossibilityWitness {}

impl Certificate for MintImpossibilityWitness {
    const IRI: &'static str = "https://uor.foundation/proof/ImpossibilityWitness";
    type Evidence = ();
}

/// Inputs to `MintImpossibilityWitness::ontology_mint`. One field per property of `https://uor.foundation/proof/ImpossibilityWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintImpossibilityWitnessInputs<H: HostTypes + 'static> {
    /// achievabilityStatus
    pub achievability_status: crate::enums::AchievabilityStatus,
    /// dependsOn
    pub depends_on: &'static [crate::kernel::op::IdentityHandle<H>],
    /// formalDerivation
    pub formal_derivation: crate::bridge::proof::DerivationTermHandle<H>,
    /// impossibilityDomain
    pub impossibility_domain: crate::enums::VerificationDomain,
    /// impossibilityReason
    pub impossibility_reason: &'static H::HostString,
    /// provesIdentity
    pub proves_identity: crate::kernel::op::IdentityHandle<H>,
    /// strategy
    pub strategy: crate::enums::ProofStrategy,
    /// timestamp
    pub timestamp: &'static H::WitnessBytes,
    /// verified
    pub verified: bool,
    /// verifiedAtLevel
    pub verified_at_level: &'static [crate::enums::WittLevel],
    /// witness
    pub witness: &'static [crate::bridge::proof::WitnessDataHandle<H>],
}

impl<H: HostTypes + 'static> Copy for MintImpossibilityWitnessInputs<H> {}
impl<H: HostTypes + 'static> Clone for MintImpossibilityWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes + 'static> Default for MintImpossibilityWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            achievability_status: crate::enums::AchievabilityStatus::default(),
            depends_on: &[],
            formal_derivation: crate::bridge::proof::DerivationTermHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            impossibility_domain: crate::enums::VerificationDomain::default(),
            impossibility_reason: H::EMPTY_HOST_STRING,
            proves_identity: crate::kernel::op::IdentityHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            strategy: crate::enums::ProofStrategy::default(),
            timestamp: H::EMPTY_WITNESS_BYTES,
            verified: false,
            verified_at_level: &[],
            witness: &[],
        }
    }
}

impl OntologyVerifiedMint for MintImpossibilityWitness {
    type Inputs<H: HostTypes + 'static> = MintImpossibilityWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/IH_1";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::ih::verify_proof_impossibility_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/proof/InhabitanceImpossibilityWitness`. Attests `https://uor.foundation/op/IH_1`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::ih::verify_proof_inhabitance_impossibility_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintInhabitanceImpossibilityWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintInhabitanceImpossibilityWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintInhabitanceImpossibilityWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintInhabitanceImpossibilityWitness {}
impl OntologyTarget for MintInhabitanceImpossibilityWitness {}

impl Certificate for MintInhabitanceImpossibilityWitness {
    const IRI: &'static str = "https://uor.foundation/proof/InhabitanceImpossibilityWitness";
    type Evidence = ();
}

/// Inputs to `MintInhabitanceImpossibilityWitness::ontology_mint`. One field per property of `https://uor.foundation/proof/InhabitanceImpossibilityWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintInhabitanceImpossibilityWitnessInputs<H: HostTypes + 'static> {
    /// achievabilityStatus
    pub achievability_status: crate::enums::AchievabilityStatus,
    /// contradictionProof
    pub contradiction_proof: &'static H::HostString,
    /// dependsOn
    pub depends_on: &'static [crate::kernel::op::IdentityHandle<H>],
    /// formalDerivation
    pub formal_derivation: crate::bridge::proof::DerivationTermHandle<H>,
    /// grounded
    pub grounded: crate::user::type_::ConstrainedTypeHandle<H>,
    /// impossibilityDomain
    pub impossibility_domain: crate::enums::VerificationDomain,
    /// impossibilityReason
    pub impossibility_reason: &'static H::HostString,
    /// provesIdentity
    pub proves_identity: crate::kernel::op::IdentityHandle<H>,
    /// searchTrace
    pub search_trace: crate::bridge::trace::InhabitanceSearchTraceHandle<H>,
    /// strategy
    pub strategy: crate::enums::ProofStrategy,
    /// timestamp
    pub timestamp: &'static H::WitnessBytes,
    /// verified
    pub verified: bool,
    /// verifiedAtLevel
    pub verified_at_level: &'static [crate::enums::WittLevel],
    /// witness
    pub witness: &'static [crate::bridge::proof::WitnessDataHandle<H>],
}

impl<H: HostTypes + 'static> Copy for MintInhabitanceImpossibilityWitnessInputs<H> {}
impl<H: HostTypes + 'static> Clone for MintInhabitanceImpossibilityWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes + 'static> Default for MintInhabitanceImpossibilityWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            achievability_status: crate::enums::AchievabilityStatus::default(),
            contradiction_proof: H::EMPTY_HOST_STRING,
            depends_on: &[],
            formal_derivation: crate::bridge::proof::DerivationTermHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            grounded: crate::user::type_::ConstrainedTypeHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            impossibility_domain: crate::enums::VerificationDomain::default(),
            impossibility_reason: H::EMPTY_HOST_STRING,
            proves_identity: crate::kernel::op::IdentityHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            search_trace: crate::bridge::trace::InhabitanceSearchTraceHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            strategy: crate::enums::ProofStrategy::default(),
            timestamp: H::EMPTY_WITNESS_BYTES,
            verified: false,
            verified_at_level: &[],
            witness: &[],
        }
    }
}

impl OntologyVerifiedMint for MintInhabitanceImpossibilityWitness {
    type Inputs<H: HostTypes + 'static> = MintInhabitanceImpossibilityWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/IH_1";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::ih::verify_proof_inhabitance_impossibility_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/state/GroundingWitness`. Attests `https://uor.foundation/op/surfaceSymmetry`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::oa::verify_state_grounding_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintStateGroundingWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintStateGroundingWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintStateGroundingWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintStateGroundingWitness {}
impl OntologyTarget for MintStateGroundingWitness {}

impl Certificate for MintStateGroundingWitness {
    const IRI: &'static str = "https://uor.foundation/state/GroundingWitness";
    type Evidence = ();
}

/// Inputs to `MintStateGroundingWitness::ontology_mint`. One field per property of `https://uor.foundation/state/GroundingWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintStateGroundingWitnessInputs<H: HostTypes + 'static> {
    /// witnessBinding
    pub witness_binding: &'static [crate::user::state::BindingHandle<H>],
    /// witnessStep
    pub witness_step: u64,
}

impl<H: HostTypes + 'static> Copy for MintStateGroundingWitnessInputs<H> {}
impl<H: HostTypes + 'static> Clone for MintStateGroundingWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes + 'static> Default for MintStateGroundingWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            witness_binding: &[],
            witness_step: 0,
        }
    }
}

impl OntologyVerifiedMint for MintStateGroundingWitness {
    type Inputs<H: HostTypes + 'static> = MintStateGroundingWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/surfaceSymmetry";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::oa::verify_state_grounding_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/type/CompletenessWitness`. Attests `https://uor.foundation/op/CC_1`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::cc::verify_type_completeness_witness`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintCompletenessWitness {
    content_fingerprint: ContentFingerprint,
}

impl MintCompletenessWitness {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintCompletenessWitness {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintCompletenessWitness {}
impl OntologyTarget for MintCompletenessWitness {}

impl Certificate for MintCompletenessWitness {
    const IRI: &'static str = "https://uor.foundation/type/CompletenessWitness";
    type Evidence = ();
}

/// Inputs to `MintCompletenessWitness::ontology_mint`. One field per property of `https://uor.foundation/type/CompletenessWitness` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintCompletenessWitnessInputs<H: HostTypes> {
    /// sitesClosed
    pub sites_closed: u64,
    /// witnessConstraint
    pub witness_constraint: crate::user::type_::ConstraintHandle<H>,
}

impl<H: HostTypes> Copy for MintCompletenessWitnessInputs<H> {}
impl<H: HostTypes> Clone for MintCompletenessWitnessInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintCompletenessWitnessInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            sites_closed: 0,
            witness_constraint: crate::user::type_::ConstraintHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
        }
    }
}

impl OntologyVerifiedMint for MintCompletenessWitness {
    type Inputs<H: HostTypes + 'static> = MintCompletenessWitnessInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/CC_1";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::cc::verify_type_completeness_witness::<H>(inputs)
    }
}

/// Phase 10 sealed witness for `https://uor.foundation/type/LiftObstruction`. Attests `https://uor.foundation/op/WLS_2`.
/// Carries a single `ContentFingerprint` and a private constructor; mint via `OntologyVerifiedMint::ontology_mint`. Phase 12 fills the primitive body in `crate::primitives::lo::verify_type_lift_obstruction`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MintLiftObstruction {
    content_fingerprint: ContentFingerprint,
}

impl MintLiftObstruction {
    /// Content fingerprint of the witnessed structure.
    #[inline]
    #[must_use]
    pub const fn content_fingerprint(&self) -> ContentFingerprint {
        self.content_fingerprint
    }

    /// Crate-internal constructor — only the verify-* primitive in
    /// `crate::primitives::*` may instantiate the witness.
    #[inline]
    #[must_use]
    #[allow(dead_code)]
    pub(crate) const fn from_fingerprint(content_fingerprint: ContentFingerprint) -> Self {
        Self {
            content_fingerprint,
        }
    }
}

impl crate::enforcement::certificate_sealed::Sealed for MintLiftObstruction {}
impl crate::enforcement::ontology_target_sealed::Sealed for MintLiftObstruction {}
impl OntologyTarget for MintLiftObstruction {}

impl Certificate for MintLiftObstruction {
    const IRI: &'static str = "https://uor.foundation/type/LiftObstruction";
    type Evidence = ();
}

/// Inputs to `MintLiftObstruction::ontology_mint`. One field per property of `https://uor.foundation/type/LiftObstruction` (own + inherited from `subclass_of` chain, excluding annotation properties). Object-property fields carry `{Range}Handle<H>` Phase-8 handles; datatype fields are XSD-mapped scalars (`bool` / `u64` / `i64` / `H::Decimal` / `&'static H::HostString`); enum-class ranges (per `Ontology::enum_class_names()`) carry the enum value directly. Non-functional properties are wrapped in `&'static [{T}]`. `Default` fills every field with the host's `EMPTY_*` sentinel (Phase 14); Phase 15's `verify_*` rejects all-sentinel inputs.
#[derive(Debug)]
pub struct MintLiftObstructionInputs<H: HostTypes> {
    /// obstructionSite
    pub obstruction_site: crate::bridge::partition::SiteIndexHandle<H>,
    /// obstructionTrivial
    pub obstruction_trivial: bool,
}

impl<H: HostTypes> Copy for MintLiftObstructionInputs<H> {}
impl<H: HostTypes> Clone for MintLiftObstructionInputs<H> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}

impl<H: HostTypes> Default for MintLiftObstructionInputs<H> {
    #[inline]
    fn default() -> Self {
        Self {
            obstruction_site: crate::bridge::partition::SiteIndexHandle::<H>::new(
                crate::enforcement::ContentFingerprint::zero(),
            ),
            obstruction_trivial: false,
        }
    }
}

impl OntologyVerifiedMint for MintLiftObstruction {
    type Inputs<H: HostTypes + 'static> = MintLiftObstructionInputs<H>;
    const THEOREM_IDENTITY: &'static str = "https://uor.foundation/op/WLS_2";

    #[inline]
    fn ontology_mint<H: HostTypes + 'static>(
        inputs: Self::Inputs<H>,
    ) -> Result<Self, GenericImpossibilityWitness> {
        crate::primitives::lo::verify_type_lift_obstruction::<H>(inputs)
    }
}