use crate::enums::ProofStrategy;
use crate::enums::WittLevel;
use crate::HostTypes;
pub trait Certificate<H: HostTypes> {
fn method(&self) -> ProofStrategy;
fn verified(&self) -> bool;
fn witt_length(&self) -> u64;
fn timestamp(&self) -> &H::WitnessBytes;
fn certifies(&self) -> &H::HostString;
}
pub trait TransformCertificate<H: HostTypes>: Certificate<H> {
type TermExpression: crate::kernel::schema::TermExpression<H>;
fn transform_type(&self) -> &Self::TermExpression;
}
pub trait IsometryCertificate<H: HostTypes>: Certificate<H> {}
pub trait InvolutionCertificate<H: HostTypes>: Certificate<H> {
type Operation: crate::kernel::op::Operation<H>;
fn operation(&self) -> &Self::Operation;
}
pub trait CompletenessCertificate<H: HostTypes>: Certificate<H> {
type CompleteType: crate::user::type_::CompleteType<H>;
fn certified_type(&self) -> &Self::CompleteType;
type CompletenessAuditTrail: CompletenessAuditTrail<H>;
fn audit_trail(&self) -> &Self::CompletenessAuditTrail;
}
pub trait CompletenessAuditTrail<H: HostTypes> {
fn witness_count(&self) -> u64;
}
pub trait GroundingCertificate<H: HostTypes>: Certificate<H> {
type GroundedContext: crate::user::state::GroundedContext<H>;
fn certified_grounding(&self) -> &Self::GroundedContext;
type GroundingWitness: crate::user::state::GroundingWitness<H>;
fn grounding_witness(&self) -> &Self::GroundingWitness;
}
pub trait GeodesicCertificate<H: HostTypes>: Certificate<H> {
type GeodesicTrace: crate::bridge::trace::GeodesicTrace<H>;
fn certified_geodesic(&self) -> &Self::GeodesicTrace;
fn geodesic_trace(&self) -> &Self::GeodesicTrace;
type GeodesicEvidenceBundle: GeodesicEvidenceBundle<H>;
fn evidence_bundle(&self) -> &Self::GeodesicEvidenceBundle;
}
pub trait MeasurementCertificate<H: HostTypes>: Certificate<H> {
type MeasurementEvent: crate::bridge::trace::MeasurementEvent<H>;
fn certified_measurement(&self) -> &Self::MeasurementEvent;
fn von_neumann_entropy(&self) -> H::Decimal;
fn landauer_cost(&self) -> H::Decimal;
}
pub trait GeodesicEvidenceBundle<H: HostTypes> {
fn is_ar1_ordered(&self) -> bool;
fn is_dc10_selected(&self) -> bool;
}
pub trait BornRuleVerification<H: HostTypes>: Certificate<H> {
fn born_rule_verified(&self) -> bool;
}
pub trait LiftChainCertificate<H: HostTypes>: Certificate<H> {
type LiftChain: crate::user::type_::LiftChain<H>;
fn certified_chain(&self) -> &Self::LiftChain;
type ChainAuditTrail: ChainAuditTrail<H>;
fn chain_audit_trail(&self) -> &Self::ChainAuditTrail;
fn target_level(&self) -> WittLevel;
fn source_level(&self) -> WittLevel;
}
pub trait ChainAuditTrail<H: HostTypes> {
fn chain_step_count(&self) -> u64;
}
pub trait InhabitanceCertificate<H: HostTypes>:
crate::bridge::proof::ComputationCertificate<H> + Certificate<H>
{
type ValueTuple: crate::kernel::schema::ValueTuple<H>;
fn witness(&self) -> &[Self::ValueTuple];
type InhabitanceSearchTrace: crate::bridge::trace::InhabitanceSearchTrace<H>;
fn search_trace(&self) -> &Self::InhabitanceSearchTrace;
type ConstrainedType: crate::user::type_::ConstrainedType<H>;
fn grounded(&self) -> &Self::ConstrainedType;
}
pub trait MultiplicationCertificate<H: HostTypes>: Certificate<H> {
fn splitting_factor(&self) -> u64;
fn sub_multiplication_count(&self) -> u64;
fn landauer_cost_nats(&self) -> H::Decimal;
}
pub trait PartitionCertificate<H: HostTypes>: Certificate<H> {}
pub trait GenericImpossibilityCertificate<H: HostTypes>: Certificate<H> {}
pub trait InhabitanceImpossibilityCertificate<H: HostTypes>: Certificate<H> {}