---------------------------- MODULE AbilityChecksMC ---------------------------- EXTENDS AbilityContracts, SpecimenFactsA VARIABLE block9 Init9 == block9 \in 1..12 Next9 == UNCHANGED block9 Spec9 == Init9 /\ [][Next9]_block9 Empty9 == [id \in {} |-> id] CardObject9(card,zone,deployed,face) == [card |-> card,form |-> "Card",kind |-> CardFacts9[card].kind,side |-> CardFacts9[card].side, zone |-> zone,loc |-> zone,host |-> 0,deployed |-> deployed,face |-> face,activated |-> FALSE, area |-> "NoValue",targetSite |-> "NoValue",targetSiteKind |-> "NoValue",position |-> "NoValue",marks |-> {}] GeneralAbilityChecks9 == LET src == ObjectAbilitySource9(1) paid == OpenAbilityResolution9(100,"Paid",src,"Play",<<10,11>>,"parent") detached == [paid EXCEPT !.detached = TRUE] imminent == [detached EXCEPT !.phase = "Imminent",!.firstImminent = TRUE] resolving == [imminent EXCEPT !.phase = "Resolving"] between == [resolving EXCEPT !.phase = "Between"] SchemaAtom187 == [between EXCEPT !.cursor = 2,!.phase = "Imminent"] last == [SchemaAtom187 EXCEPT !.phase = "Resolving"] complete == [last EXCEPT !.phase = "Complete",!.complete = TRUE,!.lastFinished = TRUE] objects == [id \in {1} |-> CardObject9("Specimen0142","Play",TRUE,"Up")] renewed == [id \in {2} |-> [objects[1] EXCEPT !.zone = "SideBDeck",!.deployed = FALSE]] cost == [abilityInstance |-> 100,allPaid |-> TRUE] receipt == [abilityInstance |-> 100,instruction |-> 10,complete |-> TRUE] grp1 == <<[id |-> 1,serial |-> 1,pending |-> {100,101}]>> grp2 == Append(grp1,[id |-> 2,serial |-> 2,pending |-> {102}]) childReturn == [abilityInstance |-> 102,returned |-> TRUE] effects == [id \in {1} |-> [creator |-> 1,ability |-> 100,duration |-> "SchemaAtom138"]] used == [id \in {1} |-> [tag |-> "AbilityUsed",useId |-> 1,abilityInstance |-> 100,source |-> src,player |-> "SideB"]] payment == [id |-> 7,complete |-> TRUE,paidCounterIds |-> {88}] witnesses == [id \in {1} |-> [paymentId |-> 7,source |-> ObjectAbilitySource9(9),allowsPayment |-> TRUE,paidCounters |-> {88}]] Specimen0221 == AbilityDefinition9(1,"Conditional",src,"Printed") inactive == [id \in {1} |-> CardObject9("Specimen0221","SideAHand",FALSE,"Down")] itemInspection == [ActivityContext9 EXCEPT !.inspectedItemObject = 1] exampleFamily076 == [id \in {1} |-> CardObject9("Specimen0122","SideBDiscard",FALSE,"Up")] exampleFamily076Ability == [Specimen0221 EXCEPT !.rulesOnlyZones = {"SideBDiscard"}] unactivationzed == [id \in {1} |-> CardObject9("Specimen0021","Play",TRUE,"Down")] Specimen0013 == [id \in {1} |-> CardObject9("Specimen0013","SideAHand",FALSE,"Down")] encounter == [ActivityContext9 EXCEPT !.encounterLive = TRUE,!.encounteredObject = 1] selfStatic == AbilityDefinition9(1,"Static",src,"Printed") Specimen0080 == [id \in {1} |-> CardObject9("Specimen0080","SideBHand",FALSE,"Down")] exampleFamily005 == [id \in {1} |-> CardObject9("Specimen0021","SideAHand",FALSE,"Down")] exampleFamily032 == [id \in {1} |-> CardObject9("Specimen0151","SideAHand",FALSE,"Down")] Specimen0029 == [id \in {1} |-> CardObject9("Specimen0029","SideAHand",FALSE,"Down")] exampleFamily007 == [id \in {1} |-> [CardObject9("Specimen0046","Play",TRUE,"Up") EXCEPT !.form = "Counter",!.kind = "SchemaAtom043",!.host = 9]] barrierInstruction == [Specimen0221 EXCEPT !.kind = "BarrierInstruction"] oldInfra == [id \in {1} |-> [CardObject9("Specimen0110","Play",TRUE,"Up") EXCEPT !.activated = TRUE]] newInfra == [id \in {2} |-> CardObject9("Specimen0110","SideADiscard",FALSE,"Up")] oldSpecimen0150 == [id \in {1} |-> CardObject9("Specimen0150","Play",TRUE,"Up")] newSpecimen0150 == [id \in {2} |-> CardObject9("Specimen0150","SideBDeck",FALSE,"Down")] departure == [oldObject |-> 1,newObject |-> 2,ability |-> 2,matchingInstances |-> {20,21,22}] hold == [ability |-> 2,object |-> 2,instances |-> {20,21,22}] heldAbility == [Specimen0221 EXCEPT !.id = 2,!.source = ObjectAbilitySource9(2)] instances == [id \in 20..22 |-> [ability |-> 2,sourceObject |-> 2,status |-> IF id=20 THEN "Done" ELSE "Pending"]] hctx == [ActivityContext9 EXCEPT !.departureHolds = [id \in {2} |-> hold],!.instances = instances] defs == [id \in 1..4 |-> [Specimen0221 EXCEPT !.id = id,!.kind = CASE id=1 \/ id=2 -> "Play" [] id=3 -> "BarrierInstruction" [] OTHER -> "Static"]] units == [id \in {1,2} |-> IF id=1 THEN [tokens |-> {1},kind |-> "Static",instructions |-> <<>>] ELSE [tokens |-> {2,3,4},kind |-> "Conditional",instructions |-> <<10,11>>]] IN /\ AbilityKinds9 = {"Static","Paid","Conditional","Play","BarrierInstruction"} /\ AbilityTextPartition9(4,units) /\ ~AbilityTextPartition9(5,units) /\ ~AbilityTextPartition9(4,[units EXCEPT ![2].tokens = {1,2,3,4}]) /\ ~AbilityShape9("Conditional",<<>>) /\ ~AbilityShape9("Static",<<10>>) /\ AbilityTextPartition9(0,Empty9) /\ ~CardFacts9["Specimen0229"].hasRulesText /\ ~CardFacts9["Specimen0258"].hasRulesText /\ CardFacts9["Specimen0070"].kind = "Support" /\ CardFacts9["Specimen0013"].kind = "Barrier" /\ AbilityIsInterrupt9(TRUE,FALSE) /\ AbilityIsInterrupt9(FALSE,TRUE) /\ ~AbilityIsInterrupt9(FALSE,FALSE) /\ AbilitySource9("Printed",1,9,8,"NoValue") = src /\ AbilitySource9("Granted",1,9,8,"NoValue") = ObjectAbilitySource9(9) /\ AbilitySource9("Lingering",1,9,8,"NoValue") = ObjectAbilitySource9(8) /\ AbilitySource9("Rule",1,9,8,"BasicRetire") = RuleAbilitySource9("BasicRetire") /\ DetachPaidAbility9(paid,detached,cost) /\ ~DetachPaidAbility9(paid,detached,[cost EXCEPT !.allPaid = FALSE]) /\ BeginAbilityInstructions9(detached,imminent,TRUE,FALSE) /\ ~BeginAbilityInstructions9(paid,[imminent EXCEPT !.detached = FALSE],TRUE,TRUE) /\ ~BeginAbilityInstructions9(detached,imminent,FALSE,TRUE) /\ BeginAbilityInstructions9([paid EXCEPT !.kind = "Conditional"],[imminent EXCEPT !.kind = "Conditional"],TRUE,TRUE) /\ ~BeginAbilityInstructions9([paid EXCEPT !.kind = "Conditional"],[imminent EXCEPT !.kind = "Conditional"],TRUE,FALSE) /\ ~AbilityIsResolving9(paid) /\ AbilityIsResolving9(imminent) /\ AbilityIsResolving9(between) /\ ~AbilityIsResolving9(complete) /\ PlayedSourceIsResolving9([stage |-> "ProcedureCode3d7f756d78f7",complete |-> FALSE]) /\ ~PlayedSourceIsResolving9([stage |-> "ProcedureCodee977e478b45b",complete |-> FALSE]) /\ ResolveCurrentInstruction9(imminent,resolving,TRUE) /\ ~ResolveCurrentInstruction9(imminent,resolving,FALSE) /\ FinishAbilityInstruction9(resolving,between,receipt) /\ ~FinishAbilityInstruction9(resolving,between,[receipt EXCEPT !.instruction = 11]) /\ ContinueAbilityInstructions9(between,SchemaAtom187,TRUE) /\ ~ContinueAbilityInstructions9(between,SchemaAtom187,FALSE) /\ FinishAbilityInstruction9(last,complete,[receipt EXCEPT !.instruction = 11]) /\ ~ReturnAbility9(complete,[complete EXCEPT !.returned = TRUE],FALSE,"parent") /\ ReturnAbility9(complete,[complete EXCEPT !.returned = TRUE],TRUE,"parent") /\ ~ReturnAbility9(complete,[complete EXCEPT !.returned = TRUE],TRUE,"foreign") /\ PushChainGroup9(<<>>,grp1,1,1,{100,101},{}) /\ NextChainMembers9(grp1) = {100,101} /\ PushChainGroup9(grp1,grp2,2,2,{102},{1}) /\ NextChainMembers9(grp2) = {102} /\ FinishChainMember9(grp2,grp1,102,childReturn) /\ ~FinishChainMember9(grp2,grp2,100,[childReturn EXCEPT !.abilityInstance = 100]) /\ ~FinishChainMember9(grp2,grp1,102,[childReturn EXCEPT !.returned = FALSE]) /\ DetachedSourceTarget9(detached,objects,1) /\ ~DetachedSourceTarget9(detached,renewed,2) /\ ~DetachedSourceTarget9(detached,[id \in {2} |-> objects[1]],2) /\ ~DetachedSourceTarget9(detached,[id \in {1} |-> renewed[2]],1) /\ MaintainLingering9(effects,effects,{}) /\ MaintainLingering9(effects,Empty9,{1}) /\ AbilityUseDue9("Paid",FALSE,TRUE,FALSE,FALSE) /\ ~AbilityUseDue9("Paid",FALSE,FALSE,TRUE,TRUE) /\ ~AbilityUseDue9("Conditional",FALSE,TRUE,FALSE,TRUE) /\ AbilityUseDue9("Conditional",FALSE,FALSE,TRUE,FALSE) /\ ~AbilityUseDue9("Conditional",TRUE,FALSE,TRUE,TRUE) /\ RecordAbilityUse9(Empty9,used,1,100,src,"SideB",TRUE,{used[1]}) /\ ~RecordAbilityUse9(Empty9,used,1,100,src,"SideB",FALSE,{used[1]}) /\ ~RecordAbilityUse9(used,used,1,100,src,"SideB",TRUE,{used[1]}) /\ CounterPermissionUseSources9(payment,witnesses) = {ObjectAbilitySource9(9)} /\ CounterPermissionUseSources9([payment EXCEPT !.complete = FALSE],witnesses) = {} /\ CounterPermissionUseSources9(payment,[witnesses EXCEPT ![1].paidCounters = {89}]) = {} /\ CounterPermissionUseSources9(payment,[witnesses EXCEPT ![1].paidCounters = {}]) = {} /\ CounterPermissionUseSources9(payment,[witnesses EXCEPT ![1].allowsPayment = FALSE]) = {} /\ CounterPermissionUseSources9(payment,[witnesses EXCEPT ![1].paymentId = 6]) = {} /\ ~AbilityActive9(Specimen0221,inactive,{1},FALSE,ActivityContext9) /\ AbilityActive9([Specimen0221 EXCEPT !.sourceItemInspection = TRUE],inactive,{1},FALSE,itemInspection) /\ ~AbilityActive9([Specimen0221 EXCEPT !.sourceItemInspection = TRUE],inactive,{},FALSE,itemInspection) /\ AbilityActive9([Specimen0221 EXCEPT !.sourceItemInspection = TRUE],inactive,{1},FALSE,ActivityContext9) /\ AbilitySourceItemInspectionMatches9([Specimen0221 EXCEPT !.sourceItemInspection = TRUE],[tag |-> "ItemInspectionCard",object |-> 1]) /\ ~AbilitySourceItemInspectionMatches9([Specimen0221 EXCEPT !.sourceItemInspection = TRUE],[tag |-> "ItemInspectionCard",object |-> 2]) /\ AbilityActive9(Specimen0221,exampleFamily007,{1},FALSE,ActivityContext9) /\ ~AbilityActive9(Specimen0221,Empty9,{1},FALSE,ActivityContext9) /\ AbilityActive9(exampleFamily076Ability,exampleFamily076,{1},FALSE,ActivityContext9) /\ ~AbilityActive9(exampleFamily076Ability,[exampleFamily076 EXCEPT ![1].zone = "Removed"],{1},FALSE,ActivityContext9) /\ AbilityActive9([selfStatic EXCEPT !.ownPermissionModifier = TRUE],Specimen0080,{1},FALSE,ActivityContext9) /\ AbilityActive9([selfStatic EXCEPT !.ownCostModifier = TRUE],exampleFamily005,{1},FALSE,ActivityContext9) /\ AbilityActive9([selfStatic EXCEPT !.ownProgressRequirement = TRUE],exampleFamily032,{1},FALSE,ActivityContext9) /\ AbilityActive9([selfStatic EXCEPT !.ownClaimObjectiveAdditionalCost = TRUE],Specimen0029,{1},FALSE,ActivityContext9) /\ AbilityActive9([selfStatic EXCEPT !.allowsProgress = TRUE],unactivationzed,{1},FALSE,ActivityContext9) /\ AbilityActive9(barrierInstruction,Specimen0013,{1},FALSE,encounter) /\ ~AbilityActive9(Specimen0221,Specimen0013,{1},FALSE,encounter) /\ ~AbilityActive9(barrierInstruction,Specimen0013,{1},FALSE,[encounter EXCEPT !.encounterLive = FALSE]) /\ ~AbilityActive9([exampleFamily076Ability EXCEPT !.ownCostModifier = TRUE], [exampleFamily076 EXCEPT ![1].zone = "Play",![1].deployed = TRUE,![1].face = "Down"],{1},TRUE,itemInspection) /\ OpenDepartureHold9(oldInfra,newInfra,1,2,2,{20,21,22},departure,TRUE,FALSE,hold) /\ ~OpenDepartureHold9(oldInfra,newInfra,1,2,2,{20,21,22},departure,FALSE,FALSE,hold) /\ ~OpenDepartureHold9(oldInfra,[newInfra EXCEPT ![2].zone = "SideAObjectiveCompletion",![2].kind = "Objective"], 1,2,2,{20,21,22},departure,TRUE,TRUE,hold) /\ ~OpenDepartureHold9(oldInfra,newInfra,1,2,2,{20,21,22},[departure EXCEPT !.newObject = 3],TRUE,FALSE,hold) /\ DepartureHoldLive9(hold,heldAbility,newInfra,instances) /\ ~DepartureHoldLive9(hold,heldAbility,newInfra,[id \in 20..22 |-> [instances[id] EXCEPT !.status = "Done"]]) /\ ~DepartureHoldLive9(hold,[heldAbility EXCEPT !.source = src],newInfra,instances) /\ AbilityActive9(heldAbility,newInfra,{2},FALSE,hctx) /\ ~AbilityActive9(heldAbility,newInfra,{},FALSE,hctx) /\ ~AbilityActive9([heldAbility EXCEPT !.id = 3],newInfra,{3},FALSE,hctx) /\ ~AbilityActive9([heldAbility EXCEPT !.source = ObjectAbilitySource9(3)], [id \in {3} |-> newInfra[2]],{2},FALSE,hctx) /\ OpenDepartureHold9(oldSpecimen0150,newSpecimen0150,1,2,2,{20},[departure EXCEPT !.matchingInstances = {20}],TRUE,FALSE, [hold EXCEPT !.instances = {20}]) /\ LET f == OpenAbilityResolution9(20,"Conditional",ObjectAbilitySource9(2),"SideBDeck",<<40>>,"hold") a == [f EXCEPT !.phase = "Imminent",!.firstImminent = TRUE,!.detached = TRUE] ownHold == [hold EXCEPT !.instances = {20}] ownInstances == [id \in {20} |-> [ability |-> 2,sourceObject |-> 2,status |-> "Pending"]] ownContext == [ActivityContext9 EXCEPT !.departureHolds = [id \in {2} |-> ownHold],!.instances = ownInstances] IN /\ BeginAbilityInstructions9(f,a,TRUE,AbilityActive9(heldAbility,newSpecimen0150,{2},FALSE,ownContext)) /\ DetachedSourceTarget9(a,newSpecimen0150,2) /\ AbilityActive9([Specimen0221 EXCEPT !.provider = "Lingering"],Empty9,{1},FALSE, [ActivityContext9 EXCEPT !.lingeringAbilities = {1}]) /\ ~AbilityActive9([Specimen0221 EXCEPT !.provider = "Lingering"],Empty9,{1},FALSE, [ActivityContext9 EXCEPT !.lingeringAbilities = {2}]) /\ AbilityActive9([Specimen0221 EXCEPT !.source = RuleAbilitySource9("BasicRetire")],Empty9,{1},FALSE, [ActivityContext9 EXCEPT !.activeRules = {"BasicRetire"}]) /\ AbilityActive9(Specimen0221,inactive,{1},FALSE,[ActivityContext9 EXCEPT !.persistentAbilities = {1}]) /\ ~AbilityActive9(Specimen0221,inactive,{1},FALSE,[ActivityContext9 EXCEPT !.persistentAbilities = {2}]) /\ EffectiveBarrierInstructions9({1,2,4},defs) = {} /\ EffectiveBarrierInstructions9({1,2,3,4},defs) = {3} /\ EffectiveAbilityOrder9({1,2,3,4},defs,<<1,2>>,<<3>>) /\ EffectiveAbilityChange9({1,2,3,4},{1,2,4},defs,<<1,2>>,<<1,2>>,<<1,2>>) /\ ~EffectiveAbilityChange9({1,2,3,4},{1,3,4},defs,<<1,2>>,<<1,2>>,<<1,2>>) /\ ~EffectiveAbilityChange9({1,3,4},{1,2,3,4},defs,<<1>>,<<1>>,<<1>>) /\ ~EffectiveAbilityChange9({1,2,3,4},{1,2,3,4},defs,<<1,2>>,<<1,2>>,<<2,1>>) TurnFixture92(player) == [OpenTurn5(player,1,[p \in SetupPlayers |-> 0]) EXCEPT !.phase = "NeutralValue00001"] TurnContextFixture92(turn,step) == [turn |-> turn,step |-> step] TraversalContextFixture92(traversal) == [traversal |-> traversal,returned |-> FALSE] TurnSiteFixture92(player,step,actionPoints) == TurnPrioritySite9(TurnFixture92(player),step,10,actionPoints,TurnContextFixture92(TurnFixture92(player),step)) NoInstruction92 == [id |-> 0,abilityInstance |-> 0,index |-> 0] InstructionFixture92 == [id |-> 700,abilityInstance |-> 100,index |-> 1] OpeningFixture92(id,kind,site,instances,group,beginning) == [tag |-> "PriorityWindowOpening",windowId |-> id,kind |-> kind,site |-> site,members |-> DOMAIN instances,instances |-> instances, group |-> group,beginning |-> beginning,instruction |-> IF kind="Interrupt" THEN InstructionFixture92 ELSE NoInstruction92, effectRevision |-> IF kind="Interrupt" THEN 1 ELSE 0,modifiersExist |-> TRUE, preparation |-> CASE kind="Reaction" -> <<"ConditionsMet","PendingGroup">> [] kind="Interrupt" -> <<"ExpectedEffects","ReplacementEffects","ConditionalPending">> [] OTHER -> <<>>] WindowFixture92(id,kind,site,instances,group,beginning) == LET opening == OpeningFixture92(id,kind,site,instances,group,beginning) IN NewPriorityWindow9(id,kind,site,instances,group,beginning,opening.instruction,opening.effectRevision) OpenedFixture92(before,id,kind,site,instances,group,beginning) == Append(before,WindowFixture92(id,kind,site,instances,group,beginning)) ReadyFixture92(w) == [w EXCEPT !.stage = "Ready",!.checkpoint = 800+w.reception] CheckpointFixture92(w) == [tag |-> "NormalPriorityCheckpoint",id |-> 800+w.reception,windowId |-> w.id,reception |-> w.reception, player |-> w.priority,complete |-> TRUE,reactionsDrained |-> TRUE] LegalityFixture92(w,option) == [tag |-> "PriorityOptionLegality",windowId |-> w.id,reception |-> w.reception,option |-> option, legal |-> TRUE,active |-> TRUE,transactionId |-> 900+option.id,costsPayable |-> TRUE] PaymentFixture92(w) == [tag |-> "PriorityOptionPayment",windowId |-> w.id,option |-> w.busy,transactionId |-> w.busyTransaction, allTriggerCostsPaid |-> TRUE,costCheckpointAndReactionsDrained |-> TRUE] ReturnFixture92(w) == [tag |-> "PriorityOptionReturn",windowId |-> w.id,option |-> w.busy,transactionId |-> w.busyTransaction, triggerPayment |-> PaymentFixture92(w),allCostsPaid |-> TRUE,optionComplete |-> TRUE,childrenReturned |-> TRUE,reactionsDrained |-> TRUE] EffectFixture92(w,relevant,paid) == [tag |-> "CurrentImminentEffect",windowId |-> w.id,instruction |-> w.instruction,revision |-> 1, relevantConditional |-> relevant,paidInterruptAbilities |-> paid] SyntheticOption92(id,kind,player) == PriorityOption9(id,kind,player,100,0,ObjectAbilitySource9(1),0,{}) TraversalFixture92(step) == [OpenTraversal6(2,20,"action") EXCEPT !.formalBegun = TRUE,!.phase = TraversalStepInfo6(step).phase,!.step = step, !.attacked = "SchemaAtom082",!.position = "outer"] LayoutFixture92 == [slots |-> [outer |-> [barrierCard |-> 2]]] ApproachFixture92 == [id |-> 20,traversalId |-> 2,position |-> "outer",begun |-> TRUE] TraversalSiteFixture92(step) == TraversalPrioritySite9(TurnFixture92("SideB"),TraversalFixture92(step),ApproachFixture92,LayoutFixture92,TraversalContextFixture92(TraversalFixture92(step))) CleanupFixture92(id,traversalId,encounterId,windowIds,stack) == [tag |-> "TraversalEndWindowCleanup",id |-> id,traversalId |-> traversalId,encounterId |-> encounterId,endInstructionId |-> 1200, windowIds |-> windowIds,windows |-> [wid \in windowIds |-> stack[CHOOSE i \in 1..Len(stack) : stack[i].id=wid]]] GroupFixture92(windowId,interrupt) == [i \in 101..104 |-> ConditionalInstance9(i,IF i \in {101,102} THEN 51 ELSE 52, ObjectAbilitySource9(IF i \in {101,102} THEN 1 ELSE 2), IF i \in {101,102} THEN "SideB" ELSE "SideA",i \in {102,104},7,windowId,interrupt)] ConditionalOptionFixture92(w,id) == LET i == w.members[id] IN PriorityOption9(1000+id,IF w.kind="Interrupt" THEN "ConditionalInterrupt" ELSE "Conditional", i.controller,i.ability,id,i.source,0,{}) StartedFixture92(w,option) == StartPriorityOptionFrame9(w,option,900+option.id) TimingSiteChecks92 == LET sideB == TurnFixture92("SideB") sideA == TurnFixture92("SideA") rs == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",1) cs == TurnSiteFixture92("SideA","ProcedureCode0e20572a4bab",1) IN /\ ActivePlayer9(sideB) = "SideB" /\ InactivePlayer9(sideB) = "SideA" /\ ActivePlayer9(sideA) = "SideA" /\ InactivePlayer9(sideA) = "SideB" /\ TimingStructureKinds9 = {"Turn","TurnPhase","SchemaAtom138","TraversalPhase","Inspection","ItemInspection"} /\ \A kind \in TimingStructureKinds9 : TimingRefValid9(TimingRef9(kind,1)) /\ ~TimingRefValid9(TimingRef9("Deploy",1)) /\ ~TimingRefValid9(TimingRef9("EscalatingResourceContest",1)) /\ ~TimingRefValid9(TimingRef9("ItemInspection",0)) /\ WindowSiteAllowed9("NeutralValue00001",rs) /\ WindowSiteAllowed9("NeutralValue00001",cs) /\ ~WindowSiteAllowed9("NeutralValue00001",[rs EXCEPT !.actionPoints = 0]) /\ ~WindowSiteAllowed9("NeutralValue00001",[rs EXCEPT !.phase = "Discard"]) /\ ~WindowSiteAllowed9("NeutralValue00001",[rs EXCEPT !.active = "SideA"]) /\ ~WindowSiteAllowed9("NeutralValue00001",[rs EXCEPT !.step = "ProcedureCode484be3e50aa9"]) /\ ~WindowSiteAllowed9("NeutralValue00001",[cs EXCEPT !.step = "ProcedureCoded6fbcb09dd4f"]) /\ ~WindowSiteAllowed9("NeutralValue00001",[rs EXCEPT !.live = FALSE]) /\ TurnPhases5("SideB") = <<"NeutralValue00001","Discard">> /\ \A p \in SetupPlayers : LET steps == IF p="SideA" THEN SetupRange(SideASteps5) ELSE SetupRange(SideBSteps5) paidSteps == IF p="SideA" THEN {"ProcedureCode36065334a34a","ProcedureCoded6fbcb09dd4f","ProcedureCode438597bede05"} ELSE {"ProcedureCodef53fc09e15ad","ProcedureCode484be3e50aa9","ProcedureCode13c5f7239eb2"} IN \A step \in steps : LET info == IF p="SideA" THEN SideAStepInfo5(step) ELSE SideBStepInfo5(step) turn == [TurnFixture92(p) EXCEPT !.phase = info.phase] site == TurnPrioritySite9(turn,step,10,3,TurnContextFixture92(turn,step)) IN /\ WindowSiteAllowed9("Paid",site) = (step \in paidSteps) /\ PaidWindowOptions9(site).score = (p="SideA" /\ step \in {"ProcedureCode36065334a34a","ProcedureCoded6fbcb09dd4f"}) /\ WindowSiteAllowed9("NeutralValue00001",site) = (step = IF p="SideA" THEN "ProcedureCode0e20572a4bab" ELSE "ProcedureCode989abc27e0c6") /\ \A step \in TraversalSteps6 : LET site == TraversalSiteFixture92(step) IN /\ WindowSiteAllowed9("Paid",site) = (step \in {"ProcedureCode71e36c9e8e04","ProcedureCode3a6daf593ad4","ProcedureCode8b3260c0010f","ProcedureCode4f60245a1dde","ProcedureCode2cd618a9e624"}) /\ ~PaidWindowOptions9(site).score /\ \A kind \in PriorityWindowKinds9 : ~WindowSiteAllowed9(kind,[rs EXCEPT !.structure = TimingRef9("EscalatingResourceContest",1)]) PriorityReceptionChecks92 == LET site == TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",3) w == WindowFixture92(30,"Paid",site,Empty9,0,NoTimingRef9) ready == ReadyFixture92(w) cp == CheckpointFixture92(w) option == SyntheticOption92(1,"RegularPaid","SideB") start == StartedFixture92(ready,option) receipt == ReturnFixture92(start) returned == CompletePriorityOptionFrame9(start) child == WindowFixture92(31,"Paid",site,Empty9,0,NoTimingRef9) closedChild == ClosePriorityWindow9(child) IN /\ PriorityWindowKinds9 = {"NeutralValue00001","Paid","Reaction","Interrupt","MidItemInspection"} /\ OpenPriorityWindow9(<<>>,<>,30,"Paid",site,Empty9,OpeningFixture92(30,"Paid",site,Empty9,0,NoTimingRef9),{}) /\ ~OpenPriorityWindow9(<<>>,<>,30,"Paid",site,Empty9,OpeningFixture92(30,"Paid",site,Empty9,0,NoTimingRef9),{30}) /\ ~OpenPriorityWindow9(<>,<>,30,"Paid",site,Empty9,OpeningFixture92(30,"Paid",site,Empty9,0,NoTimingRef9),{}) /\ ActionablePriority9(<<>>) = {} /\ ActionablePriority9(<>) = {} /\ ActionablePriority9(<>) = {"SideB"} /\ CheckpointPriority9(<>,<>,cp) /\ ~CheckpointPriority9(<>,<>,[cp EXCEPT !.complete = FALSE]) /\ ~CheckpointPriority9(<>,<>,[cp EXCEPT !.reactionsDrained = FALSE]) /\ ~CheckpointPriority9(<>,<>,[cp EXCEPT !.windowId = 31]) /\ ~CheckpointPriority9(<>,<>,[cp EXCEPT !.reception = 2]) /\ ~CheckpointPriority9(<>,<>,[cp EXCEPT !.player = "SideA"]) /\ ~BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(w,option),Empty9) /\ BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(ready,option),Empty9) /\ ActionablePriority9(<>) = {} /\ ~BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(start,option),Empty9) /\ CompletePriorityOption9(<>,<>,receipt) /\ returned.priority = "SideB" /\ returned.stage = "NeedCheckpoint" /\ returned.reception = 2 /\ ActionablePriority9(<>) = {} /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.allCostsPaid = FALSE]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.childrenReturned = FALSE]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.reactionsDrained = FALSE]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.optionComplete = FALSE]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.transactionId = 1]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.windowId = 31]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.triggerPayment.allTriggerCostsPaid = FALSE]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.triggerPayment.costCheckpointAndReactionsDrained = FALSE]) /\ ~CompletePriorityOption9(<>,<>,[receipt EXCEPT !.triggerPayment.transactionId = 1]) /\ ~BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(returned,option),Empty9) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(returned)) /\ ~CheckpointPriority9(<>,<>,cp) /\ OpenPriorityWindow9(<>,<>,31,"Paid",site,Empty9,OpeningFixture92(31,"Paid",site,Empty9,0,NoTimingRef9),{30}) /\ ActionablePriority9(<>) = {"SideA"} /\ ActionablePriority9(<>) = {} /\ \A p,q \in SetupPlayers : Cardinality(ActionablePriority9(<<[ready EXCEPT !.priority=p],ReadyFixture92([child EXCEPT !.priority=q])>>)) = 1 /\ ~CheckpointPriority9(<>,<>,[CheckpointFixture92(child) EXCEPT !.windowId = 30]) /\ PopClosedPriorityWindow9(<>,<>) /\ ~PriorityPaymentMatches9(start,[PaymentFixture92(start) EXCEPT !.allTriggerCostsPaid=FALSE]) /\ ActionablePriority9(<>)={} /\ ~BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(start,option),Empty9) /\ PopClosedPriorityWindow9(<>,<>) /\ PopClosedPriorityWindow9(<>,<>) /\ ~PopClosedPriorityWindow9(<>,<>) /\ ~PopClosedPriorityWindow9(<>,<<>>) ActionPriorityChecks92 == \A player \in SetupPlayers : LET step == IF player="SideA" THEN "ProcedureCode0e20572a4bab" ELSE "ProcedureCode989abc27e0c6" site == TurnSiteFixture92(player,step,1) w == WindowFixture92(32,"NeutralValue00001",site,Empty9,0,NoTimingRef9) ready == ReadyFixture92(w) option == SyntheticOption92(2,"NeutralValue00001",player) start == StartedFixture92(ready,option) done == CompletePriorityOptionFrame9(start) other == [option EXCEPT !.controller = TurnOtherPlayer5(player)] IN /\ OpenPriorityWindow9(<<>>,<>,32,"NeutralValue00001",site,Empty9,OpeningFixture92(32,"NeutralValue00001",site,Empty9,0,NoTimingRef9),{}) /\ ~OpenPriorityWindow9(<<>>,OpenedFixture92(<<>>,32,"NeutralValue00001",[site EXCEPT !.actionPoints=0],Empty9,0,NoTimingRef9),32,"NeutralValue00001", [site EXCEPT !.actionPoints=0],Empty9,OpeningFixture92(32,"NeutralValue00001",[site EXCEPT !.actionPoints=0],Empty9,0,NoTimingRef9),{}) /\ ready.priority = player /\ ~PassPriority9(<>,<>,player,Empty9) /\ BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(ready,option),Empty9) /\ ~BeginPriorityOption9(<>,<>,other,Empty9,LegalityFixture92(ready,other),Empty9) /\ ~BeginPriorityOption9(<>,<>, [option EXCEPT !.kind="RegularPaid"],Empty9,LegalityFixture92(ready,[option EXCEPT !.kind="RegularPaid"]),Empty9) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(start)) /\ ~done.open /\ done.priority = "NoValue" /\ done.reception = 1 /\ ~BeginPriorityOption9(<>,<>,option,Empty9,LegalityFixture92(done,option),Empty9) PaidPriorityChecks92 == LET site == TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",3) w == ReadyFixture92(WindowFixture92(33,"Paid",site,Empty9,0,NoTimingRef9)) passed == PassPriorityFrame9(w) sideA == ReadyFixture92(passed) option == SyntheticOption92(3,"RegularPaid","SideA") start == StartedFixture92(sideA,option) returned == CompletePriorityOptionFrame9(start) repass == PassPriorityFrame9(ReadyFixture92(returned)) objects == [id \in {1,2,3,4} |-> CASE id=1 -> CardObject9("Specimen0221","Play",TRUE,"Down") [] id=2 -> CardObject9("NeutralValue00016","Play",TRUE,"Down") [] id=3 -> CardObject9("Specimen0059","Play",TRUE,"Down") [] OTHER -> CardObject9("Specimen0029","Play",TRUE,"Down")] IN /\ PassPriority9(<>,<>,"SideB",Empty9) /\ passed.priority="SideA" /\ passed.stage="NeedCheckpoint" /\ passed.previousPass /\ ~PassPriority9(<>,<>,"SideA",Empty9) /\ PassPriority9(<>,<>,"SideA",Empty9) /\ ~PassPriorityFrame9(sideA).open /\ BeginPriorityOption9(<>,<>,option,objects,LegalityFixture92(sideA,option),Empty9) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(start)) /\ ~returned.previousPass /\ returned.priority="SideA" /\ PassPriority9(<>,<>,"SideA",Empty9) /\ repass.open /\ repass.priority="SideB" /\ \A kind \in {"NeutralValue00001","Conditional","ConditionalInterrupt","PaidInterrupt","MidItemInspection"} : LET bad == [option EXCEPT !.kind=kind] IN ~BeginPriorityOption9(<>,<>,bad,objects,LegalityFixture92(sideA,bad),Empty9) /\ \A p \in SetupPlayers : \A step \in {"ProcedureCode36065334a34a","ProcedureCoded6fbcb09dd4f","ProcedureCode438597bede05","ProcedureCodef53fc09e15ad","ProcedureCode484be3e50aa9","ProcedureCode13c5f7239eb2","ProcedureCode71e36c9e8e04","ProcedureCode3a6daf593ad4","ProcedureCode8b3260c0010f","ProcedureCode4f60245a1dde","ProcedureCode2cd618a9e624"} : LET turn == IF step \in {"ProcedureCode36065334a34a","ProcedureCoded6fbcb09dd4f","ProcedureCode438597bede05"} THEN [TurnFixture92("SideA") EXCEPT !.phase=SideAStepInfo5(step).phase] ELSE [TurnFixture92("SideB") EXCEPT !.phase=SideBStepInfo5(step).phase] s == IF step \in TraversalSteps6 THEN TraversalSiteFixture92(step) ELSE TurnPrioritySite9(turn,step,10,3,TurnContextFixture92(turn,step)) pw == ReadyFixture92([WindowFixture92(34,"Paid",s,Empty9,0,NoTimingRef9) EXCEPT !.priority=p]) reg == SyntheticOption92(4,"RegularPaid",p) score == [reg EXCEPT !.kind="ObjectiveCompletion",!.target=4] IN /\ BeginPriorityOption9(<>,<>,reg,objects,LegalityFixture92(pw,reg),Empty9) /\ BeginPriorityOption9(<>,<>,score,objects,LegalityFixture92(pw,score),Empty9) = (p="SideA" /\ step \in {"ProcedureCode36065334a34a","ProcedureCoded6fbcb09dd4f"}) /\ \A target \in 1..4 : LET activation == [reg EXCEPT !.kind="Activation",!.target=target] allowed == p="SideA" /\ ((target \in {1,3} /\ step \in {"ProcedureCode36065334a34a","ProcedureCoded6fbcb09dd4f","ProcedureCode438597bede05","ProcedureCodef53fc09e15ad","ProcedureCode484be3e50aa9","ProcedureCode13c5f7239eb2","ProcedureCode71e36c9e8e04","ProcedureCode3a6daf593ad4","ProcedureCode2cd618a9e624"}) \/ (target=2 /\ step="ProcedureCode3a6daf593ad4")) IN BeginPriorityOption9(<>,<>,activation,objects,LegalityFixture92(pw,activation),Empty9) = allowed /\ \A flag \in {"legal","active","costsPayable"} : LET legality == [LegalityFixture92(sideA,option) EXCEPT ![flag]=FALSE] IN ~BeginPriorityOption9(<>,<>,option,objects,legality,Empty9) /\ ~BeginPriorityOption9(<>,<>,option,objects,[LegalityFixture92(sideA,option) EXCEPT !.reception=1],Empty9) /\ LET wrongBarrier == [option EXCEPT !.kind="Activation",!.target=1] iw == ReadyFixture92([WindowFixture92(35,"Paid",TraversalSiteFixture92("ProcedureCode3a6daf593ad4"),Empty9,0,NoTimingRef9) EXCEPT !.priority="SideA"]) onlyBarrier == [id \in {1} |-> objects[2]] IN ~BeginPriorityOption9(<>,<>,wrongBarrier,onlyBarrier,LegalityFixture92(iw,wrongBarrier),Empty9) ReactionPriorityChecks92 == LET site == TraversalSiteFixture92("ProcedureCodeda7bff1d9270") group == GroupFixture92(40,FALSE) open == WindowFixture92(40,"Reaction",site,group,7,site.structure) w == ReadyFixture92(open) optional == ConditionalOptionFixture92(w,101) mandatory == ConditionalOptionFixture92(w,102) started == StartedFixture92(w,mandatory) returned == ReadyFixture92(CompletePriorityOptionFrame9(started)) passed == PassPriorityFrame9(returned) inactive == ReadyFixture92(passed) sideAMandatory == ConditionalOptionFixture92(inactive,104) sideAStart == StartedFixture92(inactive,sideAMandatory) sideAReturn == ReadyFixture92(CompletePriorityOptionFrame9(sideAStart)) closed == PassPriorityFrame9(sideAReturn) IN /\ OpenPriorityWindow9(<<>>,<>,40,"Reaction",site,group,OpeningFixture92(40,"Reaction",site,group,7,site.structure),{}) /\ group[101].ability=group[102].ability /\ group[101].id # group[102].id /\ BeginPriorityOption9(<>,<>,optional,Empty9,LegalityFixture92(w,optional),Empty9) /\ BeginPriorityOption9(<>,<>,mandatory,Empty9,LegalityFixture92(w,mandatory),Empty9) /\ ~PassPriority9(<>,<>,"SideB",Empty9) /\ ~BeginPriorityOption9(<>,<>, [optional EXCEPT !.source=ObjectAbilitySource9(9)],Empty9, LegalityFixture92(w,[optional EXCEPT !.source=ObjectAbilitySource9(9)]),Empty9) /\ ~BeginPriorityOption9(<>,<>, [optional EXCEPT !.ability=52],Empty9,LegalityFixture92(w,[optional EXCEPT !.ability=52]),Empty9) /\ ~BeginPriorityOption9(<>,<>, [optional EXCEPT !.instance=105],Empty9,LegalityFixture92(w,[optional EXCEPT !.instance=105]),Empty9) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(started)) /\ returned.pending = {101,103,104} /\ returned.triggered = {102} /\ returned.members=group /\ PriorityStackValid9(<>) /\ ~BeginPriorityOption9(<>,<>,mandatory,Empty9, LegalityFixture92(returned,mandatory),Empty9) /\ PassPriority9(<>,<>,"SideB",Empty9) /\ passed.pending={103,104} /\ passed.lostPending={101} /\ passed.priority="SideA" /\ ~PassPriority9(<>,<>,"SideA",Empty9) /\ BeginPriorityOption9(<>,<>,sideAMandatory,Empty9,LegalityFixture92(inactive,sideAMandatory),Empty9) /\ PassPriority9(<>,<>,"SideA",Empty9) /\ ~closed.open /\ closed.pending={} /\ closed.lostPending={101,103} /\ closed.reception=4 /\ \A player \in SetupPlayers : LET ownSite == TraversalPrioritySite9(TurnFixture92(player),TraversalFixture92("ProcedureCodeda7bff1d9270"),ApproachFixture92,LayoutFixture92, TraversalContextFixture92(TraversalFixture92("ProcedureCodeda7bff1d9270"))) rw == ReadyFixture92(WindowFixture92(40,"Reaction",ownSite,group,7,ownSite.structure)) ownMandatory == PendingOwned9(rw,player,TRUE) cleared == [rw EXCEPT !.pending = @ \ ownMandatory] IN /\ ~CanPassPriority9(rw,Empty9) /\ PassPriorityFrame9(cleared).priority=TurnOtherPlayer5(player) /\ ~PassPriorityFrame9(ReadyFixture92(PassPriorityFrame9([cleared EXCEPT !.pending={}]))).open /\ LET childGroup == [id \in {105} |-> ConditionalInstance9(id,51,ObjectAbilitySource9(1),"SideB",FALSE,8,41,FALSE)] child == WindowFixture92(41,"Reaction",site,childGroup,8,NoTimingRef9) IN /\ OpenPriorityWindow9(<>,<>,41,"Reaction",site,childGroup, OpeningFixture92(41,"Reaction",site,childGroup,8,NoTimingRef9),{40}) /\ WindowTop9(<>).pending={105} /\ started.members=group /\ ~OpenPriorityWindow9(<<>>,OpenedFixture92(<<>>,40,"Reaction",site,Empty9,7,site.structure),40,"Reaction",site,Empty9, OpeningFixture92(40,"Reaction",site,Empty9,7,site.structure),{}) /\ LET wrong == [group EXCEPT ![101].windowId=41] IN ~OpenPriorityWindow9(<<>>,OpenedFixture92(<<>>,40,"Reaction",site,wrong,7,site.structure),40,"Reaction",site,wrong, OpeningFixture92(40,"Reaction",site,wrong,7,site.structure),{}) InterruptPriorityChecks92 == LET site == TraversalSiteFixture92("ProcedureCodef1914978bb8e") group == GroupFixture92(50,TRUE) open == WindowFixture92(50,"Interrupt",site,group,7,NoTimingRef9) w == ReadyFixture92(open) allRelevant == EffectFixture92(w,DOMAIN group,{60}) irrelevantMandatory == EffectFixture92(w,{101,103},{60}) conditional == ConditionalOptionFixture92(w,101) paid == [SyntheticOption92(5,"PaidInterrupt","SideB") EXCEPT !.ability=60] passed == PassPriorityFrame9(w) sideA == ReadyFixture92(passed) sideAPaid == [paid EXCEPT !.controller="SideA",!.id=6] started == StartedFixture92(sideA,sideAPaid) returned == ReadyFixture92(CompletePriorityOptionFrame9(started)) sideB == ReadyFixture92(PassPriorityFrame9(returned)) IN /\ OpenPriorityWindow9(<<>>,<>,50,"Interrupt",site,group,OpeningFixture92(50,"Interrupt",site,group,7,NoTimingRef9),{}) /\ ~PassPriority9(<>,<>,"SideB",allRelevant) /\ PassPriority9(<>,<>,"SideB",irrelevantMandatory) /\ passed.pending=DOMAIN group /\ passed.lostPending={} /\ BeginPriorityOption9(<>,<>,conditional,Empty9,LegalityFixture92(w,conditional),allRelevant) /\ BeginPriorityOption9(<>,<>,paid,Empty9,LegalityFixture92(w,paid),allRelevant) /\ ~BeginPriorityOption9(<>,<>,paid,Empty9,LegalityFixture92(w,paid),[allRelevant EXCEPT !.paidInterruptAbilities={}]) /\ ~BeginPriorityOption9(<>,<>,conditional,Empty9,LegalityFixture92(w,conditional), [allRelevant EXCEPT !.relevantConditional={102,103,104}]) /\ BeginPriorityOption9(<>,<>,sideAPaid,Empty9,LegalityFixture92(sideA,sideAPaid),irrelevantMandatory) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(started)) /\ ~returned.previousPass /\ PassPriority9(<>,<>,"SideA",irrelevantMandatory) /\ sideB.priority="SideB" /\ sideB.pending=DOMAIN group /\ BeginPriorityOption9(<>,<>,conditional,Empty9,LegalityFixture92(sideB,conditional),allRelevant) /\ ~PassPriority9(<>,<>,"SideB",allRelevant) /\ PassPriority9(<>,<>,"SideB",irrelevantMandatory) /\ ~PassPriorityFrame9(sideB).open /\ PassPriorityFrame9(sideB).lostPending=DOMAIN group /\ \A field \in {"windowId","revision"} : LET bad == [allRelevant EXCEPT ![field]=0] IN ~BeginPriorityOption9(<>,<>,conditional,Empty9,LegalityFixture92(w,conditional),bad) /\ ~PassPriority9(<>,<>,"SideB",[irrelevantMandatory EXCEPT !.instruction=[InstructionFixture92 EXCEPT !.id=701]]) /\ LET fresh == [paid EXCEPT !.ability=61] now == [allRelevant EXCEPT !.revision=2,!.paidInterruptAbilities={60,61}] IN /\ ~BeginPriorityOption9(<>,<>,fresh,Empty9,LegalityFixture92(w,fresh),allRelevant) /\ BeginPriorityOption9(<>,<>,fresh,Empty9,LegalityFixture92(w,fresh),now) /\ \A prep \in {<<"ReplacementEffects","ExpectedEffects","ConditionalPending">>,<<"ExpectedEffects","ConditionalPending">>} : ~OpenPriorityWindow9(<<>>,<>,50,"Interrupt",site,group, [OpeningFixture92(50,"Interrupt",site,group,7,NoTimingRef9) EXCEPT !.preparation=prep],{}) /\ ~OpenPriorityWindow9(<<>>,<>,50,"Interrupt",site,group, [OpeningFixture92(50,"Interrupt",site,group,7,NoTimingRef9) EXCEPT !.modifiersExist=FALSE],{}) /\ LET wrong == [group EXCEPT ![101].interrupt=FALSE] IN ~OpenPriorityWindow9(<<>>,OpenedFixture92(<<>>,50,"Interrupt",site,wrong,7,NoTimingRef9),50,"Interrupt",site,wrong, OpeningFixture92(50,"Interrupt",site,wrong,7,NoTimingRef9),{}) MidItemInspectionPriorityChecks92 == LET card == CardObject9("Specimen0221","SideAHand",FALSE,"Down") objects == [i \in {1} |-> card] a == [OpenItemInspection7(77,1,card,2,3,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] site == ItemInspectionPrioritySite9(TurnFixture92("SideA"),a,objects) open == WindowFixture92(60,"MidItemInspection",site,Empty9,0,NoTimingRef9) w == ReadyFixture92(open) basic == BasicRetireOption7(card,[exists |-> TRUE,amount |-> 0],TRUE,TRUE) nonRetire == MidOption7("SyntheticOther",FALSE,TRUE,TRUE) options == {basic,nonRetire} option == PriorityOption9(7,"MidItemInspection","SideB","BasicRetire",0,RuleAbilitySource9("BasicRetire"),1,{}) other == [option EXCEPT !.ability="SyntheticOther"] used == [a EXCEPT !.midUsed=TRUE,!.midResolving=TRUE] declined == [a EXCEPT !.midDone=TRUE] finished == [used EXCEPT !.midResolving=FALSE,!.midDone=TRUE] start == StartedFixture92(w,option) IN /\ WindowSiteAllowed9("MidItemInspection",site) /\ open.priority="SideB" /\ open.active="SideA" /\ OpenPriorityWindow9(<<>>,<>,60,"MidItemInspection",site,Empty9,OpeningFixture92(60,"MidItemInspection",site,Empty9,0,NoTimingRef9),{}) /\ ~WindowSiteAllowed9("MidItemInspection",[site EXCEPT !.step="ProcedureCodefd91bef8bbd3"]) /\ ~WindowSiteAllowed9("Paid",site) /\ ~PaidWindowOptions9(site).score /\ PassMidItemInspection9(<>,<>,a,declined,objects,options,FALSE,FALSE) /\ ~PassMidItemInspection9(<>,<>,a,declined,objects,options,TRUE,FALSE) /\ ~PassMidItemInspection9(<>,<>,a,declined,objects,options,FALSE,TRUE) /\ ~PassPriority9(<>,<>,"SideB",Empty9) /\ ~BeginPriorityOption9(<>,<>,option,objects,LegalityFixture92(w,option),Empty9) /\ BeginMidItemInspectionOption9(<>,<>,option,objects,LegalityFixture92(w,option),a,a,basic,options,TRUE,TRUE) /\ ~BeginMidItemInspectionOption9(<>,<>,other,objects,LegalityFixture92(w,other),a,a,nonRetire,options,TRUE,FALSE) /\ BeginMidItemInspectionOption9(<>,<>,other,objects,LegalityFixture92(w,other),a,a,nonRetire,options,FALSE,FALSE) /\ PayMidItemInspectionOption9(<>,a,used,objects,basic,options,TRUE,TRUE,PaymentFixture92(start)) /\ ~PayMidItemInspectionOption9(<>,a,used,objects,basic,options,TRUE,TRUE,[PaymentFixture92(start) EXCEPT !.allTriggerCostsPaid=FALSE]) /\ ~PayMidItemInspectionOption9(<>,a,used,objects,basic,options,TRUE,TRUE,[PaymentFixture92(start) EXCEPT !.transactionId=1]) /\ ~PayMidItemInspectionOption9(<>,a,used,objects,basic,options,TRUE,TRUE,[PaymentFixture92(start) EXCEPT !.costCheckpointAndReactionsDrained=FALSE]) /\ ~PayMidItemInspectionOption9(<>,used,used,objects,basic,options,TRUE,TRUE,PaymentFixture92(start)) /\ ~BeginMidItemInspectionOption9(<>,<>,option,objects,LegalityFixture92(start,option),a,a,basic,options,TRUE,TRUE) /\ CompleteMidItemInspectionOption9(<>,<>,ReturnFixture92(start),used,finished) /\ ~CompletePriorityOption9(<>,<>,ReturnFixture92(start)) /\ ~CompletePriorityOptionFrame9(start).open /\ CompletePriorityOptionFrame9(start).reception=1 /\ ~BeginMidItemInspectionOption9(<>, <>,option,objects, LegalityFixture92(CompletePriorityOptionFrame9(start),option),finished,finished,basic,options,FALSE,FALSE) /\ ~PassMidItemInspection9(<>,<>,[a EXCEPT !.id=78], [declined EXCEPT !.id=78],objects,options,FALSE,FALSE) /\ LET b == [OpenInspection7(88,"SchemaAtom082","SchemaAtom082",2,"RulesTraversalInspection","traversal",{},InspectionPolicy7("Normal",0)) EXCEPT !.active=TRUE] bs == InspectionPrioritySite9(TurnFixture92("SideB"),b) IN ~WindowSiteAllowed9("Paid",bs) /\ ~WindowSiteAllowed9("MidItemInspection",bs) /\ ~PaidWindowOptions9(bs).score CancellationPriorityChecks92 == LET site == TraversalSiteFixture92("ProcedureCodeda7bff1d9270") group == [i \in {201,202} |-> ConditionalInstance9(i,IF i=201 THEN 81 ELSE 82, ObjectAbilitySource9(IF i=201 THEN 1 ELSE 2),IF i=201 THEN "SideB" ELSE "SideA",i=202,9,70,FALSE)] w == ReadyFixture92(WindowFixture92(70,"Reaction",site,group,9,site.structure)) exampleFamily018 == ConditionalOptionFixture92(w,201) resolving == StartedFixture92(w,exampleFamily018) canceled == ClosePriorityWindow9(resolving) encounter == [OpenEncounter6(20,2,2,FALSE,"traversal",<<301>>) EXCEPT !.stage="BeginReactions"] bypassed == [encounter EXCEPT !.stage="Complete",!.bypassed=TRUE,!.aborted=TRUE] ended == [tag |-> "TimingStructureEnded",structure |-> TimingRef9("TraversalPhase",20)] childGroup == [i \in {203} |-> ConditionalInstance9(i,83,ObjectAbilitySource9(3),"SideA",TRUE,10,71,FALSE)] child == WindowFixture92(71,"Reaction",site,childGroup,10,NoTimingRef9) ancestorGroup == [i \in {204} |-> ConditionalInstance9(i,84,ObjectAbilitySource9(3),"SideA",TRUE,11,69,FALSE)] ancestor == WindowFixture92(69,"Reaction",site,ancestorGroup,11,TimingRef9("SchemaAtom138",2)) itemInspectionCard == CardObject9("Specimen0221","SideAHand",FALSE,"Down") a == [OpenItemInspection7(20,4,itemInspectionCard,2,3,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE] itemInspectionSite == ItemInspectionPrioritySite9(TurnFixture92("SideB"),a,[i \in {4} |-> itemInspectionCard]) itemInspectionGroup == [i \in {205} |-> ConditionalInstance9(i,85,ObjectAbilitySource9(4),"SideA",TRUE,12,72,FALSE)] itemInspectionSibling == WindowFixture92(72,"Reaction",itemInspectionSite,itemInspectionGroup,12,TimingRef9("ItemInspection",20)) full == <> fullAfter == <> IN /\ CardFacts9["Specimen0088"].kind="Technique" /\ CardFacts9["Specimen0088"].side="SideB" /\ CardFacts9["NeutralValue00016"].kind="Barrier" /\ CardFacts9["NeutralValue00016"].side="SideA" /\ BeginPriorityOption9(<>,<>,exampleFamily018,Empty9,LegalityFixture92(w,exampleFamily018),Empty9) /\ BypassEncounter6(encounter,bypassed,TRUE,{[tag |-> "Bypass",encounterId |-> 20,barrierCard |-> 2,traversalId |-> 2]}) /\ CancelBeginningReactions9(full,fullAfter,ended) /\ PriorityStackValid9(full) /\ PriorityStackValid9(fullAfter) /\ canceled.pending={} /\ canceled.lostPending={202} /\ canceled.busy=exampleFamily018 /\ canceled.members=group /\ canceled.triggered={201} /\ fullAfter[1]=ancestor /\ fullAfter[3]=itemInspectionSibling /\ fullAfter[4]=child /\ ActionablePriority9(fullAfter)={} /\ CancelBeginningReactions9(<>,<>,[ended EXCEPT !.structure=TimingRef9("ItemInspection",20)]) /\ CancelBeginningReactions9(<>,<>,[ended EXCEPT !.structure=TimingRef9("TraversalPhase",21)]) /\ ~CancelBeginningReactions9(<>,<>,[ended EXCEPT !.structure=TimingRef9("ItemInspection",20)]) /\ LegacyPriorityWindow9(w).beginPhaseId=20 /\ LegacyPriorityWindow9(w).beginItemInspectionId=0 /\ LegacyPriorityWindow9(itemInspectionSibling).beginItemInspectionId=20 /\ LegacyPriorityWindow9(itemInspectionSibling).beginPhaseId=0 /\ CloseEndedBeginReaction6(LegacyPriorityWindow9(w),LegacyPriorityWindow9(ClosePriorityWindow9(w)),{20}) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(canceled)) /\ ~CompletePriorityOptionFrame9(canceled).open /\ CompletePriorityOptionFrame9(canceled).priority="NoValue" /\ PopClosedPriorityWindow9(<>,<<>>) /\ \A kind \in TimingStructureKinds9 : LET ref == TimingRef9(kind,55) own == [w EXCEPT !.beginning=ref] wrong == TimingRef9(IF kind="ItemInspection" THEN "TraversalPhase" ELSE "ItemInspection",55) IN /\ CancelBeginningReactions9(<>,<>,[ended EXCEPT !.structure=ref]) /\ CancelBeginningReactions9(<>,<>,[ended EXCEPT !.structure=wrong]) /\ LET paid == ReadyFixture92(WindowFixture92(73,"Paid",TraversalSiteFixture92("ProcedureCode8b3260c0010f"),Empty9,0,NoTimingRef9)) markedReaction == [child EXCEPT !.site.traversalEnding=TRUE] markedPaid == ClosePriorityWindow9([paid EXCEPT !.site.traversalEnding=TRUE]) otherGroup == [i \in {206} |-> ConditionalInstance9(i,86,ObjectAbilitySource9(3),"SideA",TRUE,13,74,FALSE)] otherSite == [site EXCEPT !.traversalId=3,!.structure=TimingRef9("TraversalPhase",21)] otherTraversal == WindowFixture92(74,"Reaction",otherSite,otherGroup,13,NoTimingRef9) endingReady == ReadyFixture92([w EXCEPT !.site.traversalEnding=TRUE]) startsItemInspection == [exampleFamily018 EXCEPT !.newStructures={TimingRef9("ItemInspection",88)}] scope == CleanupFixture92(1300,2,0,{73,71},<>) IN /\ ApplyTraversalEndWindowPolicy9(<>,<>,1300,scope) /\ PriorityStackValid9(<>) /\ PriorityStackValid9(<>) /\ ~WindowSiteAllowed9("Paid",[paid.site EXCEPT !.traversalEnding=TRUE]) /\ ~BeginPriorityOption9(<>,<>,startsItemInspection,Empty9, LegalityFixture92(endingReady,startsItemInspection),Empty9) /\ BeginPriorityOption9(<>,<>,exampleFamily018,Empty9, LegalityFixture92(endingReady,exampleFamily018),Empty9) EndingContextChecks92 == LET turn == [TurnFixture92("SideB") EXCEPT !.phase="Discard",!.formalBegun=TRUE] endedTurn == [turn EXCEPT !.formalEnded=TRUE] turnProcedure == TurnContextFixture92(endedTurn,"ProcedureCode8f113080e47f") nextTurn == OpenTurn5("SideA",2,endedTurn.begunCounts) nextTurnProcedure == OpenSideAProcedure5(nextTurn) card == CardObject9("Specimen0221","SideAHand",FALSE,"Down") objects == [id \in 1..3 |-> CASE id=1 -> card [] id=2 -> CardObject9("Specimen0076","Play",TRUE,"Up") [] OTHER -> CardObject9("Specimen0207","Play",TRUE,"Up")] itemInspection == [OpenItemInspection7(20,1,card,2,3,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE, !.step="ProcedureCode662478499367",!.midDone=TRUE,!.claimObjectiveDone=TRUE] endedItemInspection == [itemInspection EXCEPT !.active=FALSE,!.complete=TRUE,!.step="Complete",!.completionReason="Normal"] returnedItemInspection == [endedItemInspection EXCEPT !.returned=TRUE] siteInspection == [OpenInspection7(3,"SchemaAtom082","SchemaAtom082",2,"RulesTraversalInspection","traversal",{},InspectionPolicy7("Normal",0)) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode8c612115d469"] endedInspection == [siteInspection EXCEPT !.active=FALSE,!.complete=TRUE,!.step="Complete",!.completionReason="Normal"] returnedInspection == [endedInspection EXCEPT !.returned=TRUE] traversal == [TraversalFixture92("ProcedureCode9606a4cd52b4") EXCEPT !.ending=TRUE,!.successful=TRUE,!.reachedSuccess=TRUE] traversalEnd == [traversal |-> traversal,phaseEndedIds |-> {},windows |-> <<>>,windowsDone |-> TRUE, fundReturned |-> TRUE,resultDeclared |-> TRUE,returned |-> FALSE] endedTraversal == [traversalEnd EXCEPT !.traversal.complete=TRUE,!.phaseEndedIds={20}] returnedTraversal == [endedTraversal EXCEPT !.returned=TRUE] sites == <> returnedSites == <> doppelGroup == [i \in {301} |-> ConditionalInstance9(i,91,ObjectAbilitySource9(2),"SideB",FALSE,15,91,FALSE)] doppelOpen == WindowFixture92(91,"Reaction",sites[2],doppelGroup,15,NoTimingRef9) doppelWindow == ReadyFixture92(doppelOpen) doppel == [ConditionalOptionFixture92(doppelWindow,301) EXCEPT !.newStructures={TimingRef9("SchemaAtom138",3)}] nextTraversal == OpenTraversal6(3,21,"Specimen007691") safetyGroup == [i \in {302} |-> ConditionalInstance9(i,92,ObjectAbilitySource9(3),"SideB",TRUE,16,92,FALSE)] safetyOpen == WindowFixture92(92,"Reaction",sites[1],safetyGroup,16,NoTimingRef9) IN /\ TurnFormalEnd5(turn,endedTurn,TRUE,TurnEndEvents5(turn)) /\ TurnHandoff5(endedTurn,nextTurn,TRUE,{}) /\ EndItemInspection7(itemInspection,endedItemInspection,"Normal",TRUE,{ItemInspectionEndEvent7(itemInspection)}) /\ CompleteNormalItemInspection7(itemInspection,endedItemInspection,objects,TRUE,{ItemInspectionEndEvent7(itemInspection)}) /\ ReturnItemInspectionToCaller7(endedItemInspection,returnedItemInspection,TRUE,"siteInspection") /\ EndInspection7(siteInspection,endedInspection,"Normal",TRUE,{InspectionEndEvent7(siteInspection)}) /\ CompleteNormalInspection7(siteInspection,endedInspection,TRUE,{InspectionEndEvent7(siteInspection)}) /\ ReturnInspectionToCaller7(endedInspection,returnedInspection,TRUE,"traversal") /\ CompleteTraversal6(traversalEnd,endedTraversal,TRUE,{[tag |-> "TraversalEnds",traversalId |-> 2],TraversalPhaseEndEvent6(traversal)},{2}) /\ ReturnTraversalToCaller6(endedTraversal,returnedTraversal,TRUE,"action") /\ \A i \in 1..4 : /\ sites[i].live /\ ~sites[i].timingLive /\ \A kind \in {"Reaction","Interrupt"} : LET wid == 100+i group == [id \in {1} |-> ConditionalInstance9(id,51,ObjectAbilitySource9(1),"SideB",FALSE,17,wid,kind="Interrupt")] open == WindowFixture92(wid,kind,sites[i],group,17,NoTimingRef9) IN /\ OpenPriorityWindow9(<<>>,<>,wid,kind,sites[i],group, OpeningFixture92(wid,kind,sites[i],group,17,NoTimingRef9),{}) /\ PriorityStackValid9(<>) /\ \A kind \in {"NeutralValue00001","Paid","MidItemInspection"} : ~WindowSiteAllowed9(kind,sites[i]) /\ ~returnedSites[i].live /\ \A kind \in PriorityWindowKinds9 : ~WindowSiteAllowed9(kind,returnedSites[i]) /\ CardFacts9["Specimen0207"].kind="Support" /\ CardFacts9["Specimen0236"].kind="Action" /\ OpenPriorityWindow9(<<>>,<>,92,"Reaction",sites[1],safetyGroup, OpeningFixture92(92,"Reaction",sites[1],safetyGroup,16,NoTimingRef9),{}) /\ LET ready == ReadyFixture92(safetyOpen) option == ConditionalOptionFixture92(ready,302) IN BeginPriorityOption9(<>,<>,option,objects,LegalityFixture92(ready,option),Empty9) /\ CardFacts9["Specimen0076"].kind="Equipment" /\ CardFacts9["Specimen0076"].side="SideB" /\ endedTraversal.traversal.successful /\ ~sites[2].traversalEnding /\ OpenPriorityWindow9(<<>>,<>,91,"Reaction",sites[2],doppelGroup, OpeningFixture92(91,"Reaction",sites[2],doppelGroup,15,NoTimingRef9),{}) /\ BeginPriorityOption9(<>,<>,doppel,objects, LegalityFixture92(doppelWindow,doppel),Empty9) /\ nextTraversal.id=3 /\ nextTraversal.phaseId=21 /\ TraversalFrameValid6(nextTraversal) CleanupScopeChecks92 == LET actionSite == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3) actionWindow == ReadyFixture92(WindowFixture92(110,"NeutralValue00001",actionSite,Empty9,0,NoTimingRef9)) traversalAction == [SyntheticOption92(20,"NeutralValue00001","SideB") EXCEPT !.newStructures={TimingRef9("SchemaAtom138",2)}] caller == StartedFixture92(actionWindow,traversalAction) turnPaid == ReadyFixture92(WindowFixture92(111,"Paid",TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",2),Empty9,0,NoTimingRef9)) traversalSite == TraversalSiteFixture92("ProcedureCodeda7bff1d9270") beginGroup == [i \in {401} |-> ConditionalInstance9(i,93,ObjectAbilitySource9(2),"SideA",TRUE,18,112,FALSE)] beginning == WindowFixture92(112,"Reaction",traversalSite,beginGroup,18,traversalSite.structure) otherGroup == [i \in {402} |-> ConditionalInstance9(i,94,ObjectAbilitySource9(3),"SideB",TRUE,19,113,FALSE)] sameTraversalUnselected == WindowFixture92(113,"Reaction",traversalSite,otherGroup,19,NoTimingRef9) ordinaryGroup == [i \in {403} |-> ConditionalInstance9(i,95,ObjectAbilitySource9(3),"SideB",TRUE,20,114,FALSE)] ordinary == ReadyFixture92(WindowFixture92(114,"Reaction",traversalSite,ordinaryGroup,20,NoTimingRef9)) stack == <> selected == {111,112,114} cleanup == CleanupFixture92(1400,2,0,selected,stack) after == <> noTraversalControl == [traversal |-> NoTraversal6,encounter |-> 20,siteInspections |-> Empty9,itemInspections |-> Empty9, abortedEncounters |-> {},abortedInspectiones |-> {},abortedItemInspectiones |-> {},phaseEndedIds |-> {}, windowCleanupDue |-> FALSE,onlyWindowCleanup |-> FALSE,phaseStepsSkipped |-> FALSE] forcedEnd == EndTraversalOutcome6(noTraversalControl,0) forcedStack == <> forcedCleanup == CleanupFixture92(1401,0,20,{111},forcedStack) ordinaryOption == [ConditionalOptionFixture92(ordinary,403) EXCEPT !.newStructures={TimingRef9("ItemInspection",90)}] descendantGroup == [i \in {404} |-> ConditionalInstance9(i,96,ObjectAbilitySource9(3),"SideB",FALSE,21,115,FALSE)] descendant == WindowFixture92(115,"Reaction",PriorityOpeningSite9(<>,traversalSite),descendantGroup,21,NoTimingRef9) IN /\ PriorityStackValid9(stack) /\ PriorityStackValid9(after) /\ BeginPriorityOption9(<>,<>,traversalAction,Empty9,LegalityFixture92(actionWindow,traversalAction),Empty9) /\ caller.busy.id # 0 /\ caller.site.traversalId=0 /\ turnPaid.site.traversalId=0 /\ ordinary.site.traversalId=2 /\ sameTraversalUnselected.site.traversalId=2 /\ ApplyTraversalEndWindowPolicy9(stack,after,1400,cleanup) /\ after[1]=caller /\ after[4]=sameTraversalUnselected /\ ~after[2].open /\ ~after[3].open /\ after[3].lostPending={401} /\ after[5].open /\ after[5].pending={403} /\ after[5].site.traversalEnding /\ TraversalEndCleanupClass9(beginning)="CloseBegin" /\ TraversalEndCleanupClass9(ordinary)="CompleteNormally" /\ ~BeginPriorityOption9(<>,<>,ordinaryOption,Empty9, LegalityFixture92(after[5],ordinaryOption),Empty9) /\ OpenPriorityWindow9(<>,<>,115,"Reaction",traversalSite,descendantGroup, OpeningFixture92(115,"Reaction",traversalSite,descendantGroup,21,NoTimingRef9),{114}) /\ descendant.site.traversalEnding /\ LET ready == ReadyFixture92(descendant) option == [ConditionalOptionFixture92(ready,404) EXCEPT !.newStructures={TimingRef9("SchemaAtom138",4)}] IN ~BeginPriorityOption9(<>,<>,option,Empty9, LegalityFixture92(ready,option),Empty9) /\ ~ApplyTraversalEndWindowPolicy9(stack,after,1402,cleanup) /\ ~ApplyTraversalEndWindowPolicy9(stack,after,1400,[cleanup EXCEPT !.windows[111]=caller]) /\ EndTheTraversal6(noTraversalControl,forcedEnd,0,TRUE,{[tag |-> "PhaseEnds",phase |-> "Encounter",phaseId |-> 20,traversalId |-> 0]}) /\ forcedEnd.onlyWindowCleanup /\ forcedEnd.windowCleanupDue /\ forcedEnd.traversal=NoTraversal6 /\ ApplyTraversalEndWindowPolicy9(forcedStack,<>,1401,forcedCleanup) /\ PriorityStackValid9(<>) /\ ~ApplyTraversalEndWindowPolicy9(forcedStack,<>,1401, [forcedCleanup EXCEPT !.encounterId=0]) TimingPriorityChecks9 == /\ TimingSiteChecks92 /\ PriorityReceptionChecks92 /\ ActionPriorityChecks92 /\ PaidPriorityChecks92 /\ ReactionPriorityChecks92 /\ InterruptPriorityChecks92 /\ MidItemInspectionPriorityChecks92 /\ CancellationPriorityChecks92 /\ EndingContextChecks92 /\ CleanupScopeChecks92 UnitFixture93(id,category,subtype,primary) == TextUnit93(id,category,subtype,primary,0) InstructionFixture93 == UnitFixture93(10,"Instruction","NoValue",FALSE) CostFixture93 == UnitFixture93(1,"SchemaAtom043","Cost",TRUE) TriggerFixture93 == UnitFixture93(1,"SchemaAtom043","Trigger",TRUE) DeclarationFixture93 == UnitFixture93(10,"Declaration","NoValue",FALSE) FlagFixture93(name,value) == TextUnit93(20,"AbilityFlag",name,FALSE,value) SyntaxFixture93(id,kind,side,cardKind,units) == [id |-> id,kind |-> kind,side |-> side,controller |-> side,cardKind |-> cardKind,source |-> ObjectAbilitySource9(1), units |-> units,arrowAfterFlags |-> TRUE,barrierInstructionPrefix |-> kind="BarrierInstruction", paidPrefix |-> [present |-> kind="Paid",bold |-> TRUE,colon |-> TRUE]] BaseUnits93(kind) == CASE kind="Static" -> <> [] kind="Paid" -> <> [] kind="Conditional" -> <> [] OTHER -> <> TextInterpretationChecks93 == LET cond == SyntaxFixture93(1,"Conditional","SideB","Profile",BaseUnits93("Conditional")) paid == SyntaxFixture93(2,"Paid","SideB","Technique",BaseUnits93("Paid")) static == SyntaxFixture93(3,"Static","SideA","Objective",<>) receipt == [tag |-> "ConditionEvaluation",ability |-> 1,unit |-> 1,kind |-> "Trigger",paid |-> FALSE,eventOccurred |-> TRUE,propertyHolds |-> FALSE] IN /\ TextClasses93={"SchemaAtom043","Restriction","Instruction","Declaration","AbilityFlag"} /\ ConditionKinds93={"Cost","Trigger","Static"} /\ Cardinality(RestrictionKinds93)=7 /\ Cardinality(AbilityFlagKinds93)=6 /\ \A kind \in AbilityKinds9 : LET a == SyntaxFixture93(1,kind,"SideB",IF kind="Play" THEN "Action" ELSE "Technique",BaseUnits93(kind)) IN AbilityTextValid93(a) /\ InferredAbilityKind93(a)=kind /\ AbilityTextValid93(cond) /\ AbilityTextValid93(paid) /\ AbilityTextValid93(static) /\ AbilityTextValid93([cond EXCEPT !.units= <>]) /\ AbilityTextValid93([cond EXCEPT !.units= <<[TriggerFixture93 EXCEPT !.subtype="Static"],InstructionFixture93>>]) /\ ~AbilityTextValid93([cond EXCEPT !.units= <>]) /\ ~AbilityTextValid93([cond EXCEPT !.units= <>]) /\ ~AbilityTextValid93([paid EXCEPT !.paidPrefix.bold=FALSE]) /\ ~AbilityTextValid93([paid EXCEPT !.paidPrefix.colon=FALSE]) /\ ~AbilityTextValid93([paid EXCEPT !.units= <>]) /\ ~AbilityTextValid93([static EXCEPT !.units= <>]) /\ ~AbilityTextValid93([cond EXCEPT !.units= <>]) /\ ~AbilityTextValid93(SyntaxFixture93(4,"Play","SideB","Technique",<>)) /\ ~AbilityTextValid93([cond EXCEPT !.barrierInstructionPrefix=TRUE]) /\ ConditionReceiptMatches93(TriggerFixture93,1,receipt) /\ ~ConditionReceiptMatches93(TriggerFixture93,1,[receipt EXCEPT !.eventOccurred=FALSE]) /\ ~ConditionReceiptMatches93(TriggerFixture93,1,[receipt EXCEPT !.ability=2]) /\ ConditionReceiptMatches93(CostFixture93,1,[receipt EXCEPT !.kind="Cost",!.paid=TRUE]) /\ ~ConditionReceiptMatches93(CostFixture93,1,[receipt EXCEPT !.kind="Cost"]) /\ ConditionReceiptMatches93([TriggerFixture93 EXCEPT !.subtype="Static"],1,[receipt EXCEPT !.kind="Static",!.propertyHolds=TRUE]) /\ \A active,met \in BOOLEAN : DeclarationApplies93(active,met)=(active /\ met) /\ \A restriction \in RestrictionKinds93 : LET r == UnitFixture93(3,"Restriction",restriction,FALSE) all == {<>,<>,<>} IN \A units \in all : LET a == [cond EXCEPT !.units=units] restrictions == [tag |-> "AbilityRestrictions",ability |-> 1,source |-> a.source,results |-> [id \in {3} |-> TRUE]] IN /\ AbilityTextValid93(a) /\ WholeAbilityRestrictionGate93(a,restrictions) /\ ~WholeAbilityRestrictionGate93(a,[restrictions EXCEPT !.results[3]=FALSE]) /\ ~WholeAbilityRestrictionGate93(a,[restrictions EXCEPT !.results=Empty9]) /\ ~WholeAbilityRestrictionGate93(a,[restrictions EXCEPT !.ability=2]) /\ ~TextUnitsValid93(<>) /\ CardFacts9["Specimen0029"].kind="Objective" /\ CardFacts9["Specimen0151"].kind="Objective" /\ AbilityTextValid93(SyntaxFixture93(5,"Static","SideA","Objective",<>)) FlagChecks93 == LET paid == SyntaxFixture93(2,"Paid","SideB","Technique",BaseUnits93("Paid")) Specimen0115 == [paid EXCEPT !.units= <>] exampleFamily018 == [paid EXCEPT !.units= <>] Specimen0070 == [paid EXCEPT !.cardKind="Support",!.units= <>] facility == SyntaxFixture93(3,"Static","SideA","Barrier",<>) persistent == SyntaxFixture93(4,"Static","SideA","Attachment",<>) itemInspectionCard == CardObject9("Specimen0221","SideAHand",FALSE,"Down") objects == [id \in {2} |-> itemInspectionCard] itemInspection == [OpenItemInspection7(77,2,itemInspectionCard,2,3,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] itemInspectionSite == ItemInspectionPrioritySite9(TurnFixture92("SideB"),itemInspection,objects) w == WindowFixture92(1,"MidItemInspection",itemInspectionSite,Empty9,0,NoTimingRef9) iw == WindowFixture92(2,"Interrupt",TraversalSiteFixture92("ProcedureCodef1914978bb8e"),Empty9,7,NoTimingRef9) relevance == [tag |-> "InterruptRelevance",windowId |-> 2,instruction |-> iw.instruction,ability |-> Specimen0070.id,source |-> Specimen0070.source,relevant |-> TRUE] source == CardObject9("Specimen0088","Play",TRUE,"Up") strength == [exists |-> TRUE,amount |-> 2] barrierStrength == [exists |-> TRUE,amount |-> 0] ability == [isInterface |-> TRUE,presentActive |-> TRUE,restriction |-> [present |-> TRUE,name |-> "Sentry"]] context == [encounterActive |-> TRUE,step |-> "ProcedureCode8b3260c0010f",barrierForm |-> "Card",barrierKind |-> "Barrier",barrierId |-> 2,barrierInstructions |-> {30,31}] targets == {[kind |-> "BarrierInstruction",object |-> 2,barrierInstruction |-> 30]} IN /\ AbilityTextValid93(Specimen0115) /\ AbilityTextValid93(exampleFamily018) /\ AbilityTextValid93(Specimen0070) /\ AbilityTextValid93(facility) /\ AbilityTextValid93(persistent) /\ ~AbilityTextValid93([Specimen0115 EXCEPT !.arrowAfterFlags=FALSE]) /\ ~AbilityTextValid93([exampleFamily018 EXCEPT !.units= <>]) /\ \A flag \in AbilityFlagKinds93 : \A kind \in AbilityKinds9 : \A side \in SetupPlayers : LET units == <> \o BaseUnits93(kind) a == SyntaxFixture93(1,kind,side,IF kind="Play" THEN "Action" ELSE "Technique",units) expected == CASE flag \in {"ItemInspection","Interface"} -> kind="Paid" /\ side="SideB" [] flag="Interrupt" \/ flag="OncePerTurn" -> kind \in {"Paid","Conditional"} [] flag="Persistent" -> side="SideA" [] OTHER -> TRUE IN AbilityTextValid93(a)=expected /\ ItemInspectionFlagTiming93(Specimen0115,w) /\ ~ItemInspectionFlagTiming93(Specimen0115,[w EXCEPT !.kind="Paid"]) /\ ~ItemInspectionFlagTiming93(Specimen0115,[w EXCEPT !.site.step="ProcedureCodefd91bef8bbd3"]) /\ InterruptFlagTiming93(Specimen0070,iw,relevance) /\ ~InterruptFlagTiming93(Specimen0070,iw,[relevance EXCEPT !.relevant=FALSE]) /\ ~InterruptFlagTiming93(Specimen0070,iw,[relevance EXCEPT !.windowId=3]) /\ ~InterruptFlagTiming93(Specimen0070,[iw EXCEPT !.kind="Paid"],relevance) /\ InterfaceFlagTiming93(exampleFamily018,"SideB",source,{"SchemaAtom086","SchemaAtom092"},ability,context,strength,barrierStrength,{"Sentry"},targets) /\ ~InterfaceFlagTiming93(exampleFamily018,"SideB",source,{"SchemaAtom092"},ability,context,strength,barrierStrength,{"Sentry"},targets) /\ ~InterfaceFlagTiming93(exampleFamily018,"SideB",source,{"SchemaAtom086"},ability,context,strength,[barrierStrength EXCEPT !.amount=3],{"Sentry"},targets) /\ ~InterfaceFlagTiming93(exampleFamily018,"SideB",source,{"SchemaAtom086"},ability,[context EXCEPT !.encounterActive=FALSE],strength,barrierStrength,{"Sentry"},targets) /\ ~InterfaceFlagTiming93(exampleFamily018,"SideB",source,{"SchemaAtom086"},ability,context,strength,barrierStrength,{"CodeGate"},targets) /\ \A sideA,sideB \in 0..4 : LET points == [p \in SetupPlayers |-> IF p="SideA" THEN sideA ELSE sideB] IN FlagActivity93(facility,{3},TRUE,{},points)=(sideA>=3 \/ sideB>=3) /\ FlagActivity93(persistent,{4},FALSE,{4},[p \in SetupPlayers |-> 0]) /\ ~FlagActivity93(persistent,{4},FALSE,{5},[p \in SetupPlayers |-> 0]) /\ ~FlagActivity93(persistent,{},FALSE,{4},[p \in SetupPlayers |-> 0]) /\ LET both == [persistent EXCEPT !.units= <>] IN ~FlagActivity93(both,{4},FALSE,{4},[p \in SetupPlayers |-> 2]) /\ ~FlagActivity93(facility,{3},FALSE,{3},[p \in SetupPlayers |-> 4]) /\ CardFacts9["Specimen0115"].kind="Technique" /\ CardFacts9["Specimen0088"].kind="Technique" /\ CardFacts9["Specimen0070"].kind="Support" /\ CardFacts9["Specimen0198"].kind="Attachment" /\ CardFacts9["Specimen0023"].kind="Barrier" /\ CardFacts9["Specimen0204"].kind="Barrier" ExampleFamily078UsageChecks93 == LET exampleFamily078 == SyntaxFixture93(50,"Conditional","SideB","Profile",<>) instance == ConditionalInstance9(500,50,exampleFamily078.source,"SideB",FALSE,1,1,FALSE) used == [tag |-> "AbilityUsed",useId |-> 1,abilityInstance |-> 500,source |-> exampleFamily078.source,player |-> "SideB"] ledger == [id \in {1} |-> [turnId |-> 7,ability |-> 50,source |-> exampleFamily078.source,useId |-> 1]] IN /\ CardFacts9["Specimen0268"].kind="Profile" /\ AbilityTextValid93(exampleFamily078) /\ ~AbilityUseDue9("Conditional",FALSE,FALSE,FALSE,FALSE) /\ ~RecordAbilityUse9(Empty9,[id \in {1} |-> used],1,500,exampleFamily078.source,"SideB",FALSE,{used}) /\ OncePerTurnAllowed93(exampleFamily078,7,Empty9) /\ AbilityUseDue9("Conditional",FALSE,FALSE,TRUE,FALSE) /\ RecordAbilityUse9(Empty9,[id \in {1} |-> used],1,500,exampleFamily078.source,"SideB",TRUE,{used}) /\ RecordTurnAbilityUse93(Empty9,ledger,exampleFamily078,7,instance,used) /\ ~OncePerTurnAllowed93(exampleFamily078,7,ledger) /\ OncePerTurnAllowed93(exampleFamily078,8,ledger) /\ ~RecordTurnAbilityUse93(Empty9,ledger,exampleFamily078,7,[instance EXCEPT !.ability=51],used) /\ ~RecordTurnAbilityUse93(Empty9,ledger,exampleFamily078,7,instance,[used EXCEPT !.abilityInstance=501]) /\ ~RecordTurnAbilityUse93(Empty9,ledger,exampleFamily078,7,instance,[used EXCEPT !.source=ObjectAbilitySource9(2)]) InstructionTargetsFixture93(plan) == [tag |-> "InstructionTargets",instruction |-> plan.id,abilityInstance |-> plan.abilityInstance, source |-> plan.source,sourceZone |-> plan.sourceZone,index |-> plan.index,valid |-> TRUE,targets |-> {2}] InstructionEntryFixture93(plan) == [tag |-> "AbilityInstructionEntry",abilityInstance |-> plan.abilityInstance,instruction |-> plan.id, source |-> plan.source,sourceZone |-> plan.sourceZone,index |-> plan.index, schedulerAllows |-> TRUE,sourceEligible |-> TRUE,checkpointAndAllNewerChainsComplete |-> TRUE] InstructionClearanceFixture93(plan,windowId,openingRevision) == [tag |-> "InstructionInterruptReturn",instruction |-> plan.id,revision |-> plan.revision, origin |-> plan.origin,abilityInstance |-> plan.abilityInstance,index |-> plan.index, source |-> plan.source,sourceZone |-> plan.sourceZone,windowId |-> windowId,openingRevision |-> openingRevision,complete |-> TRUE] InstructionInterpretationChecks93 == LET readyAbility == OpenAbilityResolution9(600,"Conditional",ObjectAbilitySource9(1),"Play",<<700,701>>,"window") ability == [readyAbility EXCEPT !.phase="Imminent",!.firstImminent=TRUE,!.detached=TRUE] instruction == OpenInstruction93(700,"Ability",600,readyAbility.source,"Play",1,"NoValue",<<"SchemaAtom070","SchemaAtom140">>,TRUE) targets == InstructionTargetsFixture93(instruction) announced == [instruction EXCEPT !.targets={2},!.announced=TRUE] imminent == [announced EXCEPT !.phase="Imminent"] entry == InstructionEntryFixture93(announced) modification == [tag |-> "InstructionModification",instruction |-> 700,revision |-> 0,authorized |-> TRUE,steps |-> <<"ReplacedFirst","SchemaAtom140">>] modified == [imminent EXCEPT !.steps=modification.steps,!.revision=1] interruptReturn == InstructionClearanceFixture93(modified,200,0) resolvingAbility == [ability EXCEPT !.phase="Resolving"] resolving == [modified EXCEPT !.phase="Resolving"] firstReturn == [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "ReplacedFirst",complete |-> TRUE] first == [resolving EXCEPT !.completedSteps= <<"ReplacedFirst">>,!.cursor=2] secondReturn == [firstReturn EXCEPT !.index=2,!.step="SchemaAtom140"] complete == [first EXCEPT !.completedSteps= <<"ReplacedFirst","SchemaAtom140">>,!.cursor=3,!.phase="Complete"] betweenAbility == [resolvingAbility EXCEPT !.phase="Between"] nextPlan == OpenInstruction93(701,"Ability",600,readyAbility.source,"Play",2,"NoValue",<<"Next">>,TRUE) nextAnnounced == [nextPlan EXCEPT !.targets={2},!.announced=TRUE] nextImminent == [nextAnnounced EXCEPT !.phase="Imminent"] nextAbility == [betweenAbility EXCEPT !.cursor=2,!.phase="Imminent"] nextEntry == InstructionEntryFixture93(nextAnnounced) rule == OpenInstruction93(702,"Rule",0,RuleAbilitySource9("ProcedureCode59141ee1a13b"),"NoValue",0,"ProcedureCode59141ee1a13b",<<"Draw">>,FALSE) IN /\ AnnounceInstructionTargets93(instruction,announced,targets,readyAbility,"NoValue") /\ ~AnnounceInstructionTargets93(instruction,announced,[targets EXCEPT !.valid=FALSE],readyAbility,"NoValue") /\ ~AnnounceInstructionTargets93(instruction,announced,[targets EXCEPT !.instruction=701],readyAbility,"NoValue") /\ ~AnnounceInstructionTargets93(instruction,announced,[targets EXCEPT !.source=ObjectAbilitySource9(2)],readyAbility,"NoValue") /\ BeginAbilityInstructions9(readyAbility,ability,TRUE,TRUE) /\ ~AnnounceInstructionTargets93(instruction,announced,targets,ability,"NoValue") /\ EnterFirstAbilityInstruction93(readyAbility,ability,announced,imminent,entry) /\ ~EnterFirstAbilityInstruction93(readyAbility,ability,instruction,[instruction EXCEPT !.phase="Imminent"],entry) /\ ~EnterFirstAbilityInstruction93(readyAbility,ability,announced,imminent,[entry EXCEPT !.schedulerAllows=FALSE]) /\ ~EnterFirstAbilityInstruction93(readyAbility,ability,announced,imminent,[entry EXCEPT !.sourceEligible=FALSE]) /\ ~EnterFirstAbilityInstruction93(readyAbility,ability,announced,imminent,[entry EXCEPT !.source=ObjectAbilitySource9(2)]) /\ LET changed == [readyAbility EXCEPT !.source=ObjectAbilitySource9(2)] changedAfter == [ability EXCEPT !.source=ObjectAbilitySource9(2)] IN ~EnterFirstAbilityInstruction93(changed,changedAfter,announced,imminent,entry) /\ LET changed == [readyAbility EXCEPT !.sourceZone="SideBDiscard"] changedAfter == [ability EXCEPT !.sourceZone="SideBDiscard"] IN ~EnterFirstAbilityInstruction93(changed,changedAfter,announced,imminent,entry) /\ LET stale == [announced EXCEPT !.index=2] IN ~EnterFirstAbilityInstruction93(readyAbility,ability,stale,[stale EXCEPT !.phase="Imminent"],InstructionEntryFixture93(stale)) /\ LET stale == [announced EXCEPT !.abilityInstance=601] IN ~EnterFirstAbilityInstruction93(readyAbility,ability,stale,[stale EXCEPT !.phase="Imminent"],InstructionEntryFixture93(stale)) /\ LET stale == [announced EXCEPT !.id=701] IN ~EnterFirstAbilityInstruction93(readyAbility,ability,stale,[stale EXCEPT !.phase="Imminent"],InstructionEntryFixture93(stale)) /\ AlterAbilityInstruction93(ability,imminent,modified,modification) /\ ~AlterAbilityInstruction93(ability,imminent,modified,[modification EXCEPT !.authorized=FALSE]) /\ ~AlterAbilityInstruction93(resolvingAbility,imminent,modified,modification) /\ BeginAbilityInstructionAtomic93(ability,resolvingAbility,modified,resolving,interruptReturn) /\ ~BeginAbilityInstructionAtomic93(ability,resolvingAbility,modified,resolving,[interruptReturn EXCEPT !.complete=FALSE]) /\ ~BeginAbilityInstructionAtomic93(ability,resolvingAbility,modified,resolving,[interruptReturn EXCEPT !.revision=0]) /\ CarryAbilityInstructionStep93(resolvingAbility,resolvingAbility,resolving,first,firstReturn) /\ ~CarryAbilityInstructionStep93(resolvingAbility,resolvingAbility,resolving,first,[firstReturn EXCEPT !.index=2]) /\ ~CarryAbilityInstructionStep93(resolvingAbility,resolvingAbility,resolving,first,[firstReturn EXCEPT !.step="SchemaAtom140"]) /\ ~CarryAbilityInstructionStep93(resolvingAbility,resolvingAbility,resolving,first,[firstReturn EXCEPT !.complete=FALSE]) /\ ~AlterAbilityInstruction93(resolvingAbility,first,[first EXCEPT !.steps=modification.steps,!.revision=2],[modification EXCEPT !.revision=1]) /\ CarryAbilityInstructionStep93(resolvingAbility,betweenAbility,first,complete,secondReturn) /\ complete.targets={2} /\ complete.completedSteps= <<"ReplacedFirst","SchemaAtom140">> /\ AnnounceInstructionTargets93(nextPlan,nextAnnounced,InstructionTargetsFixture93(nextPlan),betweenAbility,"NoValue") /\ EnterNextAbilityInstruction93(betweenAbility,nextAbility,nextAnnounced,nextImminent,nextEntry) /\ ~EnterNextAbilityInstruction93(betweenAbility,nextAbility,nextPlan,[nextPlan EXCEPT !.phase="Imminent"],InstructionEntryFixture93(nextPlan)) /\ ~EnterNextAbilityInstruction93(betweenAbility,nextAbility,nextAnnounced,nextImminent,[nextEntry EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE]) /\ ~AnnounceInstructionTargets93(nextPlan,nextAnnounced,InstructionTargetsFixture93(nextPlan),nextAbility,"NoValue") /\ LET changed == [nextAnnounced EXCEPT !.index=1] IN ~EnterNextAbilityInstruction93(betweenAbility,nextAbility,changed,[changed EXCEPT !.phase="Imminent"],InstructionEntryFixture93(changed)) /\ LET changed == [betweenAbility EXCEPT !.source=ObjectAbilitySource9(2)] changedAfter == [nextAbility EXCEPT !.source=ObjectAbilitySource9(2)] IN ~EnterNextAbilityInstruction93(changed,changedAfter,nextAnnounced,nextImminent,nextEntry) /\ EnterRuleInstruction93(rule,[rule EXCEPT !.phase="Imminent"],"ProcedureCode59141ee1a13b") /\ ~EnterRuleInstruction93(rule,[rule EXCEPT !.phase="Imminent"],"ProcedureCode824821d07be7") /\ ~BeginAtomicInstruction93(complete,[complete EXCEPT !.phase="Resolving"],interruptReturn) /\ LET parentSite == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3) parent == ReadyFixture92(WindowFixture92(160,"NeutralValue00001",parentSite,Empty9,0,NoTimingRef9)) option == SyntheticOption92(40,"NeutralValue00001","SideB") reserved == StartedFixture92(parent,option) childSite == TraversalSiteFixture92("ProcedureCode8b3260c0010f") child == WindowFixture92(161,"Paid",childSite,Empty9,0,NoTimingRef9) IN /\ first.phase="Resolving" /\ OpenPriorityWindow9(<>,<>,161,"Paid",childSite,Empty9, OpeningFixture92(161,"Paid",childSite,Empty9,0,NoTimingRef9),{160}) /\ LET effects == [id \in {1} |-> [creator |-> 1,ability |-> 600,duration |-> "Turn"]] IN complete.phase="Complete" /\ MaintainLingering9(effects,effects,{}) TypedWindowFixture93(id,site,instances,opening) == NewPriorityWindow9(id,"Interrupt",site,instances,opening.group,NoTimingRef9,opening.instruction,opening.effectRevision) TypedInstructionInterruptChecks93 == LET sideATurn == [TurnFixture92("SideA") EXCEPT !.phase="Draw"] site == TurnPrioritySite9(sideATurn,"ProcedureCode59141ee1a13b",10,3,TurnContextFixture92(sideATurn,"ProcedureCode59141ee1a13b")) rule == OpenInstruction93(710,"Rule",0,RuleAbilitySource9("ProcedureCode59141ee1a13b"),"NoValue",0,"ProcedureCode59141ee1a13b",<<[kind |-> "Draw",count |-> 1]>>,FALSE) imminent == [rule EXCEPT !.phase="Imminent"] group == [id \in {9001} |-> ConditionalInstance9(id,111,ObjectAbilitySource9(2),"SideA",TRUE,30,210,TRUE)] opening == [OpeningFixture92(210,"Interrupt",site,group,30,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(imminent)] w == NewPriorityWindow9(210,"Interrupt",site,group,30,NoTimingRef9,opening.instruction,opening.effectRevision) ready == ReadyFixture92(w) dbs == ConditionalOptionFixture92(ready,9001) objects == [id \in {2} |-> [CardObject9("Specimen0066","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] effect == EffectFixture92(w,{9001},{}) start == StartedFixture92(ready,dbs) modification == [tag |-> "InstructionModification",instruction |-> 710,revision |-> 0, authorized |-> TRUE,steps |-> <<[kind |-> "Draw",count |-> 2]>>] modified == [imminent EXCEPT !.steps=modification.steps,!.revision=1] returned == CompletePriorityOptionFrame9(start) sideA == ReadyFixture92(returned) passed == PassPriorityFrame9(sideA) sideB == ReadyFixture92(passed) closed == PassPriorityFrame9(sideB) clearance == InstructionClearanceFixture93(modified,210,0) atomic == [modified EXCEPT !.phase="Resolving"] complete == [atomic EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=modification.steps] step == [tag |-> "InstructionStepReturn",instruction |-> 710,index |-> 1,step |-> modification.steps[1],complete |-> TRUE] emptyRule == [imminent EXCEPT !.id=712] noModifiers == [tag |-> "NoInstructionInterruptModifiers",instruction |-> InstructionWindowRef93(emptyRule), conditionalInstances |-> {},paidInterruptAbilities |-> {}] noWindowReturn == InstructionClearanceFixture93(emptyRule,0,0) IN /\ CardFacts9["Specimen0066"].kind="Facility" /\ CardFacts9["Specimen0066"].side="SideA" /\ EnterRuleInstruction93(rule,imminent,"ProcedureCode59141ee1a13b") /\ InstructionWindowRef93(imminent).origin="Rule" /\ InstructionWindowRef93(imminent).abilityInstance=0 /\ InstructionWindowRef93(imminent).index=0 /\ OpenInstructionInterrupt93(<<>>,<>,210,site,group,opening,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ PriorityStackValid9(<>) /\ ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,opening,{},imminent,Empty9,"ProcedureCode824821d07be7") /\ LET late == [imminent EXCEPT !.phase="Resolving"] IN ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,opening,{},late,Empty9,"ProcedureCode59141ee1a13b") /\ LET bad == [imminent EXCEPT !.origin="Other"] badOpening == [opening EXCEPT !.instruction=InstructionWindowRef93(bad)] badWindow == [w EXCEPT !.instruction=InstructionWindowRef93(bad)] IN ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,badOpening,{},bad,Empty9,"ProcedureCode59141ee1a13b") /\ \A field \in {"abilityInstance","index","sourceZone"} : LET bad == [imminent EXCEPT ![field]=IF field="sourceZone" THEN "Play" ELSE 1] badOpening == [opening EXCEPT !.instruction=InstructionWindowRef93(bad)] badWindow == [w EXCEPT !.instruction=InstructionWindowRef93(bad)] IN ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,badOpening,{},bad,Empty9,"ProcedureCode59141ee1a13b") /\ LET wrongOpening == [opening EXCEPT !.instruction.id=711] wrongWindow == [w EXCEPT !.instruction=wrongOpening.instruction] IN ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,wrongOpening,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ LET wrongSite == TurnPrioritySite9(sideATurn,"ProcedureCode824821d07be7",10,3,TurnContextFixture92(sideATurn,"ProcedureCode824821d07be7")) wrongOpening == [opening EXCEPT !.site=wrongSite] wrongWindow == [w EXCEPT !.site=wrongSite] IN ~OpenInstructionInterrupt93(<<>>,<>,210,wrongSite,group,wrongOpening,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ \A bad \in { [opening EXCEPT !.tag="Other"], [opening EXCEPT !.windowId=211], [opening EXCEPT !.kind="Paid"], [opening EXCEPT !.site=[site EXCEPT !.step="ProcedureCode824821d07be7"]], [opening EXCEPT !.members={}], [opening EXCEPT !.instances[9001].source=ObjectAbilitySource9(3)], [opening EXCEPT !.group=31], [opening EXCEPT !.effectRevision=0], [opening EXCEPT !.preparation= <<"ReplacementEffects","ExpectedEffects","ConditionalPending">>], [opening EXCEPT !.modifiersExist=FALSE], [opening EXCEPT !.beginning=TimingRef9("SchemaAtom138",2)]} : ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,bad,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,opening,{210},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ ~OpenInstructionInterrupt93(<>,<>,210,site,group,opening,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ LET zeroGroup == [group EXCEPT ![9001].windowId=0] zeroOpening == [opening EXCEPT !.windowId=0,!.instances=zeroGroup] IN ~OpenInstructionInterrupt93(<<>>,<>, 0,site,zeroGroup,zeroOpening,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ CheckpointPriority9(<>,<>,CheckpointFixture92(w)) /\ ~PassPriority9(<>,<>,"SideA",effect) /\ BeginPriorityOption9(<>,<>,dbs,objects,LegalityFixture92(ready,dbs),effect) /\ AlterImminentInstruction93(imminent,modified,modification) /\ modified.steps[1].count=2 /\ start.pending={} /\ CompletePriorityOption9(<>,<>,ReturnFixture92(start)) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(returned)) /\ PassPriority9(<>,<>,"SideA",[effect EXCEPT !.revision=2,!.relevantConditional={}]) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(passed)) /\ PassPriority9(<>,<>,"SideB",[effect EXCEPT !.revision=2,!.relevantConditional={}]) /\ ~closed.open /\ closed.pending={} /\ closed.triggered={9001} /\ ReturnInstructionInterrupt93(<>,<<>>,modified,Empty9,"ProcedureCode59141ee1a13b",clearance) /\ ~ReturnInstructionInterrupt93(<>,<<>>,modified,Empty9,"ProcedureCode59141ee1a13b",clearance) /\ ~ReturnInstructionInterrupt93(<>,<<>>,modified,Empty9,"ProcedureCode59141ee1a13b",[clearance EXCEPT !.windowId=211]) /\ ~ReturnInstructionInterrupt93(<>,<<>>,modified,Empty9,"ProcedureCode59141ee1a13b",[clearance EXCEPT !.revision=0]) /\ LET other == [modified EXCEPT !.id=711] IN ~ReturnInstructionInterrupt93(<>,<<>>,other,Empty9,"ProcedureCode59141ee1a13b",InstructionClearanceFixture93(other,210,0)) /\ BeginRuleInstructionAtomic93(modified,atomic,"ProcedureCode59141ee1a13b",clearance) /\ ~BeginRuleInstructionAtomic93(modified,atomic,"ProcedureCode59141ee1a13b",[clearance EXCEPT !.origin="Ability"]) /\ ~BeginRuleInstructionAtomic93(modified,atomic,"ProcedureCode59141ee1a13b",[clearance EXCEPT !.source=RuleAbilitySource9("ProcedureCodefd91bef8bbd3")]) /\ CarryInstructionStep93(atomic,complete,step) /\ ~OpenInstructionInterrupt93(<<>>,<>,210,site,group,opening,{},atomic,Empty9,"ProcedureCode59141ee1a13b") /\ NoInstructionInterrupt93(emptyRule,Empty9,"ProcedureCode59141ee1a13b",noModifiers,noWindowReturn) /\ ~NoInstructionInterrupt93(emptyRule,Empty9,"ProcedureCode59141ee1a13b",[noModifiers EXCEPT !.conditionalInstances={9001}],noWindowReturn) /\ ~NoInstructionInterrupt93(emptyRule,Empty9,"ProcedureCode59141ee1a13b",[noModifiers EXCEPT !.paidInterruptAbilities={111}],noWindowReturn) /\ LET beforeAbility == OpenAbilityResolution9(600,"Conditional",ObjectAbilitySource9(1),"Play",<<700>>,"window") a == [beforeAbility EXCEPT !.phase="Imminent",!.firstImminent=TRUE,!.detached=TRUE] p == [OpenInstruction93(700,"Ability",600,a.source,"Play",1,"NoValue",<<"Effect">>,FALSE) EXCEPT !.phase="Imminent"] o == [OpeningFixture92(211,"Interrupt",site,Empty9,31,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(p)] aw == NewPriorityWindow9(211,"Interrupt",site,Empty9,31,NoTimingRef9,o.instruction,o.effectRevision) IN /\ OpenInstructionInterrupt93(<<>>,<>,211,site,Empty9,o,{},p,a,"NoValue") /\ OpenPriorityWindow9(<<>>,<>,211,"Interrupt",site,Empty9,o,{}) /\ ~OpenInstructionInterrupt93(<<>>,<>,211,site,Empty9,[o EXCEPT !.modifiersExist=FALSE],{},p,a,"NoValue") /\ ~OpenInstructionInterrupt93(<<>>,<>,211,site,Empty9,o,{},p,[a EXCEPT !.source=ObjectAbilitySource9(2)],"NoValue") TextInterpretationChecks9 == /\ TextInterpretationChecks93 /\ FlagChecks93 /\ ExampleFamily078UsageChecks93 /\ InstructionInterpretationChecks93 /\ TypedInstructionInterruptChecks93 StaticPartFixture94(id,ability,target,property,conditions) == [id |-> id,ability |-> ability,target |-> [kind |-> "Object",id |-> target],property |-> property,conditions |-> conditions] StaticSnapshotFixture94(a,receipts) == [tag |-> "StaticConditionSnapshot",ability |-> a.id,source |-> a.source,receipts |-> receipts] StaticGeneralChecks94 == LET a == SyntaxFixture93(510,"Static","SideB","Technique",<>) parts == [id \in {10,11} |-> StaticPartFixture94(id,510,1,IF id=10 THEN "Strength" ELSE "Capacity",IF id=10 THEN {1} ELSE {})] receipt == [tag |-> "ConditionEvaluation",ability |-> 510,unit |-> 1,kind |-> "Static",paid |-> FALSE,eventOccurred |-> FALSE,propertyHolds |-> FALSE] conditions == StaticSnapshotFixture94(a,[id \in {1} |-> receipt]) values == [id \in {10,11} |-> id] unconditional == [id \in {11} |-> StaticProjection94(a,parts[id],values[id])] both == [id \in {10,11} |-> StaticProjection94(a,parts[id],values[id])] enabled == [conditions EXCEPT !.receipts[1].propertyHolds=TRUE] IN /\ AbilityTextValid93(a) /\ ObserveStaticDeclarations94(a,parts,TRUE,conditions,values,unconditional) /\ ~ObserveStaticDeclarations94(a,[id \in {10} |-> parts[id]],TRUE,conditions,[id \in {10} |-> values[id]],Empty9) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,conditions,values,both) /\ ObserveStaticDeclarations94(a,parts,TRUE,enabled,values,both) /\ ObserveStaticDeclarations94(a,parts,FALSE,enabled,values,Empty9) /\ ~ObserveStaticDeclarations94(a,parts,FALSE,enabled,values,both) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,[enabled EXCEPT !.source=ObjectAbilitySource9(2)],values,both) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,[enabled EXCEPT !.ability=511],values,both) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,enabled,values,[both EXCEPT ![10].duration=TimingRef9("Turn",1)]) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,enabled,values,[both EXCEPT ![10].lingering=TRUE]) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,enabled,values,[both EXCEPT ![10].resolving=TRUE]) /\ ~ObserveStaticDeclarations94(a,parts,TRUE,enabled,values,[both EXCEPT ![10].window=[kind |-> "Reaction",id |-> 1]]) /\ \A id \in DOMAIN both : /\ both[id].mode="Continuous" /\ both[id].duration=NoTimingRef9 /\ ~both[id].lingering /\ ~both[id].resolving /\ both[id].window=NoTimingRef9 /\ Specimen0100PaidStrengthDuration94(both[id],1,1,TRUE)=both[id] /\ LET site == TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",2) group == [id \in {810} |-> ConditionalInstance9(id,900,ObjectAbilitySource9(2),"SideB",FALSE,40,220,FALSE)] w == WindowFixture92(220,"Reaction",site,group,40,NoTimingRef9) IN OpenPriorityWindow9(<<>>,<>,220,"Reaction",site,group,OpeningFixture92(220,"Reaction",site,group,40,NoTimingRef9),{}) StaticSourceRestrictionChecks94 == LET syntax == SyntaxFixture93(520,"Static","SideA","Objective",<>) def == [AbilityDefinition9(520,"Static",syntax.source,"Printed") EXCEPT !.ownClaimObjectiveAdditionalCost=TRUE] objects == [id \in {1} |-> CardObject9("Specimen0029","SideAHand",FALSE,"Down")] points == [p \in SetupPlayers |-> 0] parts == [id \in {3} |-> StaticPartFixture94(id,520,1,"OwnCost",{})] conditions == StaticSnapshotFixture94(syntax,Empty9) IN /\ CardFacts9["Specimen0029"].kind="Objective" /\ StaticAbilityActive94(def,syntax,objects,{520},FALSE,ActivityContext9,points) /\ ObserveCurrentStaticRestrictions94(def,syntax,objects,{520},FALSE,ActivityContext9,points,parts,conditions,{3}) /\ ObserveStaticRestrictions94(syntax,parts,FALSE,conditions,{}) /\ ~StaticAbilityActive94([def EXCEPT !.ownClaimObjectiveAdditionalCost=FALSE],syntax,objects,{520},FALSE,ActivityContext9,points) /\ ~StaticAbilityActive94(def,syntax,objects,{},FALSE,ActivityContext9,points) /\ ~StaticAbilityActive94(def,[syntax EXCEPT !.source=ObjectAbilitySource9(2)],objects,{520},FALSE,ActivityContext9,points) Specimen0189Specimen0100Checks94 == LET syntax == SyntaxFixture93(530,"Static","SideB","Technique",<>) definition == AbilityDefinition9(530,"Static",syntax.source,"Printed") gebrSyntax == [SyntaxFixture93(531,"Static","SideB","Equipment",<>) EXCEPT !.source=ObjectAbilitySource9(3)] gebrDefinition == AbilityDefinition9(531,"Static",gebrSyntax.source,"Printed") card == CardObject9("Specimen0189","Play",TRUE,"Up") objects == [id \in {1,2,3} |-> CASE id=1 -> card [] id=2 -> [form |-> "Counter",kind |-> "Power",host |-> 1] [] OTHER -> [CardObject9("Specimen0100","Play",TRUE,"Up") EXCEPT !.host=1]] removed == [id \in {1,3} |-> objects[id]] renewed == [id \in {4} |-> card] parts == [id \in {10,11} |-> StaticPartFixture94(id,530,1,IF id=10 THEN "Strength" ELSE "Capacity",{})] conditions == StaticSnapshotFixture94(syntax,Empty9) initial == [id \in {10,11} |-> StaticProjection94(syntax,parts[id],Specimen0189Values94(objects,1)[id])] now == [id \in {10,11} |-> StaticProjection94(syntax,parts[id],Specimen0189Values94(removed,1)[id])] boost == [mode |-> "Timed",originKind |-> "Paid",property |-> "Strength",boost |-> BarrierResponseCardBoost(1,1,20,FALSE,NoTimingRef9)] turnBoost == [boost EXCEPT !.boost.hasExplicit=TRUE,!.boost.explicit=TimingRef9("Turn",1)] gameBoost == [boost EXCEPT !.boost.hasExplicit=TRUE,!.boost.explicit=[kind |-> "Game",id |-> 1]] points == [p \in SetupPlayers |-> 0] currentActive == StaticAbilityActive94(definition,syntax,objects,{530},TRUE,ActivityContext9,points) IN /\ CardFacts9["Specimen0189"].kind="Technique" /\ CardFacts9["Specimen0100"].kind="Equipment" /\ HostedPowerCount94(objects,1)=1 /\ HostedPowerCount94(removed,1)=0 /\ \A kind \in {"Power","ResourceUnit"} : \A host \in {1,3} : HostedPowerCount94([objects EXCEPT ![2].kind=kind,![2].host=host],1)=(IF kind="Power" /\ host=1 THEN 1 ELSE 0) /\ ObserveStaticDeclarations94(syntax,parts,currentActive,conditions,Specimen0189Values94(objects,1),initial) /\ ObserveCurrentStaticDeclarations94(definition,syntax,removed,{530,531},TRUE,ActivityContext9,points,parts,conditions,Specimen0189Values94(removed,1),now) /\ initial[10].value=3 /\ now[10].value=2 /\ initial[11].value=2 /\ now[11].value=1 /\ ~ObserveStaticDeclarations94(syntax,parts,TRUE,conditions,Specimen0189Values94(removed,1),initial) /\ Specimen0100PaidStrengthDuration94(boost,1,1,TRUE)=turnBoost /\ Specimen0100CurrentPaidDuration94(gebrDefinition,gebrSyntax,objects,{530,531},TRUE,ActivityContext9,points,boost,1,TRUE)=turnBoost /\ Specimen0100CurrentPaidDuration94(gebrDefinition,gebrSyntax,[id \in {1,2} |-> objects[id]],{530,531},TRUE,ActivityContext9,points,boost,1,TRUE)=boost /\ Specimen0100CurrentPaidDuration94(gebrDefinition,gebrSyntax,[objects EXCEPT ![3].face="Down"],{530,531},TRUE,ActivityContext9,points,boost,1,TRUE)=boost /\ Specimen0100PaidStrengthDuration94(initial[10],1,1,TRUE)=initial[10] /\ Specimen0100PaidStrengthDuration94(boost,2,1,TRUE)=boost /\ Specimen0100PaidStrengthDuration94(boost,1,0,TRUE)=boost /\ Specimen0100PaidStrengthDuration94(gameBoost,1,1,FALSE)=gameBoost /\ BarrierResponseCardBoostUnexpired(turnBoost.boost,{},LAMBDA duration : duration=TimingRef9("Turn",1)) /\ ~BarrierResponseCardBoostUnexpired(turnBoost.boost,{},LAMBDA duration : FALSE) /\ now[10].value+turnBoost.boost.amount=3 /\ ~StaticAbilityActive94(definition,syntax,renewed,{530},TRUE,ActivityContext9,points) /\ ObserveCurrentStaticDeclarations94(definition,syntax,renewed,{530},TRUE,ActivityContext9,points,parts,conditions,Specimen0189Values94(renewed,1),Empty9) ValueSpecificationChecks94 == LET damage == [amount |-> 2,type |-> "HarmClassB",actor |-> "SideA",preventable |-> FALSE, specifications |-> {"EscalatingResourceContestSuccessful","Specimen0091"},targets |-> {"SideB"}] increased == [damage EXCEPT !.amount=3] exampleFamily010 == SyntaxFixture93(540,"Conditional","SideA","Objective",<>) crExample == [origin |-> "CRExample",rule |-> "ProcedureCodee75462e2fc51",page |-> 69,describedKind |-> "Static",increment |-> 1, pdfSHA |-> "0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e"] IN /\ CardFacts9["Specimen0238"].kind="Objective" /\ CardFacts9["NeutralValue00008"].kind="Barrier" /\ AbilityTextValid93(exampleFamily010) /\ FlagPresent93(exampleFamily010.units,"Interrupt") /\ InferredAbilityKind93(exampleFamily010)="Conditional" /\ InferredAbilityKind93(exampleFamily010) # "Static" /\ crExample.origin="CRExample" /\ crExample.describedKind="Static" /\ ModifyValuePreservingSpecifications94(damage,increased,damage.amount+crExample.increment) /\ increased.amount=3 /\ ~increased.preventable /\ increased.type="HarmClassB" /\ ~ModifyValuePreservingSpecifications94(damage,[increased EXCEPT !.preventable=TRUE],3) /\ ~ModifyValuePreservingSpecifications94(damage,[increased EXCEPT !.type="HarmClassA"],3) /\ ~ModifyValuePreservingSpecifications94(damage,[increased EXCEPT !.specifications={}],3) /\ ~ModifyValuePreservingSpecifications94(damage,[increased EXCEPT !.actor="SideB"],3) /\ \A amount \in 0..4 : \A preventable \in BOOLEAN : LET original == [damage EXCEPT !.amount=amount,!.preventable=preventable] after == [original EXCEPT !.amount=amount+1] IN ModifyValuePreservingSpecifications94(original,after,amount+1) /\ after.preventable=preventable ConditionalStaticRestrictionChecks94 == LET syntax == SyntaxFixture93(550,"Static","SideB","Technique",<>) definition == AbilityDefinition9(550,"Static",syntax.source,"Printed") unhosted == [id \in 1..5 |-> IF id=1 THEN CardObject9("Specimen0203","Play",TRUE,"Up") ELSE CardObject9(CASE id=2 -> "Specimen0204" [] id=3 -> "NeutralValue00016" [] id=4 -> "Specimen0013" [] OTHER -> "Specimen0023","Play",TRUE,"Down")] hosted == [unhosted EXCEPT ![1].host=2] positions == [id \in 2..5 |-> [targetSite |-> IF id \in {2,4} THEN "SchemaAtom082" ELSE "SchemaAtom129",position |-> IF id \in {2,5} THEN 1 ELSE 2]] parts == [id \in {3} |-> [StaticPartFixture94(id,550,551,"OwnActionPointHosting",{1}) EXCEPT !.target=[kind |-> "Ability",id |-> 551]]] base == [tag |-> "ConditionEvaluation",ability |-> 550,unit |-> 1,kind |-> "Static",paid |-> FALSE,eventOccurred |-> FALSE, propertyHolds |-> Specimen0203HostedOnBarrier94(unhosted,1)] beforeConditions == StaticSnapshotFixture94(syntax,[id \in {1} |-> base]) afterConditions == [beforeConditions EXCEPT !.receipts[1].propertyHolds=Specimen0203HostedOnBarrier94(hosted,1)] points == [p \in SetupPlayers |-> 0] IN /\ CardFacts9["Specimen0203"].kind="Technique" /\ AbilityTextValid93(syntax) /\ StaticAbilityActive94(definition,syntax,unhosted,{550},TRUE,ActivityContext9,points) /\ StaticAbilityActive94(definition,syntax,hosted,{550},TRUE,ActivityContext9,points) /\ ~Specimen0203HostedOnBarrier94(unhosted,1) /\ Specimen0203HostedOnBarrier94(hosted,1) /\ ObserveCurrentStaticRestrictions94(definition,syntax,unhosted,{550},TRUE,ActivityContext9,points,parts,beforeConditions,{}) /\ ~ObserveCurrentStaticRestrictions94(definition,syntax,unhosted,{550},TRUE,ActivityContext9,points,parts,beforeConditions,{3}) /\ Specimen0203AdditionalMoveConstraint94(unhosted,1,2,positions) /\ Specimen0203AdditionalMoveConstraint94(unhosted,1,3,positions) /\ ObserveCurrentStaticRestrictions94(definition,syntax,hosted,{550},TRUE,ActivityContext9,points,parts,afterConditions,{3}) /\ ~ObserveCurrentStaticRestrictions94(definition,syntax,hosted,{550},TRUE,ActivityContext9,points,parts,afterConditions,{}) /\ ~ObserveCurrentStaticRestrictions94(definition,syntax,hosted,{550},TRUE,ActivityContext9,points,Empty9,afterConditions,{}) /\ ~Specimen0203AdditionalMoveConstraint94(hosted,1,3,positions) /\ Specimen0203AdditionalMoveConstraint94(hosted,1,4,positions) /\ Specimen0203AdditionalMoveConstraint94(hosted,1,5,positions) /\ ObserveStaticRestrictions94(syntax,parts,FALSE,afterConditions,{}) StaticAbilityChecks9 == /\ StaticGeneralChecks94 /\ StaticSourceRestrictionChecks94 /\ Specimen0189Specimen0100Checks94 /\ ValueSpecificationChecks94 /\ ConditionalStaticRestrictionChecks94 PaidDefinitionFixture95(id,card,flags,cost) == LET units == [i \in 1..Len(flags) |-> TextUnit93(20+i,"AbilityFlag",flags[i],FALSE,0)] \o BaseUnits93("Paid") syntax == SyntaxFixture93(id,"Paid",CardFacts9[card].side,CardFacts9[card].kind,units) IN [syntax |-> syntax,activity |-> AbilityDefinition9(id,"Paid",syntax.source,"Printed"), triggerCost |-> cost,instructions |-> <<700>>,instructionHasWould |-> FALSE,ruleTiming |-> "NoValue", canSuppressBarrierInstructions |-> FALSE,refersApproachedBarrier |-> FALSE,refersEncounteredBarrier |-> FALSE, approachRequirements |-> [subtypes |-> {},activated |-> FALSE,otherIds |-> {}], encounterRequirements |-> [subtypes |-> {},activated |-> FALSE,otherIds |-> {}], interfaceSubtype |-> [present |-> FALSE,name |-> "NoValue"],otherRestrictionIds |-> {},refersHosted |-> FALSE] PaidWindowFixture95(id,kind,player) == ReadyFixture92(WindowFixture92(id,kind,TurnSiteFixture92(player,IF player="SideB" THEN IF kind="NeutralValue00001" THEN "ProcedureCode989abc27e0c6" ELSE "ProcedureCode484be3e50aa9" ELSE IF kind="NeutralValue00001" THEN "ProcedureCode0e20572a4bab" ELSE "ProcedureCoded6fbcb09dd4f",3),Empty9,0,NoTimingRef9)) PaidTraversalControlFixture95(traversal) == [traversal |-> traversal,redirect |-> NoTraversalRedirect6,phaseStepsSkipped |-> FALSE,redirectCheckpointDue |-> FALSE,phaseEndedIds |-> {}] PaidContextFixture95(d,objects,turn) == [objects |-> objects,turn |-> turn,traversal |-> NoTraversal6,traversalControl |-> PaidTraversalControlFixture95(NoTraversal6),approach |-> ApproachFixture92,layout |-> LayoutFixture92, encounter |-> [OpenEncounter6(20,2,0,TRUE,"forced",<<301>>) EXCEPT !.stage="Paid"], subtypes |-> [id \in DOMAIN objects |-> {}],strengths |-> [id \in DOMAIN objects |-> [exists |-> TRUE,amount |-> 1]], present |-> {d.syntax.id},defaultActive |-> TRUE,activity |-> ActivityContext9,points |-> [p \in SetupPlayers |-> 0], uses |-> Empty9,useProhibitions |-> {}, ownRestrictions |-> [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9], otherRestrictions |-> [tag |-> "OtherPaidRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9], references |-> [ref \in {"Approach","Encounter"} |-> [tag |-> "PaidBarrierReference",ability |-> d.syntax.id,source |-> d.syntax.source, reference |-> ref,barrierCard |-> 2,structure |-> TimingRef9("TraversalPhase",20),traversalId |-> IF ref="Approach" THEN 2 ELSE 0,results |-> Empty9]],currentEffect |-> Empty9, paidRelevance |-> [tag |-> "PaidInterruptRelevance",windowId |-> 0,instruction |-> NoInstruction92,revision |-> 0,eligible |-> {}]] PaidOptionFixture95(d,w) == PriorityOption9(60,PaidOptionKind95(w.kind),d.syntax.controller,d.syntax.id,0,d.syntax.source,0,{}) PaidSourceFixture95(card) == [id \in {1} |-> CardObject9(card,"Play",TRUE,"Up")] PaidPaymentFixture95(p,beforeObjects,afterObjects,newSource,uninstalled,forfeited) == [tag |-> "PaidTriggerPayment",abilityInstance |-> p.id,transactionId |-> p.transaction, ability |-> p.definition.syntax.id,source |-> p.ability.source,triggerCost |-> p.definition.triggerCost, beforeObjects |-> beforeObjects,afterObjects |-> afterObjects,announced |-> TRUE,allPaid |-> TRUE, additionalCostsPaid |-> TRUE,restrictionsBefore |-> TRUE,restrictionsAfter |-> TRUE,simultaneousProcedureComplete |-> TRUE, sourceAfter |-> newSource,sourceUninstalled |-> uninstalled,sourceForfeited |-> forfeited, paidOperations |-> IF forfeited THEN {[kind |-> "Forfeit",object |-> 1]} ELSE {},publicEvents |-> {}] PaidCommittedFixture95(p,successors,forfeited) == [p EXCEPT !.ability.detached=TRUE,!.phase="CostCheckpoint",!.costPaid=TRUE, !.heldSourceIds=DOMAIN successors,!.heldIds={successors[id] : id \in DOMAIN successors},!.sourceForfeited=forfeited] PaidUseFixture95(p) == [tag |-> "AbilityUsed",useId |-> 1,abilityInstance |-> p.id,source |-> p.ability.source,player |-> p.definition.syntax.controller] PaidUsesFixture95(p) == [id \in {1} |-> PaidUseFixture95(p)] PaidTurnUsesFixture95(p) == [id \in {1} |-> [turnId |-> p.turnId,ability |-> p.definition.syntax.id,source |-> p.ability.source,useId |-> 1]] PaidCheckpointFixture95(p,id) == [tag |-> "PaidCheckpoint",id |-> id,abilityInstance |-> p.id,transactionId |-> p.transaction, source |-> p.ability.source,phase |-> p.phase,complete |-> TRUE,allNewerChainsComplete |-> TRUE] PaidTargetsFrame95(p,checkpoint) == [p EXCEPT !.phase="Targets",!.checkpoint=checkpoint] PaidEntryFixture95(plan,checkpoint) == [tag |-> "AbilityInstructionEntry",abilityInstance |-> plan.abilityInstance,instruction |-> plan.id, source |-> plan.source,sourceZone |-> plan.sourceZone,index |-> plan.index,schedulerAllows |-> TRUE,sourceEligible |-> FALSE, checkpointAndAllNewerChainsComplete |-> TRUE,checkpointId |-> checkpoint] PaidImminentFrame95(p) == [p EXCEPT !.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.phase="Imminent",!.checkpoint=0] PaidResolvingFrame95(p) == [p EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] PaidFinishedFrame95(p) == [p EXCEPT !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE,!.phase="InstructionCheckpoint",!.checkpoint=0] PaidReturnFixture95(w,checkpoint) == [tag |-> "PriorityOptionReturn",windowId |-> w.id,option |-> w.busy,transactionId |-> w.busyTransaction, triggerPayment |-> PaymentFixture92(w),allCostsPaid |-> TRUE,optionComplete |-> TRUE,childrenReturned |-> TRUE,reactionsDrained |-> TRUE, finalCheckpointId |-> checkpoint] NoModifiersFixture95(plan) == [tag |-> "NoInstructionInterruptModifiers",instruction |-> InstructionWindowRef93(plan),conditionalInstances |-> {},paidInterruptAbilities |-> {}] PaidCounterFixture95(kind,host) == [card |-> "none",form |-> "Counter",kind |-> kind,side |-> "NoValue",zone |-> "Play",loc |-> "Hosted",host |-> host, deployed |-> FALSE,face |-> "NA",activated |-> FALSE,virtual |-> FALSE] PaidCleanupFixture95(p,beforeObjects,afterObjects,stage,ids) == [tag |-> "PaidHostedCleanup",abilityInstance |-> p.id,transactionId |-> p.transaction,stage |-> stage,sources |-> ids, beforeObjects |-> beforeObjects,afterObjects |-> afterObjects,complete |-> TRUE,normalRetireAndCounterRules |-> TRUE, ownerDiscard |-> [id \in ids |-> "SideBDiscard"]] PaidClassificationChecks95 == LET resourceUnit == <<[kind |-> "ResourceUnits",amount |-> 1]>> spendActionPoint == <<[kind |-> "SpendActionPoints",amount |-> 1],[kind |-> "RetireSource",amount |-> 1]>> regular == PaidDefinitionFixture95(600,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) action == PaidDefinitionFixture95(601,"Specimen0090",<<>>,spendActionPoint) Specimen0115 == PaidDefinitionFixture95(602,"Specimen0115",<<"ItemInspection","OncePerTurn">>,<<[kind |-> "HostedCluster",amount |-> 1]>>) interface == [PaidDefinitionFixture95(603,"Specimen0002",<<"Interface">>,resourceUnit) EXCEPT !.canSuppressBarrierInstructions=TRUE, !.refersEncounteredBarrier=TRUE,!.encounterRequirements.subtypes={"SchemaAtom040"},!.interfaceSubtype=[present |-> TRUE,name |-> "SchemaAtom040"]] granted == [PaidDefinitionFixture95(604,"Specimen0002",<<"Interface">>,<<[kind |-> "LoseActionPoints",amount |-> 1]>>) EXCEPT !.activity.provider="Granted",!.canSuppressBarrierInstructions=TRUE] explicit == PaidDefinitionFixture95(605,"Specimen0002",<<"Interrupt">>,resourceUnit) implicit == [regular EXCEPT !.instructionHasWould=TRUE] IN /\ CardFacts9["Specimen0090"].kind="Technique" /\ CardFacts9["Specimen0005"].kind="Equipment" /\ PaidWindowKinds95(regular)={"Paid"} /\ PaidWindowKinds95(action)={"NeutralValue00001"} /\ PaidWindowKinds95(Specimen0115)={"MidItemInspection"} /\ PaidWindowKinds95(interface)={"Paid"} /\ PaidWindowKinds95(granted)={"Paid"} /\ ~IsAction5(TRUE,granted.triggerCost) /\ PaidWindowKinds95(explicit)={"Interrupt"} /\ PaidWindowKinds95(implicit)={"Interrupt"} /\ \A d \in {regular,action,Specimen0115,interface,explicit,implicit,granted} : PaidAlwaysOptional95(d) /\ AbilityTextValid93(d.syntax) /\ PaidWindowKinds95([action EXCEPT !.instructionHasWould=TRUE])={} /\ PaidWindowKinds95([Specimen0115 EXCEPT !.instructionHasWould=TRUE])={} /\ \A actionCost \in BOOLEAN : \A itemInspection \in BOOLEAN : \A interrupt \in BOOLEAN : LET d == [regular EXCEPT !.triggerCost=IF actionCost THEN spendActionPoint ELSE resourceUnit, !.syntax.units=IF itemInspection THEN <> \o BaseUnits93("Paid") ELSE BaseUnits93("Paid"), !.instructionHasWould=interrupt] required == (IF actionCost THEN {"NeutralValue00001"} ELSE {}) \cup (IF itemInspection THEN {"MidItemInspection"} ELSE {}) \cup (IF interrupt THEN {"Interrupt"} ELSE {}) IN PaidWindowKinds95(d)=(IF required={} THEN {"Paid"} ELSE IF Cardinality(required)=1 THEN required ELSE {}) PaidTimingChecks95 == LET cost == <<[kind |-> "ResourceUnits",amount |-> 1]>> objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0002","Play",TRUE,"Up") ELSE [CardObject9("Specimen0107","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] w == PaidWindowFixture95(150,"Paid","SideB") base == PaidDefinitionFixture95(600,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) c == PaidContextFixture95(base,objects,TurnFixture92("SideB")) bypass == [base EXCEPT !.triggerCost= <<[kind |-> "RetireSource",amount |-> 1]>>,!.refersEncounteredBarrier=TRUE,!.encounterRequirements.subtypes={"SchemaAtom040"}] ew == [w EXCEPT !.site=EncounterPaidSite95(c.turn,c.encounter,c.traversalControl)] cg == [c EXCEPT !.objects[2]=CardObject9("NeutralValue00016","Play",TRUE,"Up"),!.subtypes[2]={"SchemaAtom040"}] suppressInstruction == [bypass EXCEPT !.triggerCost=cost,!.canSuppressBarrierInstructions=TRUE,!.syntax.units= <> \o BaseUnits93("Paid"),!.interfaceSubtype=[present |-> TRUE,name |-> "SchemaAtom040"]] strong == [cg EXCEPT !.subtypes[1]={"SchemaAtom086","SchemaAtom054"},!.strengths[1].amount=3,!.strengths[2].amount=2] exampleFamily077 == [PaidDefinitionFixture95(610,"Specimen0188",<<>>,<<[kind |-> "HostedObjective",amount |-> 1]>>) EXCEPT !.refersApproachedBarrier=TRUE,!.approachRequirements.subtypes={"SchemaAtom024"},!.approachRequirements.activated=TRUE] wc == [PaidContextFixture95(exampleFamily077,[objects EXCEPT ![1]=CardObject9("Specimen0188","SideAObjectiveCompletion",FALSE,"Up")],TurnFixture92("SideB")) EXCEPT !.traversal=TraversalFixture92("ProcedureCode3a6daf593ad4"),!.traversalControl=PaidTraversalControlFixture95(TraversalFixture92("ProcedureCode3a6daf593ad4")),!.subtypes[2]={"SchemaAtom024","SchemaSymbol001"}] sideAPriority == [w EXCEPT !.priority="SideA",!.site=TraversalSiteFixture92("ProcedureCode3a6daf593ad4")] arru == [PaidDefinitionFixture95(620,"Specimen0019",<<"OncePerTurn">>,<<[kind |-> "TakeExposureMarkers",amount |-> 1]>>) EXCEPT !.refersEncounteredBarrier=TRUE] ac == PaidContextFixture95(arru,[objects EXCEPT ![1]=CardObject9("Specimen0019","Play",TRUE,"Up")],TurnFixture92("SideA")) forcedSite == EncounterPaidSite95(ac.turn,ac.encounter,ac.traversalControl) forced == [ReadyFixture92(WindowFixture92(151,"Paid",forcedSite,Empty9,0,NoTimingRef9)) EXCEPT !.priority="SideB"] IN /\ PaidEligibility95(base,c,w) /\ ~PaidEligibility95(base,[c EXCEPT !.present={}],w) /\ ~PaidEligibility95(base,[c EXCEPT !.defaultActive=FALSE],w) /\ ~PaidEligibility95(base,c,[w EXCEPT !.priority="SideA"]) /\ ~PaidEligibility95(base,c,PaidWindowFixture95(150,"NeutralValue00001","SideB")) /\ PaidEligibility95(bypass,cg,ew) /\ ~PaidEligibility95(bypass,[cg EXCEPT !.references["Encounter"].structure=TimingRef9("TraversalPhase",21)],ew) /\ ~PaidEligibility95(bypass,[cg EXCEPT !.references["Encounter"].traversalId=2],ew) /\ PaidEligibility95(bypass,[cg EXCEPT !.strengths[1].amount=0,!.strengths[2].amount=9],ew) /\ ~PaidEligibility95(bypass,[cg EXCEPT !.encounter.stage="Complete"],w) /\ ~PaidEligibility95(bypass,c,ew) /\ PaidEligibility95(suppressInstruction,strong,ew) /\ ~PaidEligibility95(suppressInstruction,[strong EXCEPT !.strengths[1].amount=1],ew) /\ ~PaidEligibility95(suppressInstruction,[strong EXCEPT !.subtypes[1]={}],ew) /\ ~PaidEligibility95([base EXCEPT !.canSuppressBarrierInstructions=TRUE],[c EXCEPT !.encounter.stage="Complete"],w) /\ PaidEligibility95(exampleFamily077,wc,sideAPriority) /\ ~PaidEligibility95(exampleFamily077,[wc EXCEPT !.objects[2].activated=FALSE,!.objects[2].face="Down"],sideAPriority) /\ ~PaidEligibility95(exampleFamily077,[wc EXCEPT !.subtypes[2]={"SchemaSymbol001"}],sideAPriority) /\ ~PaidEligibility95(exampleFamily077,[wc EXCEPT !.traversal=TraversalFixture92("ProcedureCode8b3260c0010f"),!.traversalControl=PaidTraversalControlFixture95(TraversalFixture92("ProcedureCode8b3260c0010f"))],[sideAPriority EXCEPT !.site=TraversalSiteFixture92("ProcedureCode8b3260c0010f")]) /\ ~PaidEligibility95(exampleFamily077,[wc EXCEPT !.references["Approach"].barrierCard=3],sideAPriority) /\ forcedSite.traversalId=0 /\ forcedSite.active="SideA" /\ PaidWindowOptions9(forcedSite)=[paid |-> TRUE,nonBarrierActivation |-> FALSE,approachedBarrierActivation |-> FALSE,score |-> FALSE] /\ WindowSiteAllowed9("Paid",forcedSite) /\ ~PriorityOptionAllowed9(forced,PriorityOption9(9,"Activation","SideA",0,0,ObjectAbilitySource9(2),2,{}),ac.objects,Empty9) /\ PaidEligibility95(arru,ac,forced) /\ ~PaidEligibility95(arru,[ac EXCEPT !.references["Encounter"].structure=TimingRef9("ItemInspection",ac.encounter.id)],forced) /\ ~PaidEligibility95(arru,[ac EXCEPT !.encounter.aborted=TRUE],forced) PaidInterruptTimingChecks95 == LET d == PaidDefinitionFixture95(600,"Specimen0002",<<"Interrupt">>,<<[kind |-> "ResourceUnits",amount |-> 1]>>) w == PaidWindowFixture95(152,"Interrupt","SideB") objects == PaidSourceFixture95("Specimen0002") c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.currentEffect=EffectFixture92(w,{}, {600}), !.paidRelevance=[tag |-> "PaidInterruptRelevance",windowId |-> w.id,instruction |-> w.instruction,revision |-> 1,eligible |-> {[ability |-> 600,source |-> d.syntax.source]}]] IN /\ PaidEligibility95(d,c,w) /\ ~PaidEligibility95(d,[c EXCEPT !.paidRelevance.eligible={}],w) /\ ~PaidEligibility95(d,[c EXCEPT !.paidRelevance.eligible={[ability |-> 600,source |-> ObjectAbilitySource9(2)]}],w) /\ ~PaidEligibility95(d,[c EXCEPT !.paidRelevance.revision=0],w) /\ ~PaidEligibility95(d,[c EXCEPT !.currentEffect.paidInterruptAbilities={}],w) /\ PaidEligibility95([d EXCEPT !.syntax.units=BaseUnits93("Paid"),!.instructionHasWould=TRUE],c,w) PaidLifecycleChecks95 == LET d == [PaidDefinitionFixture95(620,"Specimen0019",<<"OncePerTurn">>,<<[kind |-> "TakeExposureMarkers",amount |-> 1]>>) EXCEPT !.refersEncounteredBarrier=TRUE] objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0019","Play",TRUE,"Up") ELSE CardObject9("NeutralValue00016","Play",TRUE,"Down")] c == PaidContextFixture95(d,objects,TurnFixture92("SideB")) site == EncounterPaidSite95(c.turn,c.encounter,c.traversalControl) w == ReadyFixture92(WindowFixture92(160,"Paid",site,Empty9,0,NoTimingRef9)) option == PaidOptionFixture95(d,w) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(100,d,option,w,960,"Play") paid == PaidCommittedFixture95(p,Empty9,FALSE) payment == PaidPaymentFixture95(p,objects,objects,1,FALSE,FALSE) used == PaidUseFixture95(p) uses == PaidUsesFixture95(p) turnUses == PaidTurnUsesFixture95(p) planning == PaidTargetsFrame95(paid,1000) plan == OpenInstruction93(700,"Ability",100,d.syntax.source,"Play",1,"NoValue",<<"ReduceEncounteredBarrier">>,TRUE) imminent == PaidImminentFrame95(planning) imminentPlan == [plan EXCEPT !.targets={2},!.announced=TRUE,!.phase="Imminent"] resolving == PaidResolvingFrame95(imminent) resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] finished == PaidFinishedFrame95(resolving) finishedPlan == [resolvingPlan EXCEPT !.completedSteps= <<"ReduceEncounteredBarrier">>,!.cursor=2,!.phase="Complete"] final == [finished EXCEPT !.phase="Complete",!.checkpoint=1001] returned == [final EXCEPT !.phase="Returned",!.ability.returned=TRUE] resumed == CompletePriorityOptionFrame9(busy) readyAgain == ReadyFixture92(resumed) freshContext == [c EXCEPT !.uses=turnUses] childSite == TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",3) child == ReadyFixture92(WindowFixture92(161,"Reaction",childSite,Empty9,0,NoTimingRef9)) childClosed == ClosePriorityWindow9(child) nextSourceDefinition == [d EXCEPT !.syntax.source=ObjectAbilitySource9(3),!.activity.source=ObjectAbilitySource9(3)] sourceObjects == [id \in {1,2,3} |-> IF id=3 THEN objects[1] ELSE objects[id]] sourceContext == [freshContext EXCEPT !.objects=sourceObjects, !.ownRestrictions.source=ObjectAbilitySource9(3),!.otherRestrictions.source=ObjectAbilitySource9(3), !.references=[ref \in {"Approach","Encounter"} |-> [c.references[ref] EXCEPT !.source=ObjectAbilitySource9(3)]]] sourceOption == [option EXCEPT !.source=ObjectAbilitySource9(3)] nextTurn == [c.turn EXCEPT !.id=2] nextEncounter == [c.encounter EXCEPT !.id=21] nextContext == [freshContext EXCEPT !.turn=nextTurn,!.encounter=nextEncounter,!.references["Encounter"].structure=TimingRef9("TraversalPhase",21)] nextWindow == ReadyFixture92(WindowFixture92(162,"Paid",EncounterPaidSite95(nextTurn,nextEncounter,nextContext.traversalControl),Empty9,0,NoTimingRef9)) nextProcedure == OpenPaidProcedure95(102,d,option,nextWindow,960,"Play") nextUse == [PaidUseFixture95(nextProcedure) EXCEPT !.useId=2] nextGenericUses == [id \in {1,2} |-> IF id=1 THEN used ELSE nextUse] nextTurnUses == [id \in {1,2} |-> IF id=1 THEN turnUses[1] ELSE [turnId |-> 2,ability |-> d.syntax.id,source |-> d.syntax.source,useId |-> 2]] IN /\ ReservePaidAbility95(<>,<>,p,100,d,c,option,LegalityFixture92(w,option),{}) /\ p.turnId=w.site.turnId /\ p.initialCheckpoint=w.checkpoint /\ ActionablePriority9(<>)={} /\ ~AbilityIsResolving9(p.ability) /\ ~ReservePaidAbility95(<>,<>,p,100,d,c,option,LegalityFixture92(busy,option),{}) /\ PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,uses,Empty9,turnUses,1,{used}) /\ paid.ability.detached /\ ~AbilityIsResolving9(paid.ability) /\ paid.costPaid /\ ~PayPaidTrigger95(<>,paid,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,uses,Empty9,turnUses,1,{used}) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,Empty9,Empty9,turnUses,1,{used}) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,[payment EXCEPT !.allPaid=FALSE],Empty9,uses,Empty9,turnUses,1,{used}) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,[payment EXCEPT !.additionalCostsPaid=FALSE],Empty9,uses,Empty9,turnUses,1,{used}) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,[payment EXCEPT !.source=ObjectAbilitySource9(2)],Empty9,uses,Empty9,turnUses,1,{used}) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,uses,Empty9,Empty9,1,{used}) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,uses,Empty9,turnUses,1,{used}) /\ PopClosedPriorityWindow9(<>,<>) /\ ActionablePriority9(<>)={} /\ ~CheckpointPriority9(<>,<>,CheckpointFixture92(busy)) /\ ~EnterPaidInstruction95(<>,paid,imminent,plan,imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,0)) /\ PaidCheckpoint95(<>,paid,planning,objects,Empty9,PaidCheckpointFixture95(paid,1000)) /\ ~PaidCheckpoint95(<>,paid,planning,objects,Empty9,[PaidCheckpointFixture95(paid,1000) EXCEPT !.allNewerChainsComplete=FALSE]) /\ EnterPaidInstruction95(<>,planning,imminent,plan,imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,1000)) /\ ~EnterPaidInstruction95(<>,planning,imminent,plan,imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,999)) /\ ~EnterPaidInstruction95(<>,planning,imminent,[plan EXCEPT !.announced=TRUE],imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,1000)) /\ ~EnterPaidInstruction95(<>,imminent,imminent,plan,imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,1000)) /\ ResolvePaidWithoutInterrupt95(<>,imminent,resolving,imminentPlan,resolvingPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0)) /\ CarryPaidInstruction95(<>,resolving,finished,resolvingPlan,finishedPlan,[tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "ReduceEncounteredBarrier",complete |-> TRUE]) /\ ~AbilityIsResolving9(finished.ability) /\ PaidCheckpoint95(<>,finished,final,objects,Empty9,PaidCheckpointFixture95(finished,1001)) /\ FinishPaidProcedure95(<>,<>,final,returned,PaidReturnFixture95(busy,1001)) /\ resumed.stage="NeedCheckpoint" /\ ActionablePriority9(<>)={} /\ CheckpointPriority9(<>,<>,CheckpointFixture92(resumed)) /\ ~PaidEligibility95(d,freshContext,readyAgain) /\ ~ReservePaidAbility95(<>,<>,OpenPaidProcedure95(101,d,option,readyAgain,960,"Play"),101,d,freshContext,option,LegalityFixture92(readyAgain,option),{100}) /\ ReservePaidAbility95(<>,<>,OpenPaidProcedure95(101,nextSourceDefinition,sourceOption,readyAgain,960,"Play"),101,nextSourceDefinition,sourceContext,sourceOption,LegalityFixture92(readyAgain,sourceOption),{100}) /\ ReservePaidAbility95(<>,<>,OpenPaidProcedure95(102,d,option,nextWindow,960,"Play"),102,d,nextContext,option,LegalityFixture92(nextWindow,option),{100}) /\ nextProcedure.turnId=2 /\ PayPaidTrigger95(<>,nextProcedure,PaidCommittedFixture95(nextProcedure,Empty9,FALSE),objects,objects,Empty9,Empty9,Empty9,DOMAIN objects, PaidPaymentFixture95(nextProcedure,objects,objects,1,FALSE,FALSE),uses,nextGenericUses,turnUses,nextTurnUses,2,{nextUse}) /\ OncePerTurnAllowed93(d.syntax,2,turnUses) /\ OncePerTurnAllowed93(nextSourceDefinition.syntax,1,turnUses) /\ ~OncePerTurnAllowed93(d.syntax,1,turnUses) /\ ~PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,uses,turnUses,turnUses,1,{used}) PaidSpecimen0090Checks95 == LET d == [PaidDefinitionFixture95(630,"Specimen0090",<<>>,<<[kind |-> "SpendActionPoints",amount |-> 1],[kind |-> "RetireSource",amount |-> 1]>>) EXCEPT !.refersHosted=TRUE] w == PaidWindowFixture95(170,"NeutralValue00001","SideB") option == PaidOptionFixture95(d,w) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(110,d,option,w,960,"Play") objects == [id \in {1,2,3,4,5} |-> IF id=1 THEN CardObject9("Specimen0090","Play",TRUE,"Up") ELSE PaidCounterFixture95("SchemaAtom180",1)] successors == [id \in 2..5 |-> id+10] afterObjects == [id \in {11,12,13,14,15} |-> IF id=11 THEN CardObject9("Specimen0090","SideBDiscard",FALSE,"Up") ELSE [objects[id-10] EXCEPT !.zone="SetAside",!.loc="SetAside",!.host=0]] transits == [id \in 12..15 |-> ProtectedPaidTransit95(id,objects[id-10],p,FALSE)] payment == PaidPaymentFixture95(p,objects,afterObjects,11,TRUE,FALSE) paid == PaidCommittedFixture95(p,successors,FALSE) planning == PaidTargetsFrame95(paid,1000) resolving == [planning EXCEPT !.phase="Resolve",!.checkpoint=0,!.ability.phase="Resolving",!.ability.firstImminent=TRUE] finished == PaidFinishedFrame95(resolving) cleaned == [id \in {11} |-> afterObjects[id]] countView == [tag |-> "HeldCounterCount",abilityInstance |-> p.id,source |-> p.ability.source,kind |-> "SchemaAtom180",physicalIds |-> 12..15,effectiveCount |-> 4,modifierIds |-> {}] c == PaidContextFixture95(d,objects,TurnFixture92("SideB")) partialSuccessors == [id \in 2..4 |-> id+10] partialObjects == [id \in 11..14 |-> afterObjects[id]] partialTransits == [id \in 12..14 |-> transits[id]] IN /\ ReservePaidAbility95(<>,<>,p,110,d,c,option,LegalityFixture92(w,option),{}) /\ PaidPhysicalHosted95(objects,1)=2..5 /\ PaidPhysicalHosted95([id \in 1..6 |-> IF id=6 THEN [PaidCounterFixture95("SchemaAtom180",1) EXCEPT !.virtual=TRUE] ELSE objects[id]],1)=2..5 /\ PayPaidTrigger95(<>,p,paid,objects,afterObjects,Empty9,transits,successors,DOMAIN objects,payment, Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ ~AbilityIsResolving9(paid.ability) /\ PaidProtectionAlive95(paid) /\ PaidCleanupIds95(paid,afterObjects,transits,"ProcedureCode96bfa1b6a970")={} /\ PaidCheckpoint95(<>,paid,planning,afterObjects,transits,PaidCheckpointFixture95(paid,1000)) /\ ~PaidOwnerCanQuery95(paid,afterObjects,transits,12,p.id) /\ PaidOwnerCanQuery95(planning,afterObjects,transits,12,p.id) /\ ~AbilityIsResolving9(planning.ability) /\ ~PaidHeldInteraction95(planning,afterObjects,transits,12,111) /\ ~PaidOwnerCanQuery95(planning,afterObjects,transits,12,111) /\ PaidEffectiveHeldCount95(resolving,afterObjects,transits,"SchemaAtom180",countView,4) /\ Specimen0090ResourceUnits95(4)=8 /\ ~PaidEffectiveHeldCount95(resolving,afterObjects,transits,"SchemaAtom180",[countView EXCEPT !.physicalIds=12..16],4) /\ ~PaidEffectiveHeldCount95(resolving,afterObjects,transits,"SchemaAtom180",[countView EXCEPT !.effectiveCount=5],5) /\ PaidCleanupIds95(finished,afterObjects,transits,"ProcedureCode96bfa1b6a970")=12..15 /\ PaidCleanupIds95(finished,afterObjects,transits,"ProcedureCode76ca53ad9dd0")={} /\ ~PaidProtectionAlive95(finished) /\ \A id \in DOMAIN transits : transits[id].protected /\ CleanupPaidHeld95(finished,afterObjects,cleaned,transits,Empty9,"ProcedureCode96bfa1b6a970",Empty9,DOMAIN afterObjects,PaidCleanupFixture95(finished,afterObjects,cleaned,"ProcedureCode96bfa1b6a970",12..15)) /\ BankCheckpointReturn4(afterObjects,cleaned,[id \in DOMAIN afterObjects |-> id \notin 12..15],TRUE) /\ ~PaidCheckpoint95(<>,finished,[finished EXCEPT !.phase="Complete",!.checkpoint=1001],afterObjects,transits,PaidCheckpointFixture95(finished,1001)) /\ PaidCheckpoint95(<>,finished,[finished EXCEPT !.phase="Complete",!.checkpoint=1001],cleaned,Empty9,PaidCheckpointFixture95(finished,1001)) /\ ~PayPaidTrigger95(<>,p,PaidCommittedFixture95(p,partialSuccessors,FALSE),objects,partialObjects,Empty9,partialTransits,partialSuccessors,DOMAIN objects, PaidPaymentFixture95(p,objects,partialObjects,11,TRUE,FALSE),Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ ~PaidPaymentProof95(p,objects,afterObjects,[payment EXCEPT !.sourceUninstalled=FALSE]) /\ ~PaidHeldTransfer95(p,objects,afterObjects,Empty9,transits,[id \in 2..4 |-> id+10],DOMAIN objects,payment) /\ ~PaidHeldTransfer95(p,objects,afterObjects,Empty9,[transits EXCEPT ![12].ability=111],successors,DOMAIN objects,payment) PaidExampleFamily040Checks95 == LET d == [PaidDefinitionFixture95(640,"Specimen0227",<<>>,<<[kind |-> "RetireSource",amount |-> 1]>>) EXCEPT !.refersHosted=TRUE] w == PaidWindowFixture95(171,"Paid","SideB") option == PaidOptionFixture95(d,w) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(120,d,option,w,960,"Play") objects == [id \in 1..4 |-> IF id=1 THEN CardObject9("Specimen0227","Play",TRUE,"Up") ELSE [CardObject9(IF id=2 THEN "Specimen0142" ELSE IF id=3 THEN "Specimen0002" ELSE "Specimen0070","Play",FALSE,"Down") EXCEPT !.host=1,!.loc="HostedOnExampleFamily040"]] successors == [id \in 2..4 |-> id+10] afterObjects == [id \in 11..14 |-> IF id=11 THEN CardObject9("Specimen0227","SideBDiscard",FALSE,"Up") ELSE [objects[id-10] EXCEPT !.zone="SetAside",!.loc="SetAside",!.host=0,!.face="Up"]] transits == [id \in 12..14 |-> ProtectedPaidTransit95(id,objects[id-10],p,FALSE)] paid == PaidCommittedFixture95(p,successors,FALSE) planning == PaidTargetsFrame95(paid,1000) resolving == [planning EXCEPT !.phase="Resolve",!.checkpoint=0,!.ability.phase="Resolving",!.ability.firstImminent=TRUE] deployPlan == [OpenInstruction93(700,"Ability",120,d.syntax.source,"Play",1,"NoValue",<<"DeployHosted">>,TRUE) EXCEPT !.phase="Resolving",!.announced=TRUE,!.targets={12}] deployed == [id \in {11,13,14,22} |-> IF id=22 THEN CardObject9("Specimen0142","Play",TRUE,"Up") ELSE afterObjects[id]] deploy == [tag |-> "ExampleFamily040Deploy",abilityInstance |-> p.id,old |-> 12,new |-> 22,discount |-> 1,deployProcedureComplete |-> TRUE,allDeployCostsPaid |-> TRUE,allowed |-> TRUE] finished == PaidFinishedFrame95(resolving) cleaned == [id \in {11,22,23,24} |-> IF id \in {23,24} THEN CardObject9(IF id=23 THEN "Specimen0002" ELSE "Specimen0070","SideBDiscard",FALSE,"Up") ELSE deployed[id]] residualTransits == [id \in {12} |-> transits[id]] IN /\ PayPaidTrigger95(<>,p,paid,objects,afterObjects,Empty9,transits,successors,DOMAIN objects, PaidPaymentFixture95(p,objects,afterObjects,11,TRUE,FALSE),Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ PaidCheckpoint95(<>,paid,planning,afterObjects,transits,PaidCheckpointFixture95(paid,1000)) /\ \A id \in 12..14 : afterObjects[id].face="Up" /\ ~afterObjects[id].deployed /\ PaidOwnerCanQuery95(planning,afterObjects,transits,12,p.id) /\ ~PaidHeldInteraction95(planning,afterObjects,transits,12,121) /\ ExampleFamily040Deploy95(resolving,deployPlan,afterObjects,deployed,transits,12,22,deploy) /\ ~ExampleFamily040Deploy95(resolving,deployPlan,afterObjects,deployed,transits,12,22,[deploy EXCEPT !.allDeployCostsPaid=FALSE]) /\ ~ExampleFamily040Deploy95(resolving,deployPlan,afterObjects,deployed,transits,12,22,[deploy EXCEPT !.discount=0]) /\ ~ExampleFamily040Deploy95(resolving,[deployPlan EXCEPT !.targets={13}],afterObjects,deployed,transits,12,22,deploy) /\ PaidCleanupIds95(finished,deployed,transits,"ProcedureCode96bfa1b6a970")={13,14} /\ CleanupPaidHeld95(finished,deployed,cleaned,transits,residualTransits,"ProcedureCode96bfa1b6a970",[id \in {13,14} |-> id+10],DOMAIN deployed, PaidCleanupFixture95(finished,deployed,cleaned,"ProcedureCode96bfa1b6a970",{13,14})) /\ cleaned[22]=deployed[22] /\ 22 \notin PaidCleanupIds95(finished,deployed,transits,"ProcedureCode96bfa1b6a970") /\ PaidAsideExitView95(resolving,transits[12],121,"Play")=[fromZone |-> "Play",fromLocation |-> "HostedOnExampleFamily040",toZone |-> "Play",fromFace |-> "Down",wasDeployed |-> FALSE] /\ PaidAsideExitView95(finished,transits[13],121,"SideBDiscard").fromZone="Play" /\ PaidAsideExitView95(resolving,transits[12],p.id,"Play").fromZone="SetAside" PaidExampleFamily048Checks95 == LET d == [PaidDefinitionFixture95(650,"Specimen0197",<<>>,<<[kind |-> "RetireSource",amount |-> 1]>>) EXCEPT !.refersHosted=TRUE] w == PaidWindowFixture95(172,"Paid","SideA") option == PaidOptionFixture95(d,w) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(130,d,option,w,960,"Play") objects == [id \in 1..4 |-> IF id=1 THEN [CardObject9("Specimen0197","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE IF id=2 THEN CardObject9("Specimen0151","Play",TRUE,"Down") ELSE PaidCounterFixture95("Progress",1)] successors == [id \in {3,4} |-> id+10] afterObjects == [id \in {11,2,13,14} |-> IF id=11 THEN CardObject9("Specimen0197","SideADiscard",FALSE,"Up") ELSE IF id=2 THEN objects[2] ELSE [objects[id-10] EXCEPT !.zone="SetAside",!.loc="SetAside",!.host=0]] transits == [id \in {13,14} |-> ProtectedPaidTransit95(id,objects[id-10],p,FALSE)] paid == PaidCommittedFixture95(p,successors,FALSE) planning == PaidTargetsFrame95(paid,1000) plan == OpenInstruction93(700,"Ability",130,d.syntax.source,"Play",1,"NoValue",<<"MoveAnyProgress">>,TRUE) imminent == PaidImminentFrame95(planning) imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={2},!.phase="Imminent"] resolving == PaidResolvingFrame95(imminent) resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] site == w.site opening == [OpeningFixture92(173,"Interrupt",site,Empty9,41,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(imminentPlan)] iw == TypedWindowFixture93(173,site,Empty9,opening) ready == ReadyFixture92(iw) effect == EffectFixture92(iw,{}, {999}) pass1 == PassPriorityFrame9(ready) ready2 == ReadyFixture92(pass1) closed == PassPriorityFrame9(ready2) clear == InstructionClearanceFixture93(imminentPlan,173,0) progressEligible == [tag |-> "ProgressEligibleTarget",abilityInstance |-> p.id,target |-> 2,allowed |-> TRUE] vanished == [id \in {11,13,14} |-> afterObjects[id]] emptyImminentPlan == [imminentPlan EXCEPT !.targets={}] emptyResolvingPlan == [emptyImminentPlan EXCEPT !.phase="Resolving"] finished == PaidFinishedFrame95(resolving) completePlan == [emptyResolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"MoveAnyProgress">>] IN /\ PayPaidTrigger95(<>,p,paid,objects,afterObjects,Empty9,transits,successors,DOMAIN objects, PaidPaymentFixture95(p,objects,afterObjects,11,TRUE,FALSE),Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ ~EnterPaidInstruction95(<>,paid,imminent,plan,imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,0)) /\ PaidCheckpoint95(<>,paid,planning,afterObjects,transits,PaidCheckpointFixture95(paid,1000)) /\ EnterPaidInstruction95(<>,planning,imminent,plan,imminentPlan,InstructionTargetsFixture93(plan),PaidEntryFixture95(plan,1000)) /\ OpenPaidInstructionInterrupt95(<>,<>,imminent,imminentPlan,173,site,Empty9,opening,{172}) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(iw)) /\ PassPriority9(<>,<>,"SideA",effect) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(pass1)) /\ PassPriority9(<>,<>,"SideB",effect) /\ ResolvePaidAfterInterrupt95(<>,<>,imminent,resolving,imminentPlan,resolvingPlan,clear) /\ ActionablePriority9(<>)={} /\ ~ResolvePaidAfterInterrupt95(<>,<>,imminent,resolving,imminentPlan,resolvingPlan,[clear EXCEPT !.abilityInstance=131]) /\ \A selected \in SUBSET {13,14} : ExampleFamily048Move95(resolving,resolvingPlan,afterObjects,transits,selected,2,progressEligible) /\ ~ExampleFamily048Move95(resolving,resolvingPlan,afterObjects,transits,{13},2,[progressEligible EXCEPT !.allowed=FALSE]) /\ ~ExampleFamily048Move95(resolving,resolvingPlan,afterObjects,transits,{3},2,progressEligible) /\ ~ExampleFamily048Move95(resolving,[resolvingPlan EXCEPT !.targets={}],afterObjects,transits,{13},2,progressEligible) /\ PaidCheckpoint95(<>,paid,planning,vanished,transits,PaidCheckpointFixture95(paid,1000)) /\ EnterPaidInstruction95(<>,planning,imminent,plan,emptyImminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],PaidEntryFixture95(plan,1000)) /\ ResolvePaidWithoutInterrupt95(<>,imminent,resolving,emptyImminentPlan,emptyResolvingPlan,NoModifiersFixture95(emptyImminentPlan),InstructionClearanceFixture93(emptyImminentPlan,0,0)) /\ CarryPaidInstruction95(<>,resolving,finished,emptyResolvingPlan,completePlan,[tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "MoveAnyProgress",complete |-> TRUE]) /\ finished.costPaid /\ finished.ability.lastFinished /\ PaidCleanupIds95(finished,vanished,transits,"ProcedureCode96bfa1b6a970")={13,14} PaidMidItemInspectionChecks95 == LET d == PaidDefinitionFixture95("Imp","Specimen0115",<<"ItemInspection","OncePerTurn">>,<<[kind |-> "HostedCluster",amount |-> 1]>>) objects == [id \in {1,2,3} |-> CASE id=1 -> CardObject9("Specimen0115","Play",TRUE,"Up") [] id=2 -> CardObject9("Specimen0148","Play",TRUE,"Down") [] OTHER -> PaidCounterFixture95("SchemaAtom180",1)] c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.traversal=TraversalFixture92("ProcedureCoded75d879e00ff"),!.traversalControl=PaidTraversalControlFixture95(TraversalFixture92("ProcedureCoded75d879e00ff"))] a == [OpenItemInspection7(300,2,objects[2],2,40,"siteInspection",{}) EXCEPT !.step="ProcedureCode1dd0e8f05be2",!.active=TRUE,!.beginMet=TRUE] site == ItemInspectionPrioritySite9(c.turn,a,objects) w == ReadyFixture92(WindowFixture92(174,"MidItemInspection",site,Empty9,0,NoTimingRef9)) mid == MidOption7("Imp",TRUE,TRUE,TRUE) basic == MidOption7("BasicRetire",TRUE,TRUE,TRUE) option == [PaidOptionFixture95(d,w) EXCEPT !.target=2] busy == StartedFixture92(w,option) p == OpenPaidProcedure95(140,d,option,w,960,"Play") afterObjects == [id \in {1,2} |-> objects[id]] paid == PaidCommittedFixture95(p,Empty9,FALSE) usedItemInspection == [a EXCEPT !.midUsed=TRUE,!.midResolving=TRUE] beginDrain == [tag |-> "MidItemInspectionBeginDrained",itemInspectionId |-> a.id,windowId |-> w.id,checkpointId |-> w.checkpoint,complete |-> TRUE] payment == PaidPaymentFixture95(p,objects,afterObjects,1,FALSE,FALSE) basicDefinition == [PaidDefinitionFixture95("BasicRetire","Specimen0115",<<>>,<<[kind |-> "ResourceUnits",amount |-> 5]>>) EXCEPT !.syntax.source=RuleAbilitySource9("BasicRetire"),!.syntax.cardKind="Rule",!.activity.source=RuleAbilitySource9("BasicRetire"),!.ruleTiming="BasicRetire"] basicContext == [PaidContextFixture95(basicDefinition,objects,c.turn) EXCEPT !.traversal=c.traversal,!.traversalControl=c.traversalControl,!.activity.activeRules={"BasicRetire"}] prohibited == [c EXCEPT !.useProhibitions={[source |-> d.syntax.source,traversalId |-> 2]}] forbiddenImp == [mid EXCEPT !.legal=PaidSourceUseAllowed95(d,prohibited)] brokeBasic == [basic EXCEPT !.canPay=FALSE] declined == [a EXCEPT !.midDone=TRUE] afterReaction == [id \in {1,12} |-> IF id=1 THEN objects[1] ELSE CardObject9("Specimen0148","SideADiscard",FALSE,"Up")] endedItemInspection == [usedItemInspection EXCEPT !.active=FALSE,!.complete=TRUE,!.step="Complete",!.completionReason="Moved"] final == [paid EXCEPT !.phase="Complete",!.checkpoint=1001,!.ability.phase="Complete",!.ability.firstImminent=TRUE,!.ability.lastFinished=TRUE,!.ability.complete=TRUE] returned == [final EXCEPT !.phase="Returned",!.ability.returned=TRUE] itemInspectionDone == [endedItemInspection EXCEPT !.midResolving=FALSE,!.midDone=TRUE] IN /\ CardFacts9["Specimen0264"].kind="Barrier" /\ CardFacts9["Specimen0148"].kind="Attachment" /\ PaidAlwaysOptional95(d) /\ PaidEligibility95(basicDefinition,basicContext,w) /\ PaidWindowKinds95(basicDefinition)={"MidItemInspection"} /\ ReservePaidMidItemInspection95(<>,<>,p,140,d,c,option,LegalityFixture92(w,option),{},a,a,mid,{mid,basic},TRUE,FALSE) /\ ~ReservePaidMidItemInspection95(<>,<>,p,140,d,prohibited,option,LegalityFixture92(w,option),{},a,a,mid,{mid,basic},TRUE,FALSE) /\ ~forbiddenImp.legal /\ MidItemInspectionChoiceAllowed7("BasicRetire",{forbiddenImp,basic},TRUE,FALSE) /\ ~MidItemInspectionChoiceAllowed7("Decline",{forbiddenImp,basic},TRUE,FALSE) /\ PassMidItemInspection9(<>,<>,a,declined,objects,{forbiddenImp,brokeBasic},TRUE,FALSE) /\ PayPaidMidItemInspection95(<>,p,paid,objects,afterObjects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)},a,usedItemInspection,mid,{mid,basic},TRUE,FALSE,beginDrain,{}) /\ ~PayPaidTrigger95(<>,p,paid,objects,afterObjects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ ~PayPaidMidItemInspection95(<>,p,paid,objects,afterObjects,Empty9,Empty9,Empty9,DOMAIN objects,payment,Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)},usedItemInspection,usedItemInspection,mid,{mid,basic},TRUE,FALSE,beginDrain,{}) /\ ItemInspectionMovementOutcome7(usedItemInspection,endedItemInspection,afterReaction,TRUE,{ItemInspectionEndEvent7(usedItemInspection)}) /\ endedItemInspection.midResolving /\ ~endedItemInspection.returned /\ FinishPaidMidItemInspection95(<>,<>,final,returned,PaidReturnFixture95(busy,1001),endedItemInspection,itemInspectionDone) /\ itemInspectionDone.midUsed /\ itemInspectionDone.midDone /\ ~itemInspectionDone.midResolving /\ ~CompletePriorityOptionFrame9(busy).open /\ ActionablePriority9(<>)={} PaidContinuationChecks95 == LET d == [PaidDefinitionFixture95(670,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) EXCEPT !.instructions= <<700,701>>] w == PaidWindowFixture95(175,"Paid","SideB") opt == PaidOptionFixture95(d,w) busy == StartedFixture92(w,opt) p == PaidCommittedFixture95(OpenPaidProcedure95(150,d,opt,w,960,"Play"),Empty9,FALSE) between == [p EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Between",!.ability.firstImminent=TRUE] planning == PaidTargetsFrame95(between,1100) plan == OpenInstruction93(701,"Ability",150,d.syntax.source,"Play",2,"NoValue",<<"NextEffect">>,FALSE) imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE,!.targets={}] imminent == [planning EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.phase="Imminent",!.ability.cursor=2] entry == PaidEntryFixture95(plan,1100) objects == PaidSourceFixture95("Specimen0002") IN /\ ~EnterPaidInstruction95(<>,between,imminent,plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],PaidEntryFixture95(plan,0)) /\ PaidCheckpoint95(<>,between,planning,objects,Empty9,PaidCheckpointFixture95(between,1100)) /\ ~PaidCheckpoint95(<>,between,planning,objects,Empty9,[PaidCheckpointFixture95(between,1100) EXCEPT !.allNewerChainsComplete=FALSE]) /\ EnterPaidInstruction95(<>,planning,imminent,plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],entry) /\ ~EnterPaidInstruction95(<>,planning,imminent,plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],[entry EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE]) /\ ~EnterPaidInstruction95(<>,planning,imminent,plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],[entry EXCEPT !.checkpointId=1099]) PaidForfeitChecks95 == LET d == [PaidDefinitionFixture95(680,"Specimen0188",<<>>,<<[kind |-> "Forfeit",amount |-> 1]>>) EXCEPT !.refersHosted=TRUE] w == PaidWindowFixture95(176,"Paid","SideA") opt == PaidOptionFixture95(d,w) busy == StartedFixture92(w,opt) p == OpenPaidProcedure95(160,d,opt,w,960,"SideAObjectiveCompletion") objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0188","SideAObjectiveCompletion",FALSE,"Up") ELSE PaidCounterFixture95("Objective",1)] afterObjects == [id \in {11,12} |-> IF id=11 THEN CardObject9("Specimen0188","Removed",FALSE,"Up") ELSE [objects[2] EXCEPT !.zone="SetAside",!.loc="SetAside",!.host=0]] successors == [id \in {2} |-> 12] transits == [id \in {12} |-> ProtectedPaidTransit95(id,objects[2],p,TRUE)] paid == PaidCommittedFixture95(p,successors,TRUE) finished == [PaidFinishedFrame95(paid) EXCEPT !.ability.firstImminent=TRUE] plan == ForfeitPlan8(objects,1,{2}) IN /\ PayPaidTrigger95(<>,p,paid,objects,afterObjects,Empty9,transits,successors,DOMAIN objects,PaidPaymentFixture95(p,objects,afterObjects,11,FALSE,TRUE), Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ ForfeitHostedCleanup8(plan,{},[id \in {2} |-> transits[12]],p.id) /\ PaidCleanupIds95(paid,afterObjects,transits,"ProcedureCode76ca53ad9dd0")={} /\ PaidCleanupIds95(finished,afterObjects,transits,"ProcedureCode76ca53ad9dd0")={12} /\ PaidCleanupIds95(finished,afterObjects,transits,"ProcedureCode96bfa1b6a970")={} /\ ~PaidHeldTransfer95(p,objects,afterObjects,Empty9,[transits EXCEPT ![12].cleanupStage="ProcedureCode96bfa1b6a970"],successors,DOMAIN objects,PaidPaymentFixture95(p,objects,afterObjects,11,FALSE,TRUE)) PaidConvertedCounterChecks95 == LET d == [PaidDefinitionFixture95(690,"Specimen0227",<<>>,<<[kind |-> "RetireSource",amount |-> 1]>>) EXCEPT !.refersHosted=TRUE] w == PaidWindowFixture95(177,"Paid","SideB") opt == PaidOptionFixture95(d,w) busy == StartedFixture92(w,opt) p == OpenPaidProcedure95(170,d,opt,w,960,"Play") counter == [CardObject9("Specimen0046","Play",TRUE,"Up") EXCEPT !.form="Counter",!.kind="SchemaAtom043",!.host=1] physicalCounter == [card |-> counter.card,form |-> counter.form,kind |-> counter.kind,side |-> counter.side, zone |-> counter.zone,loc |-> counter.loc,host |-> 1,deployed |-> TRUE,face |-> counter.face,activated |-> FALSE,virtual |-> FALSE] objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0227","Play",TRUE,"Up") ELSE physicalCounter] cutover == [id \in {11,12} |-> IF id=11 THEN CardObject9("Specimen0227","SideBDiscard",FALSE,"Up") ELSE CardObject9("Specimen0046","SetAside",FALSE,"Up")] successors == [id \in {2} |-> 12] transits == [id \in {12} |-> ProtectedPaidTransit95(id,objects[2],p,FALSE)] paid == PaidCommittedFixture95(p,successors,FALSE) finalWorld == [id \in {11,22} |-> IF id=11 THEN cutover[11] ELSE CardObject9("Specimen0046","SideADiscard",FALSE,"Up")] normal == [tag |-> "PaidCostConversion",abilityInstance |-> p.id,transactionId |-> p.transaction,sources |-> {12}, beforeObjects |-> cutover,afterObjects |-> finalWorld,complete |-> TRUE,normalConversionAndRetireRules |-> TRUE,ownerDiscard |-> [id \in {12} |-> "SideADiscard"]] planning == PaidTargetsFrame95(paid,1000) IN /\ ConditionCounterPost("Specimen0046",objects[2]) /\ ~BankPhysicalToken4(objects[2]) /\ PayPaidTrigger95(<>,p,paid,objects,cutover,Empty9,transits,successors,DOMAIN objects,PaidPaymentFixture95(p,objects,cutover,11,TRUE,FALSE), Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ cutover[12].form="Card" /\ PaidConvertedAsideIds95(paid,cutover,transits)={12} /\ ~PaidCheckpoint95(<>,paid,planning,cutover,transits,PaidCheckpointFixture95(paid,1000)) /\ NormalizePaidConverted95(<>,paid,cutover,finalWorld,transits,Empty9,[id \in {12} |-> 22],DOMAIN cutover,normal) /\ PaidCheckpoint95(<>,paid,planning,finalWorld,Empty9,PaidCheckpointFixture95(paid,1000)) /\ ~PaidOwnerCanQuery95(planning,finalWorld,Empty9,22,p.id) /\ PaidCleanupIds95(PaidFinishedFrame95(planning),finalWorld,Empty9,"ProcedureCode96bfa1b6a970")={} /\ ~BankPhysicalToken4(finalWorld[22]) PaidRepeatChecks95 == LET d == PaidDefinitionFixture95(691,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) objects == PaidSourceFixture95("Specimen0002") w == PaidWindowFixture95(178,"Paid","SideB") opt == PaidOptionFixture95(d,w) busy == StartedFixture92(w,opt) p == OpenPaidProcedure95(180,d,opt,w,960,"Play") paid == PaidCommittedFixture95(p,Empty9,FALSE) final == [paid EXCEPT !.phase="Complete",!.checkpoint=1200,!.ability.phase="Complete",!.ability.firstImminent=TRUE,!.ability.lastFinished=TRUE,!.ability.complete=TRUE] returned == [final EXCEPT !.phase="Returned",!.ability.returned=TRUE] resumed == CompletePriorityOptionFrame9(busy) ready == ReadyFixture92(resumed) secondBusy == StartedFixture92(ready,opt) p2 == OpenPaidProcedure95(181,d,opt,ready,960,"Play") secondPaid == PaidCommittedFixture95(p2,Empty9,FALSE) use2 == [PaidUseFixture95(p2) EXCEPT !.useId=2] uses2 == [id \in {1,2} |-> IF id=1 THEN PaidUseFixture95(p) ELSE use2] turns2 == [id \in {1,2} |-> IF id=1 THEN PaidTurnUsesFixture95(p)[1] ELSE [turnId |-> 1,ability |-> d.syntax.id,source |-> d.syntax.source,useId |-> 2]] c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.uses=PaidTurnUsesFixture95(p)] IN /\ PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,PaidPaymentFixture95(p,objects,objects,1,FALSE,FALSE), Empty9,PaidUsesFixture95(p),Empty9,PaidTurnUsesFixture95(p),1,{PaidUseFixture95(p)}) /\ FinishPaidProcedure95(<>,<>,final,returned,PaidReturnFixture95(busy,1200)) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(resumed)) /\ ReservePaidAbility95(<>,<>,p2,181,d,c,opt,LegalityFixture92(ready,opt),{180}) /\ PayPaidTrigger95(<>,p2,secondPaid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,PaidPaymentFixture95(p2,objects,objects,1,FALSE,FALSE), PaidUsesFixture95(p),uses2,PaidTurnUsesFixture95(p),turns2,2,{use2}) /\ ~PayPaidTrigger95(<>,p2,secondPaid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,[PaidPaymentFixture95(p2,objects,objects,1,FALSE,FALSE) EXCEPT !.allPaid=FALSE], PaidUsesFixture95(p),uses2,PaidTurnUsesFixture95(p),turns2,2,{use2}) PaidRetainedApproachChecks95 == LET d == [PaidDefinitionFixture95(610,"Specimen0188",<<>>,<<[kind |-> "HostedObjective",amount |-> 1]>>) EXCEPT !.refersApproachedBarrier=TRUE,!.approachRequirements.subtypes={"SchemaAtom024"},!.approachRequirements.activated=TRUE] objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0188","SideAObjectiveCompletion",FALSE,"Up") ELSE [CardObject9("Specimen0107","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] traversal == TraversalFixture92("ProcedureCode4d474d346807") control == PaidTraversalControlFixture95(traversal) ended == [control EXCEPT !.phaseEndedIds={20}] encounter == [OpenEncounter6(21,2,2,TRUE,"phase-end-child",<<301>>) EXCEPT !.stage="Paid"] c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.traversal=traversal,!.traversalControl=control,!.encounter=encounter, !.references["Encounter"].structure=TimingRef9("TraversalPhase",21),!.references["Encounter"].traversalId=2,!.subtypes[2]={"SchemaAtom024","SchemaSymbol001"}] endedContext == [c EXCEPT !.traversalControl=ended] site == EncounterPaidSite95(c.turn,encounter,c.traversalControl) w == [ReadyFixture92(WindowFixture92(990,"Paid",site,Empty9,0,NoTimingRef9)) EXCEPT !.priority="SideA"] option == PaidOptionFixture95(d,w) p == OpenPaidProcedure95(190,d,option,w,960,"SideAObjectiveCompletion") busy == StartedFixture92(w,option) IN /\ BeginNormalTraversalPhaseEnd6(control,ended,LayoutFixture92,{2},Empty9,Empty9,Empty9,TRUE,{TraversalPhaseEndEvent6(traversal)}) /\ control.traversal=ended.traversal /\ ended.traversal.phase="Approach" /\ 20 \in ended.phaseEndedIds /\ ~ended.traversal.ending /\ encounter.id # traversal.phaseId /\ site.structure=TimingRef9("TraversalPhase",21) /\ site.traversalId=2 /\ WindowSiteAllowed9("Paid",site) /\ PaidEligibility95(d,c,w) /\ ReservePaidAbility95(<>,<>,p,190,d,c,option,LegalityFixture92(w,option),{}) /\ ~PaidEligibility95(d,endedContext,w) /\ ~ReservePaidAbility95(<>,<>,p,190,d,endedContext,option,LegalityFixture92(w,option),{}) /\ PaidEligibility95(d,[c EXCEPT !.traversalControl.phaseEndedIds={19,22}],w) /\ ~PaidEligibility95(d,[c EXCEPT !.traversalControl.traversal.id=3],w) /\ ~PaidEligibility95(d,[c EXCEPT !.traversalControl.traversal.phaseId=19,!.traversalControl.traversal.usedPhaseIds={19}],w) /\ ~PaidEligibility95(d,[c EXCEPT !.references["Approach"].structure=TimingRef9("TraversalPhase",21)],w) /\ ~PaidEligibility95(d,[c EXCEPT !.references["Approach"].traversalId=3],w) /\ ~PaidEligibility95(d,[c EXCEPT !.references["Approach"].structure=TimingRef9("ItemInspection",20)],w) PaidEndedEncounterChecks95 == LET d == [PaidDefinitionFixture95(600,"Specimen0002",<<"Interrupt">>,<<[kind |-> "ResourceUnits",amount |-> 1]>>) EXCEPT !.canSuppressBarrierInstructions=TRUE,!.refersEncounteredBarrier=TRUE] objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0002","Play",TRUE,"Up") ELSE CardObject9("NeutralValue00016","Play",TRUE,"Up")] traversal == TraversalFixture92("ProcedureCodeda7bff1d9270") target == [phase |-> "Movement",phaseId |-> 22,position |-> "outer",attacked |-> "SchemaAtom082"] control == [traversal |-> traversal,redirect |-> NoTraversalRedirect6,phaseStepsSkipped |-> FALSE,redirectCheckpointDue |-> FALSE, phaseEndedIds |-> {},paidOpen |-> FALSE,redirectStage |-> "NoValue",encounter |-> 20] ended == [control EXCEPT !.redirect=target,!.phaseStepsSkipped=TRUE,!.traversal.usedPhaseIds=@ \cup {22},!.phaseEndedIds={20}, !.redirectStage="Checkpoint",!.redirectCheckpointDue=TRUE] e == [OpenEncounter6(20,2,2,FALSE,"traversal",<<301>>) EXCEPT !.stage="BeginReactions"] w == PaidWindowFixture95(152,"Interrupt","SideB") c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.traversal=traversal,!.traversalControl=control,!.encounter=e, !.references["Encounter"].traversalId=2,!.currentEffect=EffectFixture92(w,{}, {600}), !.paidRelevance=[tag |-> "PaidInterruptRelevance",windowId |-> w.id,instruction |-> w.instruction,revision |-> 1, eligible |-> {[ability |-> 600,source |-> d.syntax.source]}]] endedContext == [c EXCEPT !.traversal=ended.traversal,!.traversalControl=ended] child == [OpenEncounter6(21,2,2,TRUE,"live-child",<<301>>) EXCEPT !.stage="Paid"] childContext == [endedContext EXCEPT !.encounter=child,!.references["Encounter"].structure=TimingRef9("TraversalPhase",21)] childSite == EncounterPaidSite95(c.turn,child,ended) noTraversalControl == PaidTraversalControlFixture95(NoTraversal6) outside == [child EXCEPT !.traversalId=0] outsideContext == [c EXCEPT !.traversal=NoTraversal6,!.traversalControl=noTraversalControl,!.encounter=outside, !.references["Encounter"].structure=TimingRef9("TraversalPhase",21),!.references["Encounter"].traversalId=0] barrierInstructions == [e EXCEPT !.stage="BarrierInstructions",!.resolved={301}] completed == [barrierInstructions EXCEPT !.stage="Complete"] IN /\ RequestTraversalRedirect6(control,ended,target,TRUE,{TraversalPhaseEndEvent6(traversal)}) /\ ended.encounter=20 /\ ended.traversal.phase="Encounter" /\ 20 \in ended.phaseEndedIds /\ e.stage="BeginReactions" /\ PaidEligibility95(d,c,w) /\ ~PaidEligibility95(d,endedContext,w) /\ ~PaidEffectTiming95([d EXCEPT !.refersEncounteredBarrier=FALSE],endedContext) /\ ~PaidEffectTiming95([d EXCEPT !.canSuppressBarrierInstructions=FALSE],endedContext) /\ PaidEligibility95(d,childContext,w) /\ PaidEncounterLive95(childContext) /\ WindowSiteAllowed9("Paid",childSite) /\ childSite.traversalId=2 /\ PaidEligibility95(d,outsideContext,w) /\ PaidEncounterLive95(outsideContext) /\ WindowSiteAllowed9("Paid",EncounterPaidSite95(c.turn,outside,noTraversalControl)) /\ CompleteEncounter6(barrierInstructions,completed,TRUE) /\ ~PaidEncounterLive95([c EXCEPT !.encounter=completed]) /\ ~PaidEligibility95(d,[c EXCEPT !.encounter=completed],w) PaidEndedPaidSiteChecks95 == LET traversal == TraversalFixture92("ProcedureCode8b3260c0010f") target == [phase |-> "Movement",phaseId |-> 22,position |-> "outer",attacked |-> "SchemaAtom082"] control == [traversal |-> traversal,redirect |-> NoTraversalRedirect6,phaseStepsSkipped |-> FALSE,redirectCheckpointDue |-> FALSE, phaseEndedIds |-> {},paidOpen |-> TRUE,redirectStage |-> "NoValue",encounter |-> 20] deferred == [control EXCEPT !.redirect=target,!.phaseStepsSkipped=TRUE,!.traversal.usedPhaseIds=@ \cup {22},!.redirectStage="PaidWindow"] ended == [deferred EXCEPT !.paidOpen=FALSE,!.redirectStage="Checkpoint",!.redirectCheckpointDue=TRUE,!.phaseEndedIds={20}] d == PaidDefinitionFixture95(700,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0002","Play",TRUE,"Up") ELSE CardObject9("NeutralValue00016","Play",TRUE,"Up")] e == [OpenEncounter6(20,2,2,FALSE,"traversal",<<301>>) EXCEPT !.stage="Paid"] c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.traversal=deferred.traversal,!.traversalControl=deferred,!.encounter=e, !.references["Encounter"].traversalId=2,!.subtypes[1]={"SchemaAtom086","SchemaAtom054"},!.subtypes[2]={"SchemaAtom040"},!.strengths[1].amount=4] endedContext == [c EXCEPT !.traversal=ended.traversal,!.traversalControl=ended] liveSite == EncounterPaidSite95(c.turn,e,deferred) endedSite == EncounterPaidSite95(c.turn,e,ended) w == ReadyFixture92(WindowFixture92(992,"Paid",liveSite,Empty9,0,NoTimingRef9)) interface == [d EXCEPT !.syntax.units= <> \o BaseUnits93("Paid"),!.canSuppressBarrierInstructions=TRUE, !.interfaceSubtype=[present |-> TRUE,name |-> "SchemaAtom040"]] IN /\ RequestTraversalRedirect6(control,deferred,target,TRUE,{}) /\ FinishRedirectPaidWindow6(deferred,ended,TRUE,{TraversalPhaseEndEvent6(deferred.traversal)}) /\ 20 \notin deferred.phaseEndedIds /\ 20 \in ended.phaseEndedIds /\ e.stage="Paid" /\ WindowSiteAllowed9("Paid",liveSite) /\ ~WindowSiteAllowed9("Paid",endedSite) /\ PaidEligibility95(d,c,w) /\ ~PaidEligibility95(d,endedContext,w) /\ PaidInterfaceTiming95(interface,c,liveSite) /\ ~PaidInterfaceTiming95(interface,endedContext,liveSite) /\ ~PaidEncounterLive95([c EXCEPT !.traversalControl.traversal.id=3]) PaidAbilityChecks9 == /\ PaidClassificationChecks95 /\ PaidTimingChecks95 /\ PaidInterruptTimingChecks95 /\ PaidLifecycleChecks95 /\ PaidSpecimen0090Checks95 /\ PaidExampleFamily040Checks95 /\ PaidExampleFamily048Checks95 /\ PaidMidItemInspectionChecks95 /\ PaidContinuationChecks95 /\ PaidForfeitChecks95 /\ PaidConvertedCounterChecks95 /\ PaidRepeatChecks95 /\ PaidRetainedApproachChecks95 /\ PaidEndedEncounterChecks95 /\ PaidEndedPaidSiteChecks95 ConditionalDefinitionFixture96(id,card,primary,eventKind,subject,actor,side) == LET syntax == SyntaxFixture93(id,"Conditional",CardFacts9[card].side,CardFacts9[card].kind, <>) IN [syntax |-> syntax,activity |-> AbilityDefinition9(id,"Conditional",syntax.source,"Printed"), primaryKind |-> primary,primaryCondition |-> 1,instructions |-> <<700>>,instructionHasWould |-> FALSE, trigger |-> [kinds |-> {eventKind},subject |-> subject,actor |-> actor,side |-> side],triggerRequirements |-> {}, effectChoices |-> {{1}},optionalParts |-> {},partsByInstruction |-> [i \in {700} |-> {1}],delayedEffect |-> 0,thisTraversal |-> FALSE] ConditionalCardActivityFixture96(o) == IF o.form="Counter" THEN o.kind="SchemaAtom043" ELSE o.zone \in {"SideAObjectiveCompletion","SideBObjectiveCompletion","SideAProfile","SideBProfile"} \/ (o.zone="Play" /\ o.deployed /\ (IF o.side="SideB" THEN o.face="Up" ELSE ActivationStatus8(o)="ItemActivated")) ConditionalSnapshotFixture96(id,checkpointId,point,definitions,objects) == [id |-> id,checkpointId |-> checkpointId,point |-> point,definitions |-> definitions,objects |-> objects, present |-> {definitions[key].syntax.id : key \in DOMAIN definitions}, ordinaryActivity |-> [key \in DOMAIN definitions |-> IF definitions[key].syntax.source.kind="Object" THEN IF definitions[key].syntax.source.object \in DOMAIN objects THEN ConditionalCardActivityFixture96(objects[definitions[key].syntax.source.object]) ELSE FALSE ELSE FALSE], cardActivity |-> [object \in DOMAIN objects |-> ConditionalCardActivityFixture96(objects[object])], activationEpoch |-> [key \in DOMAIN definitions |-> 0],activationSerial |-> 0,activity |-> ActivityContext9,points |-> [p \in SetupPlayers |-> 0], progress |-> [object \in DOMAIN objects |-> 0],link |-> [p \in SetupPlayers |-> IF p="SideB" THEN 1 ELSE 0], exposureMarkers |-> [p \in SetupPlayers |-> 0],objectiveCompletionEvents |-> {},usedObjects |-> DOMAIN objects,holds |-> Empty9,effects |-> Empty9] ConditionalEventFixture96(id,kind,object,actor,side,snapshot,effectId) == [id |-> id,kind |-> kind,object |-> object,actor |-> actor,side |-> side,snapshot |-> snapshot,effectId |-> effectId, movement |-> [tag |-> "NoValue",oldObject |-> 0,newObject |-> 0,beforeSnapshot |-> snapshot], scopeKind |-> "Global",scopeDefinition |-> [ability |-> 0,source |-> RuleAbilitySource9("NoValue")],structure |-> NoTimingRef9, step |-> "NoValue",traversal |-> NoTraversal6,siteInspection |-> [traversalId |-> 0,origin |-> "NoValue"]] ConditionalTriggerReceiptFixture96(d,event) == [tag |-> "ConditionalTriggerStipulations",ability |-> d.syntax.id,source |-> d.syntax.source,occurrence |-> event.id, snapshotId |-> event.snapshot.id,results |-> [id \in d.triggerRequirements |-> TRUE]] ConditionalCheckpointFixture96(before,id,beginSnapshot,processingSnapshot,events) == [tag |-> "ConditionalCheckpoint",point |-> "ProcedureCodee605a78f5d5e",id |-> id,previousCheckpoint |-> before.lastCheckpoint,serial |-> before.serial+1, previousSnapshot |-> before.lastSnapshot,beginSnapshot |-> beginSnapshot,processingSnapshot |-> processingSnapshot, stepSerial |-> before.stepSerial,occurrences |-> events,caller |-> [kind |-> "Observation"]] ConditionalConditionsFixture96(definitions,events) == [key \in DOMAIN definitions |-> [id \in DOMAIN events |-> ConditionalTriggerReceiptFixture96(definitions[key],events[id])]] ConditionalBindingsFixture96(keys,checkpoint,windowId,group) == [key \in keys |-> [kind |-> "Reaction",checkpointId |-> checkpoint,windowId |-> windowId,group |-> group]] ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,holds) == LET stable == ConditionalActivityLedger96(before,definitions,cp.processingSnapshot) ids == {allocation[key] : key \in DOMAIN allocation} IN [stable EXCEPT !.activationEpoch=cp.processingSnapshot.activationEpoch,!.lastCheckpoint=cp.id,!.checkpointIds=@ \cup {cp.id}, !.checkpoints=[id \in DOMAIN @ \cup {cp.id} |-> IF id=cp.id THEN [caller |-> cp.caller] ELSE @[id]],!.serial=cp.serial,!.lastSnapshot=cp.processingSnapshot, !.processed=@ \cup DOMAIN cp.occurrences,!.holds=[key \in DOMAIN @ \cup DOMAIN holds |-> IF key \in DOMAIN holds THEN holds[key] ELSE @[key]], !.instances=[id \in DOMAIN @ \cup ids |-> IF id \in ids THEN LET key == CHOOSE k \in DOMAIN allocation : allocation[k]=id IN NewConditionalInstance96(id,definitions[key.definition],cp,key.occurrence,bindings[key].windowId,bindings[key].group) ELSE @[id]]] ConditionalMultiplicityChecks96 == LET d == ConditionalDefinitionFixture96(800,"Specimen0110","Trigger","Retireed","SchemaAtom016","SideB","SideA") definitions == [key \in {ConditionalKey96(d)} |-> d] objects == [id \in {1,2,3,4} |-> IF id=1 THEN [CardObject9("Specimen0110","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE CardObject9(IF id=2 THEN "Specimen0221" ELSE IF id=3 THEN "Specimen0148" ELSE "Specimen0196","Play",TRUE,"Down")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) before == NewConditionalLedger96(initial) events == [id \in 11..13 |-> ConditionalEventFixture96(id,"Retireed",id-9,"SideB","SideA",initial,500)] afterObjects == [id \in {1,12,13,14} |-> IF id=1 THEN objects[1] ELSE CardObject9(objects[id-10].card,"SideADiscard",FALSE,"Up")] begin == [ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",definitions,afterObjects) EXCEPT !.usedObjects=DOMAIN objects \cup DOMAIN afterObjects] current == [ConditionalSnapshotFixture96(11,1,"ProcedureCodee605a78f5d5e",definitions,afterObjects) EXCEPT !.usedObjects=DOMAIN objects \cup DOMAIN afterObjects] cp == ConditionalCheckpointFixture96(before,1,begin,current,events) keys == {[definition |-> ConditionalKey96(d),occurrence |-> id] : id \in 11..13} allocation == [key \in keys |-> key.occurrence+100] bindings == ConditionalBindingsFixture96(keys,1,400,40) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) members == ConditionalWindowMembers96(after.instances,400) site == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3) opening == OpeningFixture92(400,"Reaction",site,members,40,NoTimingRef9) window == WindowFixture92(400,"Reaction",site,members,40,NoTimingRef9) IN /\ CardFacts9["NeutralValue00015"].kind="Action" /\ ConditionalDefinitionValid96(d) /\ ProcessConditionalCheckpoint96(before,after,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ DOMAIN after.instances=111..113 /\ Cardinality(DOMAIN members)=3 /\ \A id \in DOMAIN members : members[id].ability=800 /\ members[id].source=d.syntax.source /\ members[id].windowId=400 /\ OpenConditionalReaction96(<<>>,<>,after,400,site,opening,{}) /\ ~ProcessConditionalCheckpoint96(before,after,<>,<>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{400}) /\ ~ProcessConditionalCheckpoint96(after,after,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ \A count \in 0..3 : LET es == [id \in 11..(10+count) |-> events[id]] c == [cp EXCEPT !.occurrences=es] ks == {[definition |-> ConditionalKey96(d),occurrence |-> id] : id \in DOMAIN es} alloc == [key \in ks |-> key.occurrence+100] b == ConditionalBindingsFixture96(ks,1,400,40) result == ConditionalCommittedFixture96(before,definitions,c,alloc,b,Empty9) IN ProcessConditionalCheckpoint96(before,result,<<>>,<<>>,definitions,c,ConditionalConditionsFixture96(definitions,es),alloc,b,Empty9,Empty9,{}) /\ Cardinality(DOMAIN result.instances)=count ConditionalDepartureScenario96(card,abilityId,count,eventKind) == LET original == ConditionalDefinitionFixture96(abilityId,card,"Trigger",eventKind,IF count=3 THEN "SchemaAtom016" ELSE "SchemaAtom149",IF count=3 THEN "SideB" ELSE "SchemaAtom016",IF count=3 THEN "SideA" ELSE "SchemaAtom016") definition == ReboundConditionalDefinition96(original,11) oldKey == ConditionalKey96(original) key == ConditionalKey96(definition) oldDefinitions == [k \in {oldKey} |-> original] definitions == [k \in {key} |-> definition] objects == [i \in 1..count |-> IF i=1 THEN [CardObject9(card,"Play",TRUE,"Up") EXCEPT !.activated=count=3] ELSE CardObject9(IF i=2 THEN "Specimen0221" ELSE "Specimen0148","Play",TRUE,"Down")] afterObjects == [i \in 11..(10+count) |-> CardObject9(objects[i-10].card,IF count=3 THEN "SideADiscard" ELSE "SideBDeck",FALSE,IF count=3 THEN "Up" ELSE "Down")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",oldDefinitions,objects) ledger == NewConditionalLedger96(initial) epochs == [k \in {oldKey,key} |-> IF k=oldKey THEN 1 ELSE 0] moved == [ledger EXCEPT !.activationEpoch=epochs,!.activationSerial=1] moveSnapshot == [ConditionalSnapshotFixture96(2,0,"AfterSourceMove",definitions,afterObjects) EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.usedObjects=DOMAIN objects \cup DOMAIN afterObjects] events == [i \in 101..(100+count) |-> [ConditionalEventFixture96(i,eventKind,i-100,"SideB",IF count=3 THEN "SideA" ELSE "SideB",initial,500) EXCEPT !.movement=[tag |-> "SourceZoneChange",oldObject |-> i-100,newObject |-> i-90,beforeSnapshot |-> initial]]] begin == [moveSnapshot EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [moveSnapshot EXCEPT !.id=11,!.checkpointId=1,!.point="ProcedureCodee605a78f5d5e"] cp == ConditionalCheckpointFixture96(moved,1,begin,current,events) keys == {[definition |-> key,occurrence |-> i] : i \in DOMAIN events} allocation == [k \in keys |-> k.occurrence+100] bindings == ConditionalBindingsFixture96(keys,1,400,40) conditions == [k \in {key} |-> [i \in DOMAIN events |-> ConditionalTriggerReceiptFixture96(original,events[i])]] ids == {allocation[k] : k \in keys} receipt == [oldObject |-> 1,newObject |-> 11,ability |-> abilityId,matchingInstances |-> ids,matchingOccurrences |-> DOMAIN events,effectId |-> 500] departure == [tag |-> "ConditionalDepartureRecognition",checkpointId |-> 1,originalDefinition |-> original,oldObject |-> 1,newObject |-> 11, beforeSnapshot |-> initial,effectId |-> 500,holdReceipt |-> receipt] hold == [ability |-> abilityId,object |-> 11,instances |-> ids] holds == [k \in {key} |-> hold] departures == [k \in {key} |-> departure] after == ConditionalCommittedFixture96(moved,definitions,cp,allocation,bindings,holds) IN [original |-> original,definition |-> definition,key |-> key,oldKey |-> oldKey,objects |-> objects,afterObjects |-> afterObjects, initial |-> initial,ledger |-> ledger,moved |-> moved,moveSnapshot |-> moveSnapshot,definitions |-> definitions,cp |-> cp, conditions |-> conditions,allocation |-> allocation,bindings |-> bindings,departures |-> departures,holds |-> holds,after |-> after] ConditionalDepartureChecks96 == LET s == ConditionalDepartureScenario96("Specimen0110",800,3,"Retireed") d == s.definition hold == s.holds[s.key] current == SnapshotWithConditionalRegistry96(s.cp.processingSnapshot,s.after) oneDone == [s.after EXCEPT !.instances[201].status="Complete"] allDone == [s.after EXCEPT !.instances=[i \in DOMAIN @ |-> [@[i] EXCEPT !.status="Complete"]]] badProvider == [s.original EXCEPT !.activity.provider="Lingering",!.delayedEffect=99] badProviderBefore == [s.initial EXCEPT !.definitions=[key \in {ConditionalKey96(badProvider)} |-> badProvider]] badProviderDeparture == [s.departures[s.key] EXCEPT !.originalDefinition=badProvider,!.beforeSnapshot=badProviderBefore] badProviderEvents == [i \in DOMAIN s.cp.occurrences |-> [s.cp.occurrences[i] EXCEPT !.movement.beforeSnapshot=badProviderBefore]] badProviderCP == [s.cp EXCEPT !.occurrences=badProviderEvents] IN /\ s.ledger.instances=Empty9 /\ ~s.cp.processingSnapshot.cardActivity[11] /\ ObserveConditionalActivity96(s.ledger,s.ledger,s.moved,<<>>,<<>>,s.initial,s.moveSnapshot) /\ ProcessConditionalCheckpoint96(s.moved,s.after,<<>>,<<>>,s.definitions,s.cp,s.conditions,s.allocation,s.bindings,s.departures,s.holds,{}) /\ DOMAIN s.after.instances=201..203 /\ hold.instances=201..203 /\ ~ConditionalActive96(d,s.cp.processingSnapshot) /\ ConditionalActive96(d,current) /\ DepartureHoldLive9(hold,d.activity,s.afterObjects,ConditionalActivityRows96(s.after.instances)) /\ ConditionalActive96(d,SnapshotWithConditionalRegistry96(s.cp.processingSnapshot,oneDone)) /\ ~ConditionalActive96(d,SnapshotWithConditionalRegistry96(s.cp.processingSnapshot,allDone)) /\ \A i \in 201..203 : s.after.instances[i].member.source=ObjectAbilitySource9(11) /\ s.after.instances[i].definitionCopy=d /\ ~DepartureAuthority96(ReboundConditionalDefinition96(badProvider,11),badProviderCP,s.conditions[s.key],s.allocation,badProviderDeparture,hold) /\ ~DepartureAuthority96(d,s.cp,s.conditions[s.key],s.allocation,[s.departures[s.key] EXCEPT !.newObject=12],hold) /\ ~ProcessConditionalCheckpoint96(s.moved,ConditionalCommittedFixture96(s.moved,s.definitions,s.cp,s.allocation,s.bindings,[s.holds EXCEPT ![s.key].instances={201}]),<<>>,<<>>, s.definitions,s.cp,s.conditions,s.allocation,s.bindings,[s.departures EXCEPT ![s.key].holdReceipt.matchingInstances={201}],[s.holds EXCEPT ![s.key].instances={201}],{}) ConditionalMixedDepartureChecks96 == LET s == ConditionalDepartureScenario96("Specimen0110",800,3,"Retireed") d == s.original definitions == [key \in {s.oldKey} |-> d] objects == [id \in 1..5 |-> IF id \in 1..3 THEN s.objects[id] ELSE CardObject9(IF id=4 THEN "Specimen0160" ELSE "Specimen0196","Play",TRUE,"Down")] oldWorld == [id \in {1,2,3,14,15} |-> IF id \in 1..3 THEN s.objects[id] ELSE CardObject9(objects[id-10].card,"SideADiscard",FALSE,"Up")] initial == ConditionalSnapshotFixture96(100,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) events == [id \in {90,91} |-> ConditionalEventFixture96(id,"Retireed",id-86,"SideB","SideA",initial,499)] begin1 == [ConditionalSnapshotFixture96(110,1,"CheckpointBeginning",definitions,oldWorld) EXCEPT !.usedObjects=DOMAIN objects \cup DOMAIN oldWorld] current1 == [begin1 EXCEPT !.id=111,!.point="ProcedureCodee605a78f5d5e"] cp1 == ConditionalCheckpointFixture96(seed,1,begin1,current1,events) keys1 == {[definition |-> s.oldKey,occurrence |-> id] : id \in {90,91}} alloc1 == [key \in keys1 |-> key.occurrence+211] bind1 == ConditionalBindingsFixture96(keys1,1,399,39) prior == ConditionalCommittedFixture96(seed,definitions,cp1,alloc1,bind1,Empty9) site == TurnSiteFixture92("SideA","ProcedureCoded6fbcb09dd4f",3) members == ConditionalWindowMembers96(prior.instances,399) open == WindowFixture92(399,"Reaction",site,members,39,NoTimingRef9) begin2 == SnapshotWithConditionalRegistry96([begin1 EXCEPT !.id=120,!.checkpointId=2],prior) current2 == [begin2 EXCEPT !.id=121,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(prior,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] receiption == ConditionalCommittedFixture96(prior,definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,302) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(302,d,ready,option,LegalityFixture92(ready,option).transactionId,"Play") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [receiption EXCEPT !.instances[302].status="Imminent"] plan == OpenInstruction93(700,"Ability",302,d.syntax.source,"Play",1,"NoValue",<<"NetDamageSideB">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent",!.targets={}] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {"NetDamageSideB"}] resolving == [selected EXCEPT !.instances[302].status="Resolving",!.instances[302].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> expected.effects]]] beforeMove == [SnapshotWithConditionalRegistry96(current2,resolving) EXCEPT !.id=130,!.point="BeforeSourceMove"] newWorld == [id \in {11,12,13,14,15} |-> IF id \in 11..13 THEN s.afterObjects[id] ELSE oldWorld[id]] epochs == [key \in {s.oldKey,s.key} |-> IF key=s.oldKey THEN 1 ELSE 0] moved == [resolving EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.instances[301].status="Lost"] afterMove == [ConditionalSnapshotFixture96(131,2,"AfterSourceMove",s.definitions,newWorld) EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.usedObjects=beforeMove.usedObjects \cup DOMAIN newWorld, !.activity.instances=ConditionalActivityRows96(resolving.instances)] movedStack == [busy EXCEPT !.pending={},!.lostPending={301}] newEvents == [id \in 101..103 |-> [s.cp.occurrences[id] EXCEPT !.snapshot=beforeMove,!.movement.beforeSnapshot=beforeMove]] begin3 == [SnapshotWithConditionalRegistry96(afterMove,moved) EXCEPT !.id=140,!.checkpointId=3,!.point="CheckpointBeginning"] current3 == [begin3 EXCEPT !.id=141,!.point="ProcedureCodee605a78f5d5e"] cp3 == ConditionalCheckpointFixture96(moved,3,begin3,current3,newEvents) bindings == ConditionalBindingsFixture96(DOMAIN s.allocation,3,400,40) conditions == [key \in {s.key} |-> [id \in DOMAIN newEvents |-> ConditionalTriggerReceiptFixture96(d,newEvents[id])]] departures == [key \in {s.key} |-> [s.departures[s.key] EXCEPT !.checkpointId=3,!.beforeSnapshot=beforeMove]] after == ConditionalCommittedFixture96(moved,s.definitions,cp3,s.allocation,bindings,s.holds) IN /\ ProcessConditionalCheckpoint96(seed,prior,<<>>,<<>>,definitions,cp1,ConditionalConditionsFixture96(definitions,events),alloc1,bind1,Empty9,Empty9,{}) /\ prior.instances[301].checkpointId=1 /\ prior.instances[301].activationEpoch=0 /\ OpenConditionalReaction96(<<>>,<>,prior,399,site,OpeningFixture92(399,"Reaction",site,members,39,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(prior,receiption,<>,<>,definitions,cp2,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{399}) /\ CheckpointPriorityWithConditionals96(receiption,<>,<>,[CheckpointFixture92(open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(receiption,selected,<>,<>,p,imminentP,d,SnapshotWithConditionalRegistry96(current2,receiption),302,option,LegalityFixture92(ready,option),Empty9, plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(selected,resolving,<>,imminentP,resolvingP,imminentPlan,resolvingPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0),expected) /\ resolving.instances[302].status="Resolving" /\ resolving.instances[301].status="Pending" /\ ObserveConditionalActivity96(resolving,resolving,moved,<>,<>,beforeMove,afterMove) /\ ProcessConditionalCheckpoint96(moved,after,<>,<>,s.definitions,cp3,conditions,s.allocation,bindings,departures,s.holds,{399}) /\ after.instances[301].status="Lost" /\ after.instances[301].member.source=ObjectAbilitySource9(1) /\ after.instances[302]=resolving.instances[302] /\ after.instances[302].member.source=ObjectAbilitySource9(1) /\ \A id \in 201..203 : after.instances[id].member.source=ObjectAbilitySource9(11) /\ after.instances[id].checkpointId=3 /\ after.lastCheckpoint=3 /\ after.instances[201].hadSnapshot=receiption.lastSnapshot ConditionalSpecimen0150LifecycleChecks96 == LET s == ConditionalDepartureScenario96("Specimen0150",801,1,"Uninstalled") d == s.definition turn == [TurnFixture92("SideB") EXCEPT !.phase="Discard"] endedTurn == [turn EXCEPT !.formalEnded=TRUE] site == TurnPrioritySite9(endedTurn,"ProcedureCode8f113080e47f",10,0,TurnContextFixture92(endedTurn,"ProcedureCode8f113080e47f")) members == ConditionalWindowMembers96(s.after.instances,400) open == WindowFixture92(400,"Reaction",site,members,40,NoTimingRef9) begin2 == SnapshotWithConditionalRegistry96([s.cp.beginSnapshot EXCEPT !.id=220,!.checkpointId=2],s.after) current2 == [begin2 EXCEPT !.id=221,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(s.after,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] received == ConditionalCommittedFixture96(s.after,s.definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,201) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(201,d,ready,option,LegalityFixture92(ready,option).transactionId,"SideBDeck") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received EXCEPT !.instances[201].status="Imminent"] plan == OpenInstruction93(700,"Ability",201,d.syntax.source,"SideBDeck",1,"NoValue",<<"RemoveSource">>,TRUE) targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={11}] imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={11},!.phase="Imminent"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {11}] atomicP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] atomicPlan == [imminentPlan EXCEPT !.phase="Resolving"] atomic == [selected EXCEPT !.instances[201].status="Resolving",!.instances[201].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {11}]]] beforeRemoval == [SnapshotWithConditionalRegistry96(current2,atomic) EXCEPT !.id=230,!.point="BeforeRemoval"] nextDefinition == ReboundConditionalDefinition96(d,21) nextKey == ConditionalKey96(nextDefinition) nextDefinitions == [key \in {nextKey} |-> nextDefinition] removedObjects == [id \in {21} |-> CardObject9("Specimen0150","Removed",FALSE,"Up")] epochs == [key \in {s.oldKey,s.key,nextKey} |-> IF key=nextKey THEN 0 ELSE 1] removed == [atomic EXCEPT !.activationEpoch=epochs,!.activationSerial=2] afterRemoval == [ConditionalSnapshotFixture96(231,2,"AfterRemoval",nextDefinitions,removedObjects) EXCEPT !.activationEpoch=epochs,!.activationSerial=2,!.holds=atomic.holds,!.activity.instances=ConditionalActivityRows96(atomic.instances), !.usedObjects=beforeRemoval.usedObjects \cup {21}] execution == [tag |-> "ConditionalEffectExecution",instruction |-> InstructionWindowRef93(atomicPlan),abilityInstance |-> 201,source |-> d.syntax.source,partIds |-> {1}] completeP == [atomicP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [atomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"RemoveSource">>] complete == [removed EXCEPT !.instances[201].status="Complete"] begin3 == [SnapshotWithConditionalRegistry96(afterRemoval,complete) EXCEPT !.id=240,!.checkpointId=3,!.point="CheckpointBeginning"] current3 == [begin3 EXCEPT !.id=241,!.point="ProcedureCodee605a78f5d5e"] removedEvent == [id \in {200} |-> ConditionalEventFixture96(id,"RemovedFromGame",11,"SideB","SideB",beforeRemoval,700)] cp3 == [ConditionalCheckpointFixture96(complete,3,begin3,current3,removedEvent) EXCEPT !.caller=ConditionalInstructionCaller96(completeP)] drained == ConditionalCommittedFixture96(complete,nextDefinitions,cp3,Empty9,Empty9,Empty9) finalP == [completeP EXCEPT !.phase="Complete",!.checkpoint=3] returnedP == [finalP EXCEPT !.phase="Returned",!.ability.returned=TRUE] resumed == CompletePriorityOptionFrame9(busy) checkpoint == [tag |-> "ConditionalInstructionCheckpoint",id |-> 3,abilityInstance |-> 201,transactionId |-> p.transaction, source |-> d.syntax.source,instruction |-> 700,index |-> 1,complete |-> TRUE,allNewerChainsComplete |-> TRUE] IN /\ CardFacts9["Specimen0236"].kind="Action" /\ TurnFormalEnd5(turn,endedTurn,TRUE,TurnEndEvents5(turn)) /\ ObserveConditionalActivity96(s.ledger,s.ledger,s.moved,<<>>,<<>>,s.initial,s.moveSnapshot) /\ ProcessConditionalCheckpoint96(s.moved,s.after,<<>>,<<>>,s.definitions,s.cp,s.conditions,s.allocation,s.bindings,s.departures,s.holds,{}) /\ OpenConditionalReaction96(<<>>,<>,s.after,400,site,OpeningFixture92(400,"Reaction",site,members,40,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.after,received,<>,<>,s.definitions,cp2,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{400}) /\ CheckpointPriorityWithConditionals96(received,<>,<>,[CheckpointFixture92(open) EXCEPT !.id=2]) /\ ~AbilityIsResolving9(p.ability) /\ BeginConditionalResolution96(received,selected,<>,<>,p,imminentP,d,SnapshotWithConditionalRegistry96(current2,received),201,option,LegalityFixture92(ready,option),Empty9, plan,imminentPlan,targets,InstructionEntryFixture93(plan),Empty9,[tag |-> "AbilityRestrictions",ability |-> 801,source |-> d.syntax.source,results |-> Empty9]) /\ selected.instances[201].status="Imminent" /\ 201 \notin busy.pending /\ busy.triggered={201} /\ AbilityIsResolving9(imminentP.ability) /\ DetachedSourceTarget9(imminentP.ability,s.afterObjects,11) /\ ResolveConditionalWithoutInterrupt96(selected,atomic,<>,imminentP,atomicP,imminentPlan,atomicPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0),expected) /\ atomic.instances[201].expected[1].effects={11} /\ RecordConditionalExecutionUse96(atomic,atomic,atomicP,atomicPlan,execution,Empty9,Empty9,Empty9,Empty9,0,{}) /\ ObserveConditionalActivity96(atomic,atomic,removed,<>,<>,beforeRemoval,afterRemoval) /\ removed.instances[201].status="Resolving" /\ removed.instances[201].member.source=ObjectAbilitySource9(11) /\ ~DetachedSourceTarget9(atomicP.ability,removedObjects,21) /\ CarryConditionalInstruction96(removed,complete,complete,<>,<>,atomicP,completeP,atomicPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "RemoveSource",complete |-> TRUE], SnapshotWithConditionalRegistry96(afterRemoval,removed),SnapshotWithConditionalRegistry96(afterRemoval,complete)) /\ complete.instances[201].status="Complete" /\ ~AbilityIsResolving9(completeP.ability) /\ ~complete.instances[201].used /\ ProcessConditionalCheckpoint96(complete,drained,<>,<>,nextDefinitions,cp3,ConditionalConditionsFixture96(nextDefinitions,removedEvent),Empty9,Empty9,Empty9,Empty9,{400}) /\ ConditionalInstructionCheckpoint96(drained,<>,completeP,finalP,checkpoint) /\ ~ConditionalInstructionCheckpoint96(drained,<>,completeP,finalP,[checkpoint EXCEPT !.allNewerChainsComplete=FALSE]) /\ FinishConditionalProcedure96(<>,<>,finalP,returnedP,PaidReturnFixture95(busy,3)) /\ resumed.stage="NeedCheckpoint" /\ ActionablePriority9(<>)={} /\ drained.instances[201].status="Complete" ConditionalPendingScenario96(d,points) == LET key == ConditionalKey96(d) definitions == [k \in {key} |-> d] objects == [id \in {1,2} |-> IF id=1 THEN [CardObject9("Specimen0110","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE CardObject9("Specimen0221","Play",TRUE,"Down")] afterObjects == [id \in {1,12} |-> IF id=1 THEN objects[1] ELSE CardObject9("Specimen0221","SideADiscard",FALSE,"Up")] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) EXCEPT !.points=points] before == NewConditionalLedger96(initial) events == [id \in {100} |-> ConditionalEventFixture96(id,"Retireed",2,"SideB","SideA",initial,500)] begin == [ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",definitions,afterObjects) EXCEPT !.points=points,!.usedObjects=DOMAIN objects \cup DOMAIN afterObjects] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp == ConditionalCheckpointFixture96(before,1,begin,current,events) keys == {[definition |-> key,occurrence |-> 100]} allocation == [k \in keys |-> 201] bindings == ConditionalBindingsFixture96(keys,1,400,40) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) IN [key |-> key,definitions |-> definitions,objects |-> objects,afterObjects |-> afterObjects,before |-> before,cp |-> cp, allocation |-> allocation,bindings |-> bindings,events |-> events,after |-> after] ConditionalEpochChecks96 == LET d == ConditionalDefinitionFixture96(810,"Specimen0110","Trigger","Retireed","SchemaAtom016","SideB","SideA") s == ConditionalPendingScenario96(d,[p \in SetupPlayers |-> 0]) members == ConditionalWindowMembers96(s.after.instances,400) w == ReadyFixture92(WindowFixture92(400,"Reaction",TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3),members,40,NoTimingRef9)) old == s.after.instances[201] beforeSnapshot == SnapshotWithConditionalRegistry96(s.cp.processingSnapshot,s.after) downObjects == [s.afterObjects EXCEPT ![1].face="Down",![1].activated=FALSE] epochs == [key \in {s.key} |-> 1] downSnapshot == [ConditionalSnapshotFixture96(20,1,"AfterDeactivation",s.definitions,downObjects) EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.activity.instances=ConditionalActivityRows96(s.after.instances)] lost == [s.after EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.instances[201].status="Lost"] lostWindow == [w EXCEPT !.pending={},!.lostPending={201}] downPublished == SnapshotWithConditionalRegistry96(downSnapshot,lost) upSnapshot == [ConditionalSnapshotFixture96(21,1,"AfterActivation",s.definitions,s.afterObjects) EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.activity.instances=ConditionalActivityRows96(lost.instances)] activation == [OpenActivation8(900,1,"effect") EXCEPT !.stage="TurnFaceUp",!.transaction=901] activated == [activation EXCEPT !.stage="Complete",!.complete=TRUE,!.result="ItemActivated"] IN /\ ProcessConditionalCheckpoint96(s.before,s.after,<<>>,<<>>,s.definitions,s.cp,ConditionalConditionsFixture96(s.definitions,s.events),s.allocation,s.bindings,Empty9,Empty9,{}) /\ DeactivationConditionalCard96(s.after,lost,<>,<>,beforeSnapshot,downSnapshot,1,TRUE,{[tag |-> "Deactivation",object |-> 1]}) /\ lost.instances[201].activationEpoch=0 /\ lost.activationEpoch[s.key]=1 /\ lost.instances[201].status="Lost" /\ lostWindow.members=w.members /\ lostWindow.pending={} /\ FinishActivationConditionalCard96(lost,lost,<>,<>,downPublished,upSnapshot,activation,activated,TRUE,{[tag |-> "Activation",object |-> 1,activationId |-> 900]}) /\ ConditionalActive96(d,upSnapshot) /\ ~ConditionalInstanceCurrent96(old,s.definitions,upSnapshot) /\ lost.instances[201].status="Lost" /\ ~ConditionalSnapshotBound96(upSnapshot,s.after) /\ \A mode \in {"Presence","Threat"} : LET definition == IF mode="Presence" THEN d ELSE [d EXCEPT !.syntax.units= <>] t == ConditionalPendingScenario96(definition,[p \in SetupPlayers |-> IF p="SideA" THEN 2 ELSE 0]) b == SnapshotWithConditionalRegistry96(t.cp.processingSnapshot,t.after) e == [key \in {t.key} |-> 1] missing == [b EXCEPT !.id=30,!.activationEpoch=e,!.activationSerial=1, !.present=IF mode="Presence" THEN {} ELSE @,!.points=IF mode="Threat" THEN [p \in SetupPlayers |-> 0] ELSE @] result == [t.after EXCEPT !.activationEpoch=e,!.activationSerial=1,!.instances[201].status="Lost"] restored == [b EXCEPT !.id=31,!.activationEpoch=e,!.activationSerial=1,!.activity.instances=ConditionalActivityRows96(result.instances)] IN /\ ProcessConditionalCheckpoint96(t.before,t.after,<<>>,<<>>,t.definitions,t.cp,ConditionalConditionsFixture96(t.definitions,t.events),t.allocation,t.bindings,Empty9,Empty9,{}) /\ ObserveConditionalActivity96(t.after,t.after,result,<<>>,<<>>,b,missing) /\ ObserveConditionalActivity96(result,result,result,<<>>,<<>>,SnapshotWithConditionalRegistry96(missing,result),restored) /\ ConditionalActive96(definition,restored) /\ result.instances[201].status="Lost" /\ ~ConditionalInstanceCurrent96(t.after.instances[201],t.definitions,restored) /\ LET stale == [d EXCEPT !.activity.statedZones={"SideAHand"}] changed == [beforeSnapshot EXCEPT !.id=40,!.definitions=[key \in {s.key} |-> stale]] lostCopy == [s.after EXCEPT !.instances[201].status="Lost"] IN /\ ~ConditionalDefinitionsStable96(beforeSnapshot,changed) /\ ~ObserveConditionalActivity96(s.after,s.after,lostCopy,<<>>,<<>>,beforeSnapshot,changed) /\ ~ConditionalInstanceCurrent96(old,changed.definitions,changed) ConditionalUseScenario96(d,card) == LET key == ConditionalKey96(d) definitions == [k \in {key} |-> d] objects == [id \in {1} |-> CardObject9(card,"Play",TRUE,"Up")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) events == [id \in {100} |-> ConditionalEventFixture96(id,"TurnBegins",0,"SideB","SideB",initial,500)] begin1 == [initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current1 == [begin1 EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp1 == ConditionalCheckpointFixture96(seed,1,begin1,current1,events) keys == {[definition |-> key,occurrence |-> 100]} alloc == [k \in keys |-> 201] bindings == ConditionalBindingsFixture96(keys,1,400,40) pending == ConditionalCommittedFixture96(seed,definitions,cp1,alloc,bindings,Empty9) site == TurnSiteFixture92("SideB","ProcedureCodef53fc09e15ad",4) members == ConditionalWindowMembers96(pending.instances,400) open == WindowFixture92(400,"Reaction",site,members,40,NoTimingRef9) begin2 == SnapshotWithConditionalRegistry96([begin1 EXCEPT !.id=20,!.checkpointId=2],pending) current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(pending,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] reception == ConditionalCommittedFixture96(pending,definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,201) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(201,d,ready,option,LegalityFixture92(ready,option).transactionId,"Play") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == OpenInstruction93(700,"Ability",201,d.syntax.source,"Play",1,"NoValue",<<"Effect">>,FALSE) imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] selected == [reception EXCEPT !.instances[201].status="Imminent"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {1}] resolving == [selected EXCEPT !.instances[201].status="Resolving",!.instances[201].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {1}]]] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] IN [definition |-> d,key |-> key,definitions |-> definitions,seed |-> seed,events |-> events,cp1 |-> cp1,alloc |-> alloc,bindings |-> bindings,pending |-> pending, site |-> site,open |-> open,cp2 |-> cp2,reception |-> reception,ready |-> ready,option |-> option,busy |-> busy,p |-> p,imminentP |-> imminentP, plan |-> plan,imminentPlan |-> imminentPlan,selected |-> selected,current |-> current2,expected |-> expected,resolving |-> resolving,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan] ConditionalUseScenarioValid96(s) == /\ ProcessConditionalCheckpoint96(s.seed,s.pending,<<>>,<<>>,s.definitions,s.cp1,ConditionalConditionsFixture96(s.definitions,s.events),s.alloc,s.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,s.pending,400,s.site,OpeningFixture92(400,"Reaction",s.site,s.open.members,40,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.reception,<>,<>,s.definitions,s.cp2,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{400}) /\ CheckpointPriorityWithConditionals96(s.reception,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(s.reception,s.selected,<>,<>,s.p,s.imminentP,s.definition,SnapshotWithConditionalRegistry96(s.current,s.reception),201,s.option,LegalityFixture92(s.ready,s.option),Empty9, s.plan,s.imminentPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}],InstructionEntryFixture93(s.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> s.definition.syntax.id,source |-> s.definition.syntax.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(s.selected,s.resolving,<>,s.imminentP,s.resolvingP,s.imminentPlan,s.resolvingPlan,NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),s.expected) ConditionalExecutionFixture96(p,plan,parts) == [tag |-> "ConditionalEffectExecution",instruction |-> InstructionWindowRef93(plan),abilityInstance |-> p.id,source |-> p.ability.source,partIds |-> parts] ConditionalUsedEvent96(p,id) == [tag |-> "AbilityUsed",useId |-> id,abilityInstance |-> p.id,source |-> p.ability.source,player |-> p.definition.syntax.controller] ConditionalTurnUseRow96(p,id) == [turnId |-> p.turnId,ability |-> p.definition.syntax.id,source |-> p.ability.source,useId |-> id] ConditionalOptionalUseChecks96 == LET exampleFamily001 == [ConditionalDefinitionFixture96(840,"Specimen0007","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") EXCEPT !.effectChoices={{},{1}}] exampleFamily012 == ConditionalDefinitionFixture96(841,"Specimen0078","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") a == ConditionalUseScenario96(exampleFamily001,"Specimen0007") m == ConditionalUseScenario96(exampleFamily012,"Specimen0078") used == [a.resolving EXCEPT !.instances[201].used=TRUE] event == ConditionalUsedEvent96(a.resolvingP,1) uses == [i \in {1} |-> event] turns == [i \in {1} |-> ConditionalTurnUseRow96(a.resolvingP,1)] IN /\ ConditionalUseScenarioValid96(a) /\ ConditionalUseScenarioValid96(m) /\ ConditionalOptional96(exampleFamily001) /\ ~a.open.members[201].mandatory /\ ~ConditionalOptional96(exampleFamily012) /\ m.open.members[201].mandatory /\ ~a.selected.instances[201].used /\ ~a.resolving.instances[201].used /\ RecordConditionalExecutionUse96(a.resolving,a.resolving,a.resolvingP,a.resolvingPlan,ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{}),Empty9,Empty9,Empty9,Empty9,1,{}) /\ RecordConditionalExecutionUse96(m.resolving,m.resolving,m.resolvingP,m.resolvingPlan,ConditionalExecutionFixture96(m.resolvingP,m.resolvingPlan,{1}),Empty9,Empty9,Empty9,Empty9,1,{}) /\ RecordConditionalExecutionUse96(a.resolving,used,a.resolvingP,a.resolvingPlan,ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{1}),Empty9,uses,Empty9,turns,1,{event}) /\ RecordConditionalExecutionUse96(used,used,a.resolvingP,a.resolvingPlan,ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{1}),uses,uses,turns,turns,2,{}) /\ \A bad \in { [ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{1}) EXCEPT !.abilityInstance=202], [ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{1}) EXCEPT !.source=ObjectAbilitySource9(2)], [ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{1}) EXCEPT !.instruction.id=701], [ConditionalExecutionFixture96(a.resolvingP,a.resolvingPlan,{1}) EXCEPT !.partIds={1,2}]} : ~RecordConditionalExecutionUse96(a.resolving,used,a.resolvingP,a.resolvingPlan,bad,Empty9,uses,Empty9,turns,1,{event}) /\ LET structural == [exampleFamily012 EXCEPT !.effectChoices={{1},{1,2}},!.optionalParts={2},!.partsByInstruction=[i \in {700} |-> {1,2}]] s == ConditionalUseScenario96(structural,"Specimen0078") e == ConditionalUsedEvent96(s.resolvingP,1) after == [s.resolving EXCEPT !.instances[201].used=TRUE] IN /\ ConditionalUseScenarioValid96(s) /\ ~ConditionalOptional96(structural) /\ s.open.members[201].mandatory /\ RecordConditionalExecutionUse96(s.resolving,s.resolving,s.resolvingP,s.resolvingPlan,ConditionalExecutionFixture96(s.resolvingP,s.resolvingPlan,{1}),Empty9,Empty9,Empty9,Empty9,1,{}) /\ RecordConditionalExecutionUse96(s.resolving,after,s.resolvingP,s.resolvingPlan,ConditionalExecutionFixture96(s.resolvingP,s.resolvingPlan,{2}),Empty9,[i \in {1} |-> e],Empty9,[i \in {1} |-> ConditionalTurnUseRow96(s.resolvingP,1)],1,{e}) ConditionalOnceUseChecks96 == LET base == ConditionalDefinitionFixture96(842,"Specimen0007","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") d == [base EXCEPT !.syntax.units= <>] s == ConditionalUseScenario96(d,"Specimen0007") priorEvent == [ConditionalUsedEvent96(s.resolvingP,1) EXCEPT !.abilityInstance=202] prior == [i \in {1} |-> priorEvent] priorTurn == [i \in {1} |-> ConditionalTurnUseRow96(s.resolvingP,1)] event == ConditionalUsedEvent96(s.resolvingP,2) after == [s.resolving EXCEPT !.instances[201].used=TRUE] afterUses == [i \in {1,2} |-> IF i=1 THEN priorEvent ELSE event] afterTurn == [i \in {1,2} |-> IF i=1 THEN priorTurn[1] ELSE ConditionalTurnUseRow96(s.resolvingP,2)] execute == ConditionalExecutionFixture96(s.resolvingP,s.resolvingPlan,{1}) IN /\ ConditionalUseScenarioValid96(s) /\ ConditionalOptional96(d) /\ RecordAbilityUse9(Empty9,prior,1,202,d.syntax.source,"SideB",TRUE,{priorEvent}) /\ RecordTurnAbilityUse93(Empty9,priorTurn,d.syntax,s.p.turnId,[id |-> 202,ability |-> d.syntax.id,source |-> d.syntax.source],priorEvent) /\ ~RecordConditionalExecutionUse96(s.resolving,after,s.resolvingP,s.resolvingPlan,execute,prior,afterUses,priorTurn,afterTurn,2,{event}) /\ \A other \in {"SchemaAtom149","Turn","Ability"} : LET otherRow == [priorTurn[1] EXCEPT !.source=IF other="SchemaAtom149" THEN ObjectAbilitySource9(2) ELSE @, !.turnId=IF other="Turn" THEN @+1 ELSE @,!.ability=IF other="Ability" THEN @+1 ELSE @] beforeTurn == [i \in {1} |-> otherRow] expectedTurn == [i \in {1,2} |-> IF i=1 THEN otherRow ELSE ConditionalTurnUseRow96(s.resolvingP,2)] IN RecordConditionalExecutionUse96(s.resolving,after,s.resolvingP,s.resolvingPlan,execute,prior,afterUses,beforeTurn,expectedTurn,2,{event}) /\ RecordConditionalExecutionUse96(after,after,s.resolvingP,s.resolvingPlan,execute,afterUses,afterUses,afterTurn,afterTurn,3,{}) ConditionalTraversalCleanupChecks96 == LET d == ConditionalDefinitionFixture96(850,"Specimen0110","Trigger","Retireed","SchemaAtom016","SideB","SideA") key == ConditionalKey96(d) definitions == [k \in {key} |-> d] objects == [id \in 1..4 |-> IF id=1 THEN [CardObject9("Specimen0110","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE CardObject9("Specimen0221","Play",TRUE,"Down")] firstWorld == [id \in {1,4,12,13} |-> IF id \in {1,4} THEN objects[id] ELSE CardObject9("Specimen0221","SideADiscard",FALSE,"Up")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) events1 == [id \in {100,101} |-> ConditionalEventFixture96(id,"Retireed",id-98,"SideB","SideA",initial,500)] begin1 == [ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",definitions,firstWorld) EXCEPT !.usedObjects=DOMAIN objects \cup DOMAIN firstWorld] current1 == [begin1 EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp1 == ConditionalCheckpointFixture96(seed,1,begin1,current1,events1) keys1 == {[definition |-> key,occurrence |-> id] : id \in DOMAIN events1} alloc1 == [k \in keys1 |-> k.occurrence+101] bind1 == ConditionalBindingsFixture96(keys1,1,400,40) pending == ConditionalCommittedFixture96(seed,definitions,cp1,alloc1,bind1,Empty9) site == TraversalPrioritySite9(TurnFixture92("SideA"),TraversalFixture92("ProcedureCodeda7bff1d9270"),ApproachFixture92,LayoutFixture92,TraversalContextFixture92(TraversalFixture92("ProcedureCodeda7bff1d9270"))) members == ConditionalWindowMembers96(pending.instances,400) open == WindowFixture92(400,"Reaction",site,members,40,TimingRef9("TraversalPhase",20)) begin2 == SnapshotWithConditionalRegistry96([begin1 EXCEPT !.id=20,!.checkpointId=2],pending) current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(pending,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] reception == ConditionalCommittedFixture96(pending,definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,201) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(201,d,ready,option,LegalityFixture92(ready,option).transactionId,"Play") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [reception EXCEPT !.instances[201].status="Imminent"] plan == OpenInstruction93(700,"Ability",201,d.syntax.source,"Play",1,"NoValue",<<"NetDamageSideB">>,FALSE) imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {1}] resolving == [selected EXCEPT !.instances[201].status="Resolving",!.instances[201].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {1}]]] atomicP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] atomicPlan == [imminentPlan EXCEPT !.phase="Resolving"] secondWorld == [id \in {1,12,13,14} |-> IF id=1 THEN objects[1] ELSE CardObject9("Specimen0221","SideADiscard",FALSE,"Up")] beforeThird == SnapshotWithConditionalRegistry96(current2,resolving) events3 == [id \in {102} |-> ConditionalEventFixture96(id,"Retireed",4,"SideB","SideA",beforeThird,501)] begin3 == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(30,3,"CheckpointBeginning",definitions,secondWorld),resolving) EXCEPT !.usedObjects=begin1.usedObjects \cup DOMAIN secondWorld] current3 == [begin3 EXCEPT !.id=31,!.point="ProcedureCodee605a78f5d5e"] cp3 == ConditionalCheckpointFixture96(resolving,3,begin3,current3,events3) keys3 == {[definition |-> key,occurrence |-> 102]} alloc3 == [k \in keys3 |-> 203] bind3 == ConditionalBindingsFixture96(keys3,3,401,41) nested == ConditionalCommittedFixture96(resolving,definitions,cp3,alloc3,bind3,Empty9) nestedMembers == ConditionalWindowMembers96(nested.instances,401) child == WindowFixture92(401,"Reaction",site,nestedMembers,41,NoTimingRef9) ancestor == StartedFixture92(ReadyFixture92(WindowFixture92(399,"NeutralValue00001",TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3),Empty9,0,NoTimingRef9)),SyntheticOption92(4,"NeutralValue00001","SideB")) stack == <> control == [traversal |-> TraversalFixture92("ProcedureCodeda7bff1d9270"),encounter |-> 20,siteInspections |-> Empty9,itemInspections |-> Empty9, abortedEncounters |-> {},abortedInspectiones |-> {},abortedItemInspectiones |-> {},phaseEndedIds |-> {}, windowCleanupDue |-> FALSE,onlyWindowCleanup |-> FALSE,phaseStepsSkipped |-> FALSE,redirect |-> NoTraversalRedirect6,redirectStage |-> "NoValue",redirectCheckpointDue |-> FALSE] ended == EndTraversalOutcome6(control,21) cleanup == CleanupFixture92(1400,2,20,{400},stack) candidateStack == <> candidate == [nested EXCEPT !.instances[202].status="Lost"] beforeClose == SnapshotWithConditionalRegistry96(current3,nested) afterClose == SnapshotWithConditionalRegistry96([beforeClose EXCEPT !.id=40,!.point="AfterWindowCleanup"],candidate) endRef == [tag |-> "TimingStructureEnded",structure |-> TimingRef9("TraversalPhase",20)] cancelStack == <> IN /\ ProcessConditionalCheckpoint96(seed,pending,<<>>,<<>>,definitions,cp1,ConditionalConditionsFixture96(definitions,events1),alloc1,bind1,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,pending,400,site,OpeningFixture92(400,"Reaction",site,members,40,TimingRef9("TraversalPhase",20)),{}) /\ ProcessConditionalCheckpoint96(pending,reception,<>,<>,definitions,cp2,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{400}) /\ CheckpointPriorityWithConditionals96(reception,<>,<>,[CheckpointFixture92(open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(reception,selected,<>,<>,p,imminentP,d,SnapshotWithConditionalRegistry96(current2,reception),201,option,LegalityFixture92(ready,option),Empty9, plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(selected,resolving,<>,imminentP,atomicP,imminentPlan,atomicPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0),expected) /\ ProcessConditionalCheckpoint96(resolving,nested,<>,<>,definitions,cp3,ConditionalConditionsFixture96(definitions,events3),alloc3,bind3,Empty9,Empty9,{400}) /\ OpenConditionalReaction96(<>,<>,nested,401,site,OpeningFixture92(401,"Reaction",site,nestedMembers,41,NoTimingRef9),{400}) /\ EndTheTraversal6(control,ended,21,TRUE,EndTraversalEffectEvents6(control)) /\ ended.windowCleanupDue /\ 20 \in ended.phaseEndedIds /\ PriorityStackValid9(stack) /\ PriorityStackValid9(candidateStack) /\ ApplyConditionalTraversalEndPolicy96(nested,candidate,candidate,stack,candidateStack,candidateStack,1400,cleanup,beforeClose,afterClose) /\ candidate.instances[201]=nested.instances[201] /\ candidate.instances[201].status="Resolving" /\ candidate.instances[202].status="Lost" /\ candidate.instances[203].status="Pending" /\ candidateStack[1]=ancestor /\ candidateStack[3]=child /\ candidateStack[2].busy=busy.busy /\ candidateStack[2].members=busy.members /\ candidateStack[2].lostPending={202} /\ CancelConditionalBeginning96(nested,candidate,candidate,stack,cancelStack,cancelStack,endRef,beforeClose,afterClose) /\ CancelConditionalBeginning96(nested,nested,nested,stack,stack,stack,[endRef EXCEPT !.structure=TimingRef9("ItemInspection",20)],beforeClose,beforeClose) /\ ~ApplyConditionalTraversalEndPolicy96(nested,nested,nested,stack,candidateStack,candidateStack,1400,cleanup,beforeClose,SnapshotWithConditionalRegistry96(afterClose,nested)) /\ ~ApplyConditionalTraversalEndPolicy96(nested,candidate,candidate,stack,candidateStack,candidateStack,1400,[cleanup EXCEPT !.windows[400]=child],beforeClose,afterClose) ConditionalPassClosureChecks96 == LET d == [ConditionalDefinitionFixture96(851,"Specimen0007","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") EXCEPT !.effectChoices={{},{1}}] s == ConditionalUseScenario96(d,"Specimen0007") closed == PassPriorityFrame9(s.ready) lost == [s.reception EXCEPT !.instances[201].status="Lost"] before == SnapshotWithConditionalRegistry96(s.current,s.reception) after == SnapshotWithConditionalRegistry96(before,lost) begin3 == [SnapshotWithConditionalRegistry96(s.current,lost) EXCEPT !.id=30,!.checkpointId=3,!.point="CheckpointBeginning"] current3 == [begin3 EXCEPT !.id=31,!.point="ProcedureCodee605a78f5d5e"] cp3 == [ConditionalCheckpointFixture96(lost,3,begin3,current3,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(closed)] reception3 == ConditionalCommittedFixture96(lost,s.definitions,cp3,Empty9,Empty9,Empty9) ready3 == [closed EXCEPT !.stage="Ready",!.checkpoint=3] fullyClosed == PassPriorityFrame9(ready3) newWindow == WindowFixture92(551,"Paid",TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",2),Empty9,0,NoTimingRef9) wrongReady == [ReadyFixture92(newWindow) EXCEPT !.checkpoint=1] mandatory == ConditionalUseScenario96(ConditionalDefinitionFixture96(852,"Specimen0078","Trigger","TurnBegins","SchemaAtom016","SideB","SideB"),"Specimen0078") IN /\ ConditionalUseScenarioValid96(s) /\ ConditionalUseScenarioValid96(mandatory) /\ PassConditionalPriority96(s.reception,lost,lost,<>,<>,"SideB",Empty9,before,after) /\ ~ConditionalCheckpointDrained96(lost,<>,1) /\ ProcessConditionalCheckpoint96(lost,reception3,<>,<>,s.definitions,cp3,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{400}) /\ CheckpointPriorityWithConditionals96(reception3,<>,<>,[CheckpointFixture92(closed) EXCEPT !.id=3]) /\ PassConditionalPriority96(reception3,reception3,reception3,<>,<>,"SideA",Empty9,SnapshotWithConditionalRegistry96(current3,reception3),SnapshotWithConditionalRegistry96(current3,reception3)) /\ ConditionalCheckpointDrained96(reception3,<>,1) /\ PopClosedPriorityWindow9(<>,<<>>) /\ OpenPriorityWindow9(<<>>,<>,551,"Paid",newWindow.site,Empty9,OpeningFixture92(551,"Paid",newWindow.site,Empty9,0,NoTimingRef9),{400}) /\ ConditionalCheckpointDrained96(reception3,<>,1) /\ ~CheckpointPriorityWithConditionals96(reception3,<>,<>,[CheckpointFixture92(newWindow) EXCEPT !.id=1]) /\ lost.instances[201].status="Lost" /\ closed.pending={} /\ closed.lostPending={201} /\ closed.members=s.ready.members /\ ~PassConditionalPriority96(mandatory.reception,[mandatory.reception EXCEPT !.instances[201].status="Lost"],[mandatory.reception EXCEPT !.instances[201].status="Lost"], <>,<>,"SideB",Empty9,SnapshotWithConditionalRegistry96(mandatory.current,mandatory.reception), SnapshotWithConditionalRegistry96(mandatory.current,[mandatory.reception EXCEPT !.instances[201].status="Lost"])) ConditionalInterruptRecognitionChecks96 == LET base == ConditionalDefinitionFixture96(860,"Specimen0066","Trigger","WouldDraw","SchemaAtom016","SideA","SideA") d == [base EXCEPT !.syntax.units= <>] key == ConditionalKey96(d) definitions == [k \in {key} |-> d] objects == [id \in {1} |-> [CardObject9("Specimen0066","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] snapshot == ConditionalSnapshotFixture96(1,0,"InterruptPreparation",definitions,objects) before == NewConditionalLedger96(snapshot) rule == OpenInstruction93(710,"Rule",0,RuleAbilitySource9("ProcedureCode59141ee1a13b"),"NoValue",0,"ProcedureCode59141ee1a13b",<<[kind |-> "Draw",count |-> 1]>>,FALSE) imminent == [rule EXCEPT !.phase="Imminent"] prepared == [tag |-> "ConditionalInterruptMatch",instruction |-> InstructionWindowRef93(imminent),ability |-> d.syntax.id,source |-> d.syntax.source, snapshotId |-> snapshot.id,matches |-> TRUE,occurrence |-> 100] member == ConditionalMember96(901,d,450,45) instance == [member |-> member,definition |-> key,definitionCopy |-> d,status |-> "Pending",primaryKind |-> "Trigger",activationEpoch |-> 0, checkpointId |-> 0,occurrence |-> 100,hadSnapshot |-> snapshot,expected |-> Empty9,used |-> FALSE] pending == [before EXCEPT !.interruptRecognitions={[definition |-> key,occurrence |-> 100]},!.instances=[id \in {901} |-> instance]] site == TurnPrioritySite9([TurnFixture92("SideA") EXCEPT !.phase="Draw"],"ProcedureCode59141ee1a13b",10,3, TurnContextFixture92([TurnFixture92("SideA") EXCEPT !.phase="Draw"],"ProcedureCode59141ee1a13b")) members == ConditionalWindowMembers96(pending.instances,450) opening == [OpeningFixture92(450,"Interrupt",site,members,45,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(imminent)] window == TypedWindowFixture93(450,site,members,opening) current == SnapshotWithConditionalRegistry96([snapshot EXCEPT !.id=11,!.checkpointId=1,!.point="ProcedureCodee605a78f5d5e"],pending) begin == [current EXCEPT !.id=10,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(pending,1,begin,current,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(window)] reception == ConditionalCommittedFixture96(pending,definitions,cp,Empty9,Empty9,Empty9) ready == [window EXCEPT !.stage="Ready",!.checkpoint=1] option == ConditionalOptionFixture92(ready,901) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(901,d,ready,option,LegalityFixture92(ready,option).transactionId,"Play") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [reception EXCEPT !.instances[901].status="Imminent"] plan == OpenInstruction93(700,"Ability",901,d.syntax.source,"Play",1,"NoValue",<<"IncreaseDraw">>,FALSE) imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] candidates == CheckpointCandidates96(definitions,before,[cp EXCEPT !.processingSnapshot=snapshot],ConditionalConditionsFixture96(definitions,Empty9)) IN /\ ConditionalDefinitionValid96(d) /\ ConditionalInterrupt96(d) /\ EnterRuleInstruction93(rule,imminent,"ProcedureCode59141ee1a13b") /\ imminent.abilityInstance=0 /\ imminent.index=0 /\ CreateConditionalInterrupt96(before,pending,901,d,imminent,Empty9,"ProcedureCode59141ee1a13b",snapshot,prepared,450,45,{}) /\ pending.instances[901].member.interrupt /\ pending.instances[901].member.mandatory /\ candidates={} /\ OpenInstructionInterrupt93(<<>>,<>,450,site,members,opening,{},imminent,Empty9,"ProcedureCode59141ee1a13b") /\ ~OpenConditionalReaction96(<<>>,<>,pending,450,site, OpeningFixture92(450,"Reaction",site,members,45,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(pending,reception,<>,<>,definitions,cp,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{450}) /\ CheckpointPriorityWithConditionals96(reception,<>,<>,[CheckpointFixture92(window) EXCEPT !.id=1]) /\ ~PassPriority9(<>,<>,"SideA",EffectFixture92(ready,{901},{})) /\ BeginConditionalResolution96(reception,selected,<>,<>,p,imminentP,d,SnapshotWithConditionalRegistry96(current,reception),901,option,LegalityFixture92(ready,option),EffectFixture92(ready,{901},{}), plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9]) /\ selected.instances[901].status="Imminent" /\ ConditionalProcedureBound96(selected,imminentP) /\ \A bad \in {[prepared EXCEPT !.instruction.id=711],[prepared EXCEPT !.source=ObjectAbilitySource9(2)], [prepared EXCEPT !.snapshotId=2],[prepared EXCEPT !.matches=FALSE]} : ~CreateConditionalInterrupt96(before,pending,901,d,imminent,Empty9,"ProcedureCode59141ee1a13b",snapshot,bad,450,45,{}) /\ ~CreateConditionalInterrupt96(before,pending,901,d,[imminent EXCEPT !.phase="Resolving"],Empty9,"ProcedureCode59141ee1a13b",snapshot,prepared,450,45,{}) /\ ~CreateConditionalInterrupt96(before,pending,901,d,imminent,Empty9,"ProcedureCode824821d07be7",snapshot,prepared,450,45,{}) /\ ~CreateConditionalInterrupt96(before,pending,901,d,imminent,Empty9,"ProcedureCode59141ee1a13b",snapshot,prepared,450,45,{450}) /\ LET newInstance == [instance EXCEPT !.member.id=902,!.member.windowId=451,!.member.group=46] duplicate == [pending EXCEPT !.instances=[id \in {901,902} |-> IF id=901 THEN instance ELSE newInstance]] IN ~CreateConditionalInterrupt96(pending,duplicate,902,d,imminent,Empty9,"ProcedureCode59141ee1a13b",SnapshotWithConditionalRegistry96(snapshot,pending),prepared,451,46,{450}) /\ LET s == ConditionalDepartureScenario96("Specimen0110",861,3,"Retireed") interrupt == [s.definition EXCEPT !.syntax.units= <>] IN ConditionalDefinitionValid96(interrupt) /\ ~DepartureCurrentGate96(interrupt,s.cp) ObservationDefinitions96(definitions) == [key \in {ConditionalKey96(d) : d \in definitions} |-> CHOOSE d \in definitions : ConditionalKey96(d)=key] ObservationSnapshot96(id,checkpointId,point,definitions,objects,ledger) == SnapshotWithConditionalRegistry96( [ConditionalSnapshotFixture96(id,checkpointId,point,definitions,objects) EXCEPT !.activationEpoch=ConditionalEpochMap96(ledger,definitions),!.activationSerial=ledger.activationSerial, !.usedObjects=@ \cup ledger.lastSnapshot.usedObjects],ledger) ObservationEmptyCP96(before,id,definitions,objects) == ConditionalCheckpointFixture96(before,id, ObservationSnapshot96(10*id,id,"CheckpointBeginning",definitions,objects,before), ObservationSnapshot96(10*id+1,id,"ProcedureCodee605a78f5d5e",definitions,objects,before),Empty9) ObservationNoNew96(before,definitions,cp) == ConditionalCommittedFixture96(before,definitions,cp,Empty9,Empty9,Empty9) ObservationSpecimen0033Checks96 == LET d == ConditionalDefinitionFixture96(820,"Specimen0033","Trigger","Exposed","SchemaAtom016","Controller","SchemaAtom016") definitions == ObservationDefinitions96({d}) objects == [id \in {1,2,3} |-> IF id=1 THEN CardObject9("Specimen0033","Play",TRUE,"Up") ELSE CardObject9(IF id=2 THEN "Specimen0221" ELSE "Specimen0160","Play",TRUE,"Down")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) before == NewConditionalLedger96(initial) events == [id \in {11,12} |-> ConditionalEventFixture96(id,"Exposed",id-9,"SideB","SideA",initial,501)] cp == [ObservationEmptyCP96(before,1,definitions,objects) EXCEPT !.occurrences=events] keys == {[definition |-> ConditionalKey96(d),occurrence |-> id] : id \in DOMAIN events} allocation == [key \in keys |-> key.occurrence+100] bindings == ConditionalBindingsFixture96(keys,1,820,82) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) merged == [key \in keys |-> 111] badAfter == ConditionalCommittedFixture96(before,definitions,cp,merged,bindings,Empty9) IN /\ CardFacts9["Specimen0209"].kind="Action" /\ CardFacts9["Specimen0033"].kind="Equipment" /\ ConditionalDefinitionValid96(d) /\ ProcessConditionalCheckpoint96(before,after,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ DOMAIN after.instances={111,112} /\ after.instances[111].occurrence # after.instances[112].occurrence /\ after.instances[111].definitionCopy=after.instances[112].definitionCopy /\ \A id \in DOMAIN after.instances : after.instances[id].member.mandatory /\ after.instances[id].member.windowId=820 /\ ~ProcessConditionalCheckpoint96(before,badAfter,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),merged,bindings,Empty9,Empty9,{}) /\ \A count \in 0..2 : LET es == [id \in 11..(10+count) |-> events[id]] c == [cp EXCEPT !.occurrences=es] ks == {[definition |-> ConditionalKey96(d),occurrence |-> id] : id \in DOMAIN es} a == [key \in ks |-> key.occurrence+100] b == ConditionalBindingsFixture96(ks,1,820,82) result == ConditionalCommittedFixture96(before,definitions,c,a,b,Empty9) IN ProcessConditionalCheckpoint96(before,result,<<>>,<<>>,definitions,c,ConditionalConditionsFixture96(definitions,es),a,b,Empty9,Empty9,{}) /\ Cardinality(DOMAIN result.instances)=count ObservationLateExampleFamily035Checks96 == LET exampleFamily035 == [ConditionalDefinitionFixture96(821,"Specimen0160","Trigger","TurnBegins","SchemaAtom016","Controller","SchemaAtom016") EXCEPT !.syntax.source=ObjectAbilitySource9(3),!.activity.source=ObjectAbilitySource9(3)] exampleFamily035Deployed == ReboundConditionalDefinition96(exampleFamily035,13) oldDefs == ObservationDefinitions96({exampleFamily035}) newDefs == ObservationDefinitions96({exampleFamily035Deployed}) objects == [id \in {1,2,3} |-> CASE id=1 -> [CardObject9("Specimen0196","Play",TRUE,"Up") EXCEPT !.activated=TRUE] [] id=2 -> CardObject9("Specimen0166","SideAProfile",FALSE,"Up") [] OTHER -> CardObject9("Specimen0160","SideADeck",FALSE,"Down")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",oldDefs,objects) seed == NewConditionalLedger96(initial) turnBegin == ConditionalEventFixture96(101,"TurnBegins",0,"SideA","NoValue",initial,500) cp1 == [ObservationEmptyCP96(seed,1,oldDefs,objects) EXCEPT !.occurrences=[id \in {101} |-> turnBegin]] first == ObservationNoNew96(seed,oldDefs,cp1) trashed == [id \in {2,3,11} |-> IF id=11 THEN CardObject9("Specimen0196","SideADiscard",FALSE,"Up") ELSE objects[id]] trashEvent == ConditionalEventFixture96(102,"Retireed",1,"SideA","SideA",cp1.processingSnapshot,501) cp2 == [ObservationEmptyCP96(first,2,oldDefs,trashed) EXCEPT !.occurrences=[id \in {102} |-> trashEvent]] SchemaAtom187 == ObservationNoNew96(first,oldDefs,cp2) deployed == [id \in {2,11,13} |-> IF id=13 THEN CardObject9("Specimen0160","Play",TRUE,"Down") ELSE trashed[id]] activation == OpenActivation8(50,13,"Ob") paid == [activation EXCEPT !.stage="CostCheckpoint",!.transaction=50] faceup == [paid EXCEPT !.stage="TurnFaceUp"] complete == [faceup EXCEPT !.stage="Complete",!.complete=TRUE,!.result="ItemActivated"] activated == [deployed EXCEPT ![13].face="Up",![13].activated=TRUE] cp3base == ObservationEmptyCP96(SchemaAtom187,3,newDefs,deployed) deployEvent == ConditionalEventFixture96(103,"Deployed",13,"SideA","SideA",cp3base.beginSnapshot,502) cp3 == [cp3base EXCEPT !.occurrences=[id \in {103} |-> deployEvent]] third == ObservationNoNew96(SchemaAtom187,newDefs,cp3) cp4base == ObservationEmptyCP96(third,4,newDefs,activated) activationEvent == ConditionalEventFixture96(104,"Activation",13,"SideA","SideA",cp4base.processingSnapshot,502) cp4 == [cp4base EXCEPT !.occurrences=[id \in {104} |-> activationEvent]] fourth == ObservationNoNew96(third,newDefs,cp4) replayEvents == [id \in {101,104} |-> IF id=101 THEN turnBegin ELSE activationEvent] replay == [cp4 EXCEPT !.occurrences=replayEvents] replayKeys == {[definition |-> ConditionalKey96(exampleFamily035Deployed),occurrence |-> 101]} replayAllocation == [key \in replayKeys |-> 121] replayBindings == ConditionalBindingsFixture96(replayKeys,4,821,83) replayAfter == ConditionalCommittedFixture96(third,newDefs,replay,replayAllocation,replayBindings,Empty9) IN /\ CardFacts9["Specimen0196"].kind="Facility" /\ CardFacts9["Specimen0166"].kind="Profile" /\ ~ConditionalActive96(exampleFamily035,cp1.processingSnapshot) /\ ProcessConditionalCheckpoint96(seed,first,<<>>,<<>>,oldDefs,cp1,ConditionalConditionsFixture96(oldDefs,cp1.occurrences),Empty9,Empty9,Empty9,Empty9,{}) /\ 101 \in first.processed /\ first.instances=Empty9 /\ ProcessConditionalCheckpoint96(first,SchemaAtom187,<<>>,<<>>,oldDefs,cp2,ConditionalConditionsFixture96(oldDefs,cp2.occurrences),Empty9,Empty9,Empty9,Empty9,{}) /\ PayActivation8(activation,paid,deployed,[route |-> "CardEffect",effectAuthorizes |-> TRUE],TRUE,50) /\ EffectiveCosts(<<[category |-> "Activation",kind |-> "ResourceUnit",amount |-> 2]>>,{},TRUE,FALSE)= <<>> /\ ProcessConditionalCheckpoint96(SchemaAtom187,third,<<>>,<<>>,newDefs,cp3,ConditionalConditionsFixture96(newDefs,cp3.occurrences),Empty9,Empty9,Empty9,Empty9,{}) /\ ~ConditionalActive96(exampleFamily035Deployed,cp3.processingSnapshot) /\ DrainActivationCostCheckpoint8(paid,faceup,50,TRUE) /\ FinishActivation8(faceup,complete,deployed,activated,TRUE,{[tag |-> "Activation",object |-> 13,activationId |-> 50]}) /\ ConditionalActive96(exampleFamily035Deployed,cp4.processingSnapshot) /\ ProcessConditionalCheckpoint96(third,fourth,<<>>,<<>>,newDefs,cp4,ConditionalConditionsFixture96(newDefs,cp4.occurrences),Empty9,Empty9,Empty9,Empty9,{}) /\ fourth.instances=Empty9 /\ ~ProcessConditionalCheckpoint96(third,replayAfter,<<>>,<<>>,newDefs,replay,ConditionalConditionsFixture96(newDefs,replayEvents),replayAllocation,replayBindings,Empty9,Empty9,{}) ObservationExampleFamily069Checks96 == LET original == [ConditionalDefinitionFixture96(822,"Specimen0250","Trigger","Deployed","SchemaAtom016","Controller","SideA") EXCEPT !.triggerRequirements={900},!.effectChoices={{1},{2}},!.partsByInstruction=[i \in {700} |-> {1,2}]] d == ReboundConditionalDefinition96(original,11) oldDefs == ObservationDefinitions96({original}) definitions == ObservationDefinitions96({d}) objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0250","SideAHand",FALSE,"Down") ELSE CardObject9("NeutralValue00005","SideAObjectiveCompletion",FALSE,"Up")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",oldDefs,objects) before == NewConditionalLedger96(initial) deployed == [id \in {2,11} |-> IF id=2 THEN objects[2] ELSE [CardObject9("Specimen0250","Play",TRUE,"Down") EXCEPT !.area="Root",!.targetSite="R1",!.targetSiteKind="SchemaAtom132"]] activation == OpenActivation8(60,11,"Specimen0016") paid == [activation EXCEPT !.stage="CostCheckpoint",!.transaction=60] faceup == [paid EXCEPT !.stage="TurnFaceUp"] complete == [faceup EXCEPT !.stage="Complete",!.complete=TRUE,!.result="ItemActivated"] activated == [deployed EXCEPT ![11].face="Up",![11].activated=TRUE] cp1base == ObservationEmptyCP96(before,1,definitions,deployed) event == ConditionalEventFixture96(201,"Deployed",11,"SideA","SideA",cp1base.beginSnapshot,503) events == [id \in {201} |-> event] cp1 == [cp1base EXCEPT !.occurrences=events] first == ObservationNoNew96(before,definitions,cp1) cp2base == ObservationEmptyCP96(first,2,definitions,activated) activationEvent == ConditionalEventFixture96(202,"Activation",11,"SideA","SideA",cp2base.processingSnapshot,503) cp2 == [cp2base EXCEPT !.occurrences=[id \in {202} |-> activationEvent]] SchemaAtom187 == ObservationNoNew96(first,definitions,cp2) replayEvents == [id \in {201,202} |-> IF id=201 THEN event ELSE activationEvent] replay == [cp2 EXCEPT !.occurrences=replayEvents] keys == {[definition |-> ConditionalKey96(d),occurrence |-> 201]} allocation == [key \in keys |-> 221] bindings == ConditionalBindingsFixture96(keys,2,822,84) badAfter == ConditionalCommittedFixture96(first,definitions,replay,allocation,bindings,Empty9) IN /\ CardFacts9["NeutralValue00005"].kind="Objective" /\ CardFacts9["Specimen0250"].kind="Attachment" /\ TriggerPattern96(d,event) /\ TriggerStipulations96(d,event,ConditionalTriggerReceiptFixture96(d,event)) /\ EffectiveCosts(<<[category |-> "Activation",kind |-> "ResourceUnit",amount |-> 1]>>,{},FALSE,TRUE)= <<>> /\ PayActivation8(activation,paid,deployed,[route |-> "CardEffect",effectAuthorizes |-> TRUE],TRUE,60) /\ ~ConditionalActive96(d,cp1.processingSnapshot) /\ ProcessConditionalCheckpoint96(before,first,<<>>,<<>>,definitions,cp1,ConditionalConditionsFixture96(definitions,events),Empty9,Empty9,Empty9,Empty9,{}) /\ first.instances=Empty9 /\ 201 \in first.processed /\ DrainActivationCostCheckpoint8(paid,faceup,60,TRUE) /\ FinishActivation8(faceup,complete,deployed,activated,TRUE,{[tag |-> "Activation",object |-> 11,activationId |-> 60]}) /\ ConditionalActive96(d,cp2.processingSnapshot) /\ ProcessConditionalCheckpoint96(first,SchemaAtom187,<<>>,<<>>,definitions,cp2,ConditionalConditionsFixture96(definitions,cp2.occurrences),Empty9,Empty9,Empty9,Empty9,{}) /\ SchemaAtom187.instances=Empty9 /\ ~ProcessConditionalCheckpoint96(first,badAfter,<<>>,<<>>,definitions,replay,ConditionalConditionsFixture96(definitions,replayEvents),allocation,bindings,Empty9,Empty9,{}) ObservationItemInspectionStipulationChecks96 == LET qpm == [ConditionalDefinitionFixture96(823,"Specimen0192","Trigger","ItemInspectionCard","SchemaAtom149","SideB","SideA") EXCEPT !.activity.sourceItemInspection=TRUE,!.triggerRequirements={901}] exampleFamily007 == [ConditionalDefinitionFixture96(824,"Specimen0046","Trigger","ItemInspectionCard","SchemaAtom016","SideB","SideA") EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2),!.activity.provider="Granted",!.triggerRequirements={902}] definitions == ObservationDefinitions96({qpm,exampleFamily007}) objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0192","Play",TRUE,"Up") ELSE [CardObject9("Specimen0046","Play",TRUE,"Up") EXCEPT !.form="Counter",!.kind="SchemaAtom043",!.host=1]] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) EXCEPT !.activity.inspectedItemObject=1] before == NewConditionalLedger96(initial) itemInspection == ConditionalEventFixture96(301,"ItemInspectionCard",1,"SideB","SideA",initial,504) events == [id \in {301} |-> itemInspection] cpbase == ObservationEmptyCP96(before,1,definitions,objects) cp == [cpbase EXCEPT !.beginSnapshot.activity.inspectedItemObject=1,!.processingSnapshot.activity.inspectedItemObject=1,!.occurrences=events] qpmReceipt == [ConditionalTriggerReceiptFixture96(qpm,itemInspection) EXCEPT !.results[901]=itemInspection.snapshot.exposureMarkers["SideB"]>0] exampleFamily007Receipt == [ConditionalTriggerReceiptFixture96(exampleFamily007,itemInspection) EXCEPT !.results[902]=itemInspection.object=objects[2].host] conditions == [key \in DOMAIN definitions |-> [id \in {301} |-> IF key=ConditionalKey96(qpm) THEN qpmReceipt ELSE exampleFamily007Receipt]] castKeys == {[definition |-> ConditionalKey96(exampleFamily007),occurrence |-> 301]} allocation == [key \in castKeys |-> 321] bindings == ConditionalBindingsFixture96(castKeys,1,830,85) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) afterExposureMarkers == [cp.processingSnapshot EXCEPT !.id=99,!.point="AfterSpecimen0046Effect",!.exposureMarkers["SideB"]=2] wrongReceipt == [qpmReceipt EXCEPT !.snapshotId=afterExposureMarkers.id,!.results[901]=TRUE] wrongConditions == [conditions EXCEPT ![ConditionalKey96(qpm)][301]=wrongReceipt] bothKeys == castKeys \cup {[definition |-> ConditionalKey96(qpm),occurrence |-> 301]} bothAllocation == [key \in bothKeys |-> IF key.definition=ConditionalKey96(exampleFamily007) THEN 321 ELSE 322] bothBindings == ConditionalBindingsFixture96(bothKeys,1,830,85) badAfter == ConditionalCommittedFixture96(before,definitions,cp,bothAllocation,bothBindings,Empty9) hasExposureMarkersMoment == [initial EXCEPT !.id=2,!.exposureMarkers["SideB"]=1] hasExposureMarkersEvent == [itemInspection EXCEPT !.snapshot=hasExposureMarkersMoment] hasExposureMarkersEvents == [id \in {301} |-> hasExposureMarkersEvent] hasExposureMarkersCP == [cp EXCEPT !.occurrences=hasExposureMarkersEvents,!.beginSnapshot.exposureMarkers["SideB"]=1,!.processingSnapshot.exposureMarkers["SideB"]=1] hasExposureMarkersConditions == [key \in DOMAIN definitions |-> [id \in {301} |-> ConditionalTriggerReceiptFixture96(definitions[key],hasExposureMarkersEvent)]] hasExposureMarkersAfter == ConditionalCommittedFixture96(before,definitions,hasExposureMarkersCP,bothAllocation,bothBindings,Empty9) IN /\ ConditionalActive96(qpm,cp.processingSnapshot) /\ ConditionalActive96(exampleFamily007,cp.processingSnapshot) /\ ~qpmReceipt.results[901] /\ exampleFamily007Receipt.results[902] /\ ProcessConditionalCheckpoint96(before,after,<<>>,<<>>,definitions,cp,conditions,allocation,bindings,Empty9,Empty9,{}) /\ DOMAIN after.instances={321} /\ after.instances[321].member.ability=exampleFamily007.syntax.id /\ afterExposureMarkers.exposureMarkers["SideB"]=2 /\ itemInspection.snapshot.exposureMarkers["SideB"]=0 /\ ~TriggerStipulations96(qpm,itemInspection,wrongReceipt) /\ ~ProcessConditionalCheckpoint96(before,badAfter,<<>>,<<>>,definitions,cp,wrongConditions,bothAllocation,bothBindings,Empty9,Empty9,{}) /\ ProcessConditionalCheckpoint96(before,hasExposureMarkersAfter,<<>>,<<>>,definitions,hasExposureMarkersCP,hasExposureMarkersConditions,bothAllocation,bothBindings,Empty9,Empty9,{}) /\ Cardinality(DOMAIN hasExposureMarkersAfter.instances)=2 ObservationInstructionConditionChecks96 == LET exampleFamily071 == ConditionalDefinitionFixture96(825,"Specimen0254","Trigger","TurnBegins","SchemaAtom016","Controller","SchemaAtom016") exampleFamily063 == [ConditionalDefinitionFixture96(826,"Specimen0240","Trigger","TurnBegins","SchemaAtom016","Controller","SchemaAtom016") EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2),!.effectChoices={{},{1}}] definitions == ObservationDefinitions96({exampleFamily071,exampleFamily063}) objects == [id \in {1,2,3} |-> CASE id=1 -> CardObject9("Specimen0254","Play",TRUE,"Up") [] id=2 -> CardObject9("Specimen0240","Play",TRUE,"Up") [] OTHER -> [CardObject9("Specimen0079","Play",FALSE,"Up") EXCEPT !.host=2,!.loc="HostedOnExampleFamily063"]] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) before == NewConditionalLedger96(initial) event == ConditionalEventFixture96(351,"TurnBegins",0,"SideB","NoValue",initial,505) events == [id \in {351} |-> event] cp == [ObservationEmptyCP96(before,1,definitions,objects) EXCEPT !.occurrences=events] keys == {[definition |-> key,occurrence |-> 351] : key \in DOMAIN definitions} allocation == [key \in keys |-> IF key.definition=ConditionalKey96(exampleFamily071) THEN 341 ELSE 342] bindings == ConditionalBindingsFixture96(keys,1,840,86) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) destination == [zone |-> "Play",loc |-> "Rig",area |-> "SideBRig",targetSite |-> "NoValue",targetSiteKind |-> "NoValue",position |-> "NoValue",host |-> 0] deploy == [OpenDeploy8(70,3,"SideB","Up","ExampleFamily063","NoValue") EXCEPT !.stage="ProcedureCode0f76bcc2eb00",!.destination=destination] atDestination == [deploy EXCEPT !.stage="ProcedureCode4585e6a51427"] deployedObjects == [objects EXCEPT ![3]=[WithCardLocation8(objects[3],destination) EXCEPT !.deployed=TRUE,!.activated=FALSE]] deployComplete == [atDestination EXCEPT !.stage="Complete",!.complete=TRUE,!.deployedOccurred=TRUE] atEffect == [SnapshotWithConditionalRegistry96(cp.processingSnapshot,after) EXCEPT !.id=19,!.point="ExampleFamily071Instruction",!.objects=deployedObjects,!.link["SideB"]=2] members == ConditionalWindowMembers96(after.instances,840) IN /\ CardFacts9["Specimen0079"].kind="Equipment" /\ exampleFamily071.triggerRequirements={} /\ ~InstructionLinkGate96(initial,"SideB") /\ ~ConditionalOptional96(exampleFamily071) /\ ConditionalOptional96(exampleFamily063) /\ ProcessConditionalCheckpoint96(before,after,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ DOMAIN after.instances={341,342} /\ members[341].mandatory /\ ~members[342].mandatory /\ after.instances[341].hadSnapshot.link["SideB"]=1 /\ DeployAtDestination8(deploy,atDestination,objects,deployedObjects,Empty9,Empty9,{}, {},TRUE) /\ FinishDeploy8(atDestination,deployComplete,deployedObjects,{DeployBeginEvent8(atDestination)}) /\ SideBPaidDeployPost(deployedObjects[3],"SideB","Equipment",TRUE,TRUE) /\ 3-2=1 /\ atEffect.link["SideB"]=initial.link["SideB"]+1 /\ InstructionLinkGate96(atEffect,"SideB") /\ after.instances[341].member=members[341] /\ \A link \in 0..3 : InstructionLinkGate96([atEffect EXCEPT !.link["SideB"]=link],"SideB")=(link>=2) ObservationHistoricalAdvanceChecks96 == LET d == ConditionalDefinitionFixture96(827,"Specimen0265","Trigger","ProgressAdded","SchemaAtom016","Controller","SideA") definitions == ObservationDefinitions96({d}) objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0265","SideAProfile",FALSE,"Up") ELSE CardObject9("Specimen0151","Play",TRUE,"Down")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) before == NewConditionalLedger96(initial) immediate == [initial EXCEPT !.id=2,!.point="BeforeProgress"] placed == ConditionalEventFixture96(400,"CounterPlaced",2,"SideA","SideA",initial,506) advanced == ConditionalEventFixture96(401,"ProgressAdded",2,"SideA","SideA",immediate,506) events == [id \in {401} |-> advanced] cp1base == ObservationEmptyCP96(before,1,definitions,objects) cp1 == [cp1base EXCEPT !.beginSnapshot.progress[2]=1,!.processingSnapshot.progress[2]=1,!.occurrences=events] keys1 == {[definition |-> ConditionalKey96(d),occurrence |-> 401]} allocation1 == [key \in keys1 |-> 441] bindings1 == ConditionalBindingsFixture96(keys1,1,850,87) first == ConditionalCommittedFixture96(before,definitions,cp1,allocation1,bindings1,Empty9) wrongCP == [cp1 EXCEPT !.previousSnapshot=immediate] wrongAfter == ConditionalCommittedFixture96(before,definitions,wrongCP,allocation1,bindings1,Empty9) secondMoment == [SnapshotWithConditionalRegistry96(cp1.processingSnapshot,first) EXCEPT !.id=12,!.point="SecondProgress"] nextEvent == ConditionalEventFixture96(402,"ProgressAdded",2,"SideA","SideA",secondMoment,507) cp2base == ObservationEmptyCP96(first,2,definitions,objects) cp2 == [cp2base EXCEPT !.beginSnapshot.progress[2]=2,!.processingSnapshot.progress[2]=2,!.occurrences=[id \in {402} |-> nextEvent]] keys2 == {[definition |-> ConditionalKey96(d),occurrence |-> 402]} allocation2 == [key \in keys2 |-> 442] bindings2 == ConditionalBindingsFixture96(keys2,2,851,88) SchemaAtom187 == ConditionalCommittedFixture96(first,definitions,cp2,allocation2,bindings2,Empty9) later == [cp2.processingSnapshot EXCEPT !.progress[2]=100] placedOnlyCP == [cp1 EXCEPT !.beginSnapshot.progress[2]=9,!.processingSnapshot.progress[2]=9,!.occurrences=[id \in {400} |-> placed]] placedOnlyAfter == ObservationNoNew96(before,definitions,placedOnlyCP) IN /\ d.triggerRequirements={} /\ ConditionalDefinitionValid96(d) /\ ProcessConditionalCheckpoint96(before,first,<<>>,<<>>,definitions,cp1,ConditionalConditionsFixture96(definitions,events),allocation1,bindings1,Empty9,Empty9,{}) /\ DOMAIN first.instances={441} /\ first.instances[441].hadSnapshot=initial /\ first.instances[441].hadSnapshot.progress[2]=0 /\ advanced.snapshot.progress[2]=0 /\ cp1.processingSnapshot.progress[2]=1 /\ HadProgressZero96(first.instances[441],2) /\ (IF HadProgressZero96(first.instances[441],2) THEN 2 ELSE 0)=2 /\ ~ProcessConditionalCheckpoint96(before,wrongAfter,<<>>,<<>>,definitions,wrongCP,ConditionalConditionsFixture96(definitions,events),allocation1,bindings1,Empty9,Empty9,{}) /\ ProcessConditionalCheckpoint96(first,SchemaAtom187,<<>>,<<>>,definitions,cp2,ConditionalConditionsFixture96(definitions,cp2.occurrences),allocation2,bindings2,Empty9,Empty9,{850}) /\ SchemaAtom187.instances[442].hadSnapshot=first.lastSnapshot /\ SchemaAtom187.instances[442].hadSnapshot.progress[2]=1 /\ ~HadProgressZero96(SchemaAtom187.instances[442],2) /\ (IF HadProgressZero96(SchemaAtom187.instances[442],2) THEN 2 ELSE 0)=0 /\ later.progress[2]=100 /\ HadProgressZero96(SchemaAtom187.instances[441],2) /\ ~HadProgressZero96(SchemaAtom187.instances[442],2) /\ ProcessConditionalCheckpoint96(before,placedOnlyAfter,<<>>,<<>>,definitions,placedOnlyCP,ConditionalConditionsFixture96(definitions,placedOnlyCP.occurrences),Empty9,Empty9,Empty9,Empty9,{}) /\ placedOnlyAfter.instances=Empty9 /\ \A previous \in 0..2 : LET instance == [first.instances[441] EXCEPT !.hadSnapshot.progress[2]=previous] IN HadProgressZero96(instance,2)=(previous=0) StaticDefinitionsFixture96(definitions) == [key \in {ConditionalKey96(d) : d \in definitions} |-> CHOOSE d \in definitions : ConditionalKey96(d)=key] StaticSnapshotFixture96(id,checkpoint,point,definitions,objects,ledger,strength) == LET base == SnapshotWithConditionalRegistry96( [ConditionalSnapshotFixture96(id,checkpoint,point,definitions,objects) EXCEPT !.activationEpoch=ConditionalEpochMap96(ledger,definitions),!.activationSerial=ledger.activationSerial, !.usedObjects=@ \cup ledger.lastSnapshot.usedObjects, !.activity.activeRules={definitions[key].syntax.source.rule : key \in {k \in DOMAIN definitions : definitions[k].syntax.source.kind="Rule"}}],ledger) IN [field \in DOMAIN base \cup {"strengths"} |-> IF field="strengths" THEN [object \in DOMAIN objects |-> IF object=2 THEN strength ELSE 0] ELSE base[field]] StaticCheckpointFixture96(before,id,definitions,objects,beginStrength,currentStrength) == ConditionalCheckpointFixture96(before,id, StaticSnapshotFixture96(10*id,id,"CheckpointBeginning",definitions,objects,before,beginStrength), StaticSnapshotFixture96(10*id+1,id,"ProcedureCodee605a78f5d5e",definitions,objects,before,currentStrength),Empty9) StaticTruthReceiptFixture96(d,cp) == [tag |-> "ConditionalStaticTruth",ability |-> d.syntax.id,source |-> d.syntax.source, checkpointId |-> cp.id,snapshotId |-> cp.beginSnapshot.id,condition |-> d.primaryCondition, holds |-> cp.beginSnapshot.strengths[2]<=0] StaticConditionsFixture96(definitions,cp) == [key \in DOMAIN definitions |-> [id \in {0} |-> StaticTruthReceiptFixture96(definitions[key],cp)]] StaticExpectedFixture96(plan,effects) == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(plan),effects |-> effects] StaticObservedLedgerFixture96(before,p,plan,effects) == [before EXCEPT !.instances[p.id].expected=[i \in DOMAIN @ \cup {plan.index} |-> IF i=plan.index THEN [instruction |-> InstructionWindowRef93(plan),effects |-> effects] ELSE @[i]]] StaticSelectionFixture96(host,instructionCount) == LET printed == ConditionalDefinitionFixture96(860,"Specimen0174","Static","NoValue","SchemaAtom016","SchemaAtom016","SchemaAtom016") d == IF instructionCount=1 THEN printed ELSE [printed EXCEPT !.syntax.source=RuleAbilitySource9("SyntheticTwoInstructionStatic96"),!.syntax.cardKind="NoValue", !.activity.source=RuleAbilitySource9("SyntheticTwoInstructionStatic96"),!.activity.provider="Rule", !.instructions = <<700,701>>,!.effectChoices={{1,2}},!.partsByInstruction=[i \in {700,701} |-> IF i=700 THEN {1} ELSE {2}]] definitions == StaticDefinitionsFixture96({d}) objects == [id \in {1,2} |-> IF id=1 THEN [CardObject9("Specimen0174","Play",TRUE,"Up") EXCEPT !.host=2] ELSE [CardObject9(host,"Play",TRUE,"Up") EXCEPT !.activated=TRUE]] rawInitial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) EXCEPT !.activity.activeRules=IF instructionCount=1 THEN {} ELSE {"SyntheticTwoInstructionStatic96"}] rawSeed == NewConditionalLedger96(rawInitial) initial == StaticSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects,rawSeed,0) seed == NewConditionalLedger96(initial) cp1 == StaticCheckpointFixture96(seed,1,definitions,objects,0,0) keys == {[definition |-> ConditionalKey96(d),occurrence |-> 0]} allocation == [key \in keys |-> 601] bindings == ConditionalBindingsFixture96(keys,1,900,90) pending == ConditionalCommittedFixture96(seed,definitions,cp1,allocation,bindings,Empty9) site == TraversalSiteFixture92("ProcedureCode453e949a114f") members == ConditionalWindowMembers96(pending.instances,900) open == WindowFixture92(900,"Reaction",site,members,90,NoTimingRef9) cp2 == [StaticCheckpointFixture96(pending,2,definitions,objects,0,0) EXCEPT !.caller=ConditionalPriorityCaller96(open)] received == ConditionalCommittedFixture96(pending,definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,601) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(601,d,ready,option,LegalityFixture92(ready,option).transactionId,IF instructionCount=1 THEN "Play" ELSE "Rule") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received EXCEPT !.instances[601].status="Imminent"] plan == OpenInstruction93(700,"Ability",601,d.syntax.source,p.ability.sourceZone,1,"NoValue",<<"ResolveStaticInstructionAsFarAsPossible">>,TRUE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={2},!.phase="Imminent"] IN [d |-> d,definitions |-> definitions,objects |-> objects,initial |-> initial,seed |-> seed,cp1 |-> cp1, keys |-> keys,allocation |-> allocation,bindings |-> bindings,pending |-> pending,site |-> site,members |-> members, open |-> open,cp2 |-> cp2,received |-> received,ready |-> ready,option |-> option,busy |-> busy,p |-> p, imminentP |-> imminentP,selected |-> selected,plan |-> plan,imminentPlan |-> imminentPlan] StaticSelectionValidFixture96(s) == /\ ConditionalDefinitionValid96(s.d) /\ ProcessConditionalCheckpoint96(s.seed,s.pending,<<>>,<<>>,s.definitions,s.cp1,StaticConditionsFixture96(s.definitions,s.cp1),s.allocation,s.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,s.pending,900,s.site,OpeningFixture92(900,"Reaction",s.site,s.members,90,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.received,<>,<>,s.definitions,s.cp2,StaticConditionsFixture96(s.definitions,s.cp2),Empty9,Empty9,Empty9,Empty9,{900}) /\ CheckpointPriorityWithConditionals96(s.received,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(s.received,s.selected,<>,<>,s.p,s.imminentP,s.d, SnapshotWithConditionalRegistry96(s.cp2.processingSnapshot,s.received),601,s.option,LegalityFixture92(s.ready,s.option),Empty9, s.plan,s.imminentPlan,InstructionTargetsFixture93(s.plan),InstructionEntryFixture93(s.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> s.d.syntax.id,source |-> s.d.syntax.source,results |-> Empty9]) StaticBeginningChecks96 == LET s == StaticSelectionFixture96("NeutralValue00016",1) IN /\ StaticSelectionValidFixture96(s) /\ CardFacts9["Specimen0174"].kind="Technique" /\ CardFacts9["NeutralValue00004"].kind="Barrier" /\ \A beginStrength,currentStrength \in 0..1 : LET cp == StaticCheckpointFixture96(s.seed,1,s.definitions,s.objects,beginStrength,currentStrength) keys == IF beginStrength=0 THEN s.keys ELSE {} allocation == [key \in keys |-> 601] bindings == ConditionalBindingsFixture96(keys,1,900,90) after == ConditionalCommittedFixture96(s.seed,s.definitions,cp,allocation,bindings,Empty9) wrongReceipt == [StaticTruthReceiptFixture96(s.d,cp) EXCEPT !.snapshotId=cp.processingSnapshot.id,!.holds=currentStrength=0] wrongConditions == [key \in DOMAIN s.definitions |-> [id \in {0} |-> wrongReceipt]] wrongKeys == IF currentStrength=0 THEN s.keys ELSE {} wrongAllocation == [key \in wrongKeys |-> 601] wrongBindings == ConditionalBindingsFixture96(wrongKeys,1,900,90) wrongAfter == ConditionalCommittedFixture96(s.seed,s.definitions,cp,wrongAllocation,wrongBindings,Empty9) IN /\ ProcessConditionalCheckpoint96(s.seed,after,<<>>,<<>>,s.definitions,cp,StaticConditionsFixture96(s.definitions,cp),allocation,bindings,Empty9,Empty9,{}) /\ Cardinality(DOMAIN after.instances)=(IF beginStrength=0 THEN 1 ELSE 0) /\ (currentStrength=0 => ~ProcessConditionalCheckpoint96(s.seed,wrongAfter,<<>>,<<>>,s.definitions,cp,wrongConditions,wrongAllocation,wrongBindings,Empty9,Empty9,{})) StaticNoModifierExpectedChecks96 == \A host \in {"NeutralValue00016","NeutralValue00004"} : LET s == StaticSelectionFixture96(host,1) effects == IF host="NeutralValue00004" THEN {} ELSE {"RetireHost2"} expected == StaticExpectedFixture96(s.imminentPlan,effects) observed == StaticObservedLedgerFixture96(s.selected,s.imminentP,s.imminentPlan,effects) atomic == [observed EXCEPT !.instances[601].status="Resolving"] atomicP == [s.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] atomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] overwrite == StaticObservedLedgerFixture96(observed,s.imminentP,s.imminentPlan,{"ChangedAfterOpening"}) IN /\ StaticSelectionValidFixture96(s) /\ ResolveConditionalWithoutInterrupt96(s.selected,atomic,<>,s.imminentP,atomicP,s.imminentPlan,atomicPlan, NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),expected) /\ atomic.instances[601].expected[1].effects=effects /\ (host="NeutralValue00016" => effects # {}) /\ (host="NeutralValue00004" => effects={}) /\ ~ObserveConditionalExpected96(observed,overwrite,s.imminentP,s.imminentPlan,StaticExpectedFixture96(s.imminentPlan,{"ChangedAfterOpening"})) StaticSingletonChecks96 == LET s == StaticSelectionFixture96("NeutralValue00016",1) observed == StaticObservedLedgerFixture96(s.selected,s.imminentP,s.imminentPlan,{"RetireHost2"}) atomic == [observed EXCEPT !.instances[601].status="Resolving"] atomicP == [s.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] atomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] states == [status \in {"Pending","Imminent","Resolving"} |-> CASE status="Pending" -> s.pending [] status="Imminent" -> s.selected [] OTHER -> atomic] otherSource == ReboundConditionalDefinition96(s.d,3) otherAbility == [s.d EXCEPT !.syntax.id=861,!.activity.id=861] IN /\ StaticSelectionValidFixture96(s) /\ ResolveConditionalWithoutInterrupt96(s.selected,atomic,<>,s.imminentP,atomicP,s.imminentPlan,atomicPlan, NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),StaticExpectedFixture96(s.imminentPlan,{"RetireHost2"})) /\ \A status \in DOMAIN states : LET before == states[status] stack == IF status="Pending" THEN <> ELSE <> cp == StaticCheckpointFixture96(before,3,s.definitions,s.objects,0,0) after == ConditionalCommittedFixture96(before,s.definitions,cp,Empty9,Empty9,Empty9) allocation == [key \in s.keys |-> 602] bindings == ConditionalBindingsFixture96(s.keys,3,901,91) badAfter == ConditionalCommittedFixture96(before,s.definitions,cp,allocation,bindings,Empty9) IN /\ ConditionalSibling96(s.d,before.instances) /\ ProcessConditionalCheckpoint96(before,after,stack,stack,s.definitions,cp,StaticConditionsFixture96(s.definitions,cp),Empty9,Empty9,Empty9,Empty9,{900}) /\ DOMAIN after.instances={601} /\ after.instances[601].member.windowId=900 /\ ~ProcessConditionalCheckpoint96(before,badAfter,stack,stack,s.definitions,cp,StaticConditionsFixture96(s.definitions,cp),allocation,bindings,Empty9,Empty9,{900}) /\ ~ConditionalSibling96(otherSource,before.instances) /\ ~ConditionalSibling96(otherAbility,before.instances) StaticTriggerSiblingControlChecks96 == LET d == ConditionalDefinitionFixture96(861,"Specimen0033","Trigger","Exposed","SchemaAtom016","Controller","SchemaAtom016") definitions == StaticDefinitionsFixture96({d}) objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0033","Play",TRUE,"Up") ELSE CardObject9("Specimen0221","Play",TRUE,"Down")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) event1 == ConditionalEventFixture96(510,"Exposed",2,"SideB","SideA",initial,800) cp1 == [StaticCheckpointFixture96(seed,1,definitions,objects,0,0) EXCEPT !.occurrences=[id \in {510} |-> event1]] keys1 == {[definition |-> ConditionalKey96(d),occurrence |-> 510]} a1 == [key \in keys1 |-> 610] b1 == ConditionalBindingsFixture96(keys1,1,910,91) first == ConditionalCommittedFixture96(seed,definitions,cp1,a1,b1,Empty9) event2 == ConditionalEventFixture96(511,"Exposed",2,"SideB","SideA",SnapshotWithConditionalRegistry96(cp1.processingSnapshot,first),801) cp2 == [StaticCheckpointFixture96(first,2,definitions,objects,0,0) EXCEPT !.occurrences=[id \in {511} |-> event2]] keys2 == {[definition |-> ConditionalKey96(d),occurrence |-> 511]} a2 == [key \in keys2 |-> 611] b2 == ConditionalBindingsFixture96(keys2,2,911,92) SchemaAtom187 == ConditionalCommittedFixture96(first,definitions,cp2,a2,b2,Empty9) IN /\ ProcessConditionalCheckpoint96(seed,first,<<>>,<<>>,definitions,cp1,ConditionalConditionsFixture96(definitions,cp1.occurrences),a1,b1,Empty9,Empty9,{}) /\ ConditionalSibling96(d,first.instances) /\ ProcessConditionalCheckpoint96(first,SchemaAtom187,<<>>,<<>>,definitions,cp2,ConditionalConditionsFixture96(definitions,cp2.occurrences),a2,b2,Empty9,Empty9,{910}) /\ DOMAIN SchemaAtom187.instances={610,611} /\ SchemaAtom187.instances[610].status="Pending" /\ SchemaAtom187.instances[611].status="Pending" /\ SchemaAtom187.instances[610].member.windowId # SchemaAtom187.instances[611].member.windowId StaticInstructionCheckpointFixture96(p,id) == [tag |-> "ConditionalInstructionCheckpoint",id |-> id,abilityInstance |-> p.id,transactionId |-> p.transaction, source |-> p.ability.source,instruction |-> p.ability.instructions[p.ability.cursor],index |-> p.ability.cursor, complete |-> TRUE,allNewerChainsComplete |-> TRUE] StaticInterruptPreventionChecks96 == LET s == StaticSelectionFixture96("NeutralValue00016",1) expected == StaticExpectedFixture96(s.imminentPlan,{"RetireHost2"}) observed == StaticObservedLedgerFixture96(s.selected,s.imminentP,s.imminentPlan,expected.effects) opening == [OpeningFixture92(901,"Interrupt",s.site,Empty9,91,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(s.imminentPlan)] child == NewPriorityWindow9(901,"Interrupt",s.site,Empty9,91,NoTimingRef9,opening.instruction,opening.effectRevision) cp3 == [StaticCheckpointFixture96(observed,3,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalPriorityCaller96(child)] childReceived == ConditionalCommittedFixture96(observed,s.definitions,cp3,Empty9,Empty9,Empty9) ready == [ReadyFixture92(child) EXCEPT !.checkpoint=3] option == PriorityOption9(630,"PaidInterrupt","SideB",999,0,RuleAbilitySource9("SyntheticPreventHostRetire96"),0,{}) effect == EffectFixture92(child,{}, {999}) started == StartedFixture92(ready,option) modification == [tag |-> "InstructionModification",instruction |-> 700,revision |-> 0,authorized |-> TRUE,steps |-> <<"PreventedNoWorldChange">>] modified == [s.imminentPlan EXCEPT !.steps=modification.steps,!.revision=1] returned == CompletePriorityOptionFrame9(started) cp4 == [StaticCheckpointFixture96(childReceived,4,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalPriorityCaller96(returned)] sideBReceived == ConditionalCommittedFixture96(childReceived,s.definitions,cp4,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(returned) EXCEPT !.checkpoint=4] passed == PassPriorityFrame9(sideB) cp5 == [StaticCheckpointFixture96(sideBReceived,5,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalPriorityCaller96(passed)] sideAReceived == ConditionalCommittedFixture96(sideBReceived,s.definitions,cp5,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(passed) EXCEPT !.checkpoint=5] closed == PassPriorityFrame9(sideA) modifiedEffect == [effect EXCEPT !.revision=2] clearance == InstructionClearanceFixture93(modified,901,0) atomic == [sideAReceived EXCEPT !.instances[601].status="Resolving"] atomicP == [s.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] atomicPlan == [modified EXCEPT !.phase="Resolving"] badOverwrite == StaticObservedLedgerFixture96(sideAReceived,s.imminentP,modified,{}) finished == [atomic EXCEPT !.instances[601].status="Complete"] finishedP == [atomicP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] finishedPlan == [atomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=modification.steps] beforeSnapshot == StaticSnapshotFixture96(60,5,"BeforeFinalInstructionFinish",s.definitions,s.objects,atomic,0) afterSnapshot == StaticSnapshotFixture96(61,5,"AfterFinalInstructionFinish",s.definitions,s.objects,finished,0) finalCP == [StaticCheckpointFixture96(finished,6,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalInstructionCaller96(finishedP)] nextAllocation == [key \in s.keys |-> 602] nextBindings == ConditionalBindingsFixture96(s.keys,6,902,92) next == ConditionalCommittedFixture96(finished,s.definitions,finalCP,nextAllocation,nextBindings,Empty9) IN /\ StaticSelectionValidFixture96(s) /\ OpenConditionalInstructionInterrupt96(s.selected,observed,<>,<>,s.imminentP,s.imminentPlan,901,s.site,Empty9,opening,{900},expected) /\ ProcessConditionalCheckpoint96(observed,childReceived,<>,<>,s.definitions,cp3,StaticConditionsFixture96(s.definitions,cp3),Empty9,Empty9,Empty9,Empty9,{900,901}) /\ CheckpointPriorityWithConditionals96(childReceived,<>,<>,[CheckpointFixture92(child) EXCEPT !.id=3]) /\ BeginPriorityOption9(<>,<>,option,s.objects,LegalityFixture92(ready,option),effect) /\ AlterAbilityInstruction93(s.imminentP.ability,s.imminentPlan,modified,modification) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(started)) /\ ProcessConditionalCheckpoint96(childReceived,sideBReceived,<>,<>,s.definitions,cp4,StaticConditionsFixture96(s.definitions,cp4),Empty9,Empty9,Empty9,Empty9,{900,901}) /\ CheckpointPriorityWithConditionals96(sideBReceived,<>,<>,[CheckpointFixture92(returned) EXCEPT !.id=4]) /\ PassPriority9(<>,<>,"SideB",modifiedEffect) /\ ProcessConditionalCheckpoint96(sideBReceived,sideAReceived,<>,<>,s.definitions,cp5,StaticConditionsFixture96(s.definitions,cp5),Empty9,Empty9,Empty9,Empty9,{900,901}) /\ CheckpointPriorityWithConditionals96(sideAReceived,<>,<>,[CheckpointFixture92(passed) EXCEPT !.id=5]) /\ PassPriority9(<>,<>,"SideA",modifiedEffect) /\ ~closed.open /\ closed.pending={} /\ ResolveConditionalAfterInterrupt96(sideAReceived,atomic,<>,<>,s.imminentP,atomicP,modified,atomicPlan,clearance) /\ atomic.instances[601].expected[1].instruction.revision=0 /\ modified.revision=1 /\ atomic.instances[601].expected[1].effects={"RetireHost2"} /\ ~ObserveConditionalExpected96(sideAReceived,badOverwrite,s.imminentP,modified,StaticExpectedFixture96(modified,{})) /\ CarryConditionalInstruction96(atomic,finished,finished,<>,<>,atomicP,finishedP,atomicPlan,finishedPlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "PreventedNoWorldChange",complete |-> TRUE],beforeSnapshot,afterSnapshot) /\ ~AbilityIsResolving9(finishedP.ability) /\ ~finishedP.ability.returned /\ finishedP.phase="InstructionCheckpoint" /\ finished.throttle=Empty9 /\ finished.instances[601].status="Complete" /\ finished.lastCheckpoint=5 /\ ProcessConditionalCheckpoint96(finished,next,<>,<>,s.definitions,finalCP,StaticConditionsFixture96(s.definitions,finalCP),nextAllocation,nextBindings,Empty9,Empty9,{900,901}) /\ next.instances[601].status="Complete" /\ next.instances[602].status="Pending" /\ ~ConditionalCheckpointDrained96(next,<>,6) /\ ~ConditionalInstructionCheckpoint96(next,<>,finishedP,[finishedP EXCEPT !.phase="Complete",!.checkpoint=6],StaticInstructionCheckpointFixture96(finishedP,6)) StaticNextEntryFixture96(plan,id) == LET base == InstructionEntryFixture93(plan) IN [field \in DOMAIN base \cup {"checkpointId"} |-> IF field="checkpointId" THEN id ELSE base[field]] StaticAllInstructionExpectedChecks96 == \A firstEmpty \in BOOLEAN : LET s == StaticSelectionFixture96("NeutralValue00016",2) firstEffects == IF firstEmpty THEN {} ELSE {"GainExposureMarkerSideB"} firstObserved == StaticObservedLedgerFixture96(s.selected,s.imminentP,s.imminentPlan,firstEffects) firstAtomic == [firstObserved EXCEPT !.instances[601].status="Resolving"] firstAtomicP == [s.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] firstAtomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] betweenP == [firstAtomicP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Between"] firstCompletePlan == [firstAtomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=s.plan.steps] firstBeforeSnapshot == StaticSnapshotFixture96(30,2,"BeforeFirstInstructionFinish",s.definitions,s.objects,firstAtomic,0) firstAfterSnapshot == [StaticSnapshotFixture96(31,2,"AfterFirstInstructionFinish",s.definitions,s.objects,firstAtomic,0) EXCEPT !.exposureMarkers["SideB"]=IF firstEmpty THEN 0 ELSE 1] cp3 == [StaticCheckpointFixture96(firstAtomic,3,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalInstructionCaller96(betweenP),!.beginSnapshot.exposureMarkers=firstAfterSnapshot.exposureMarkers,!.processingSnapshot.exposureMarkers=firstAfterSnapshot.exposureMarkers] drained == ConditionalCommittedFixture96(firstAtomic,s.definitions,cp3,Empty9,Empty9,Empty9) nextP == [betweenP EXCEPT !.phase="Targets",!.checkpoint=3] nextPlan == OpenInstruction93(701,"Ability",601,s.d.syntax.source,"Rule",2,"NoValue",<<"NoEffect">>,FALSE) nextImminentPlan == [nextPlan EXCEPT !.announced=TRUE,!.targets={},!.phase="Imminent"] nextImminentP == [nextP EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.cursor=2,!.ability.phase="Imminent"] nextImminent == [drained EXCEPT !.instances[601].status="Imminent"] nextObserved == StaticObservedLedgerFixture96(nextImminent,nextImminentP,nextImminentPlan,{}) nextAtomic == [nextObserved EXCEPT !.instances[601].status="Resolving"] nextAtomicP == [nextImminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] nextAtomicPlan == [nextImminentPlan EXCEPT !.phase="Resolving"] complete == [nextAtomic EXCEPT !.instances[601].status="Complete", !.throttle=IF firstEmpty THEN [key \in {ConditionalKey96(s.d)} |-> 0] ELSE @] completeP == [nextAtomicP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [nextAtomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"NoEffect">>] secondBeforeSnapshot == SnapshotWithConditionalRegistry96([firstAfterSnapshot EXCEPT !.id=40,!.checkpointId=3,!.point="BeforeSecondInstructionFinish"],nextAtomic) secondAfterSnapshot == SnapshotWithConditionalRegistry96([secondBeforeSnapshot EXCEPT !.id=41,!.point="AfterSecondInstructionFinish"],complete) cp4 == [StaticCheckpointFixture96(complete,4,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalInstructionCaller96(completeP),!.beginSnapshot.exposureMarkers=firstAfterSnapshot.exposureMarkers,!.processingSnapshot.exposureMarkers=firstAfterSnapshot.exposureMarkers] nextKeys == IF firstEmpty THEN {} ELSE s.keys allocation == [key \in nextKeys |-> 602] bindings == ConditionalBindingsFixture96(nextKeys,4,902,92) result == ConditionalCommittedFixture96(complete,s.definitions,cp4,allocation,bindings,Empty9) IN /\ StaticSelectionValidFixture96(s) /\ ResolveConditionalWithoutInterrupt96(s.selected,firstAtomic,<>,s.imminentP,firstAtomicP,s.imminentPlan,firstAtomicPlan, NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),StaticExpectedFixture96(s.imminentPlan,firstEffects)) /\ CarryConditionalInstruction96(firstAtomic,firstAtomic,firstAtomic,<>,<>,firstAtomicP,betweenP,firstAtomicPlan,firstCompletePlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> s.plan.steps[1],complete |-> TRUE],firstBeforeSnapshot,firstAfterSnapshot) /\ firstAtomic.instances[601].status="Resolving" /\ AbilityIsResolving9(betweenP.ability) /\ ProcessConditionalCheckpoint96(firstAtomic,drained,<>,<>,s.definitions,cp3,StaticConditionsFixture96(s.definitions,cp3),Empty9,Empty9,Empty9,Empty9,{900}) /\ ConditionalInstructionCheckpoint96(drained,<>,betweenP,nextP,StaticInstructionCheckpointFixture96(betweenP,3)) /\ EnterNextConditionalInstruction96(drained,nextImminent,<>,nextP,nextImminentP,nextPlan,nextImminentPlan, [InstructionTargetsFixture93(nextPlan) EXCEPT !.targets={}],StaticNextEntryFixture96(nextPlan,3)) /\ ResolveConditionalWithoutInterrupt96(nextImminent,nextAtomic,<>,nextImminentP,nextAtomicP,nextImminentPlan,nextAtomicPlan, NoModifiersFixture95(nextImminentPlan),InstructionClearanceFixture93(nextImminentPlan,0,0),StaticExpectedFixture96(nextImminentPlan,{})) /\ nextAtomic.instances[601].expected[1].effects=firstEffects /\ nextAtomic.instances[601].expected[2].effects={} /\ CarryConditionalInstruction96(nextAtomic,complete,complete,<>,<>,nextAtomicP,completeP,nextAtomicPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 701,index |-> 1,step |-> "NoEffect",complete |-> TRUE],secondBeforeSnapshot,secondAfterSnapshot) /\ ConditionalExpectedEmpty96(complete.instances[601],s.d.instructions)=firstEmpty /\ (ConditionalKey96(s.d) \in DOMAIN complete.throttle)=firstEmpty /\ ProcessConditionalCheckpoint96(complete,result,<>,<>,s.definitions,cp4,StaticConditionsFixture96(s.definitions,cp4),allocation,bindings,Empty9,Empty9,{900}) /\ (602 \in DOMAIN result.instances)=~firstEmpty StaticTraversalControlFixture96(traversal) == [traversal |-> traversal,encounter |-> 0,siteInspections |-> Empty9,itemInspections |-> Empty9,abortedEncounters |-> {},abortedInspectiones |-> {},abortedItemInspectiones |-> {}, paidOpen |-> FALSE,windows |-> {},windowCleanupDue |-> FALSE,onlyWindowCleanup |-> FALSE,phaseEndedIds |-> {},phaseStepsSkipped |-> FALSE, redirect |-> NoTraversalRedirect6,redirectStage |-> "NoValue",redirectCheckpointDue |-> FALSE] StaticNoEffectThrottleChecks96 == LET s == StaticSelectionFixture96("NeutralValue00004",1) observed == StaticObservedLedgerFixture96(s.selected,s.imminentP,s.imminentPlan,{}) atomic == [observed EXCEPT !.instances[601].status="Resolving"] atomicP == [s.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] atomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] complete == [atomic EXCEPT !.instances[601].status="Complete",!.throttle=[key \in {ConditionalKey96(s.d)} |-> 0]] completeP == [atomicP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [atomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=s.plan.steps] beforeSnapshot == StaticSnapshotFixture96(30,2,"BeforeSpecimen0015NoEffectFinish",s.definitions,s.objects,atomic,0) afterSnapshot == StaticSnapshotFixture96(31,2,"AfterSpecimen0015NoEffectFinish",s.definitions,s.objects,complete,0) cp3 == [StaticCheckpointFixture96(complete,3,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalInstructionCaller96(completeP)] drained == ConditionalCommittedFixture96(complete,s.definitions,cp3,Empty9,Empty9,Empty9) badAllocation == [key \in s.keys |-> 602] badBindings == ConditionalBindingsFixture96(s.keys,3,902,92) badAfter == ConditionalCommittedFixture96(complete,s.definitions,cp3,badAllocation,badBindings,Empty9) finalP == [completeP EXCEPT !.phase="Complete",!.checkpoint=3] returnedP == [finalP EXCEPT !.phase="Returned",!.ability.returned=TRUE] resumed == CompletePriorityOptionFrame9(s.busy) cp4 == [StaticCheckpointFixture96(drained,4,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalPriorityCaller96(resumed)] received4 == ConditionalCommittedFixture96(drained,s.definitions,cp4,Empty9,Empty9,Empty9) ready4 == [ReadyFixture92(resumed) EXCEPT !.checkpoint=4] passed == PassPriorityFrame9(ready4) cp5 == [StaticCheckpointFixture96(received4,5,s.definitions,s.objects,0,0) EXCEPT !.caller=ConditionalPriorityCaller96(passed)] received5 == ConditionalCommittedFixture96(received4,s.definitions,cp5,Empty9,Empty9,Empty9) ready5 == [ReadyFixture92(passed) EXCEPT !.checkpoint=5] closed == PassPriorityFrame9(ready5) beforeControl == StaticTraversalControlFixture96(TraversalFixture92("ProcedureCode453e949a114f")) afterControl == [beforeControl EXCEPT !.traversal.step="ProcedureCode3a6daf593ad4"] dummyE == OpenEncounter6(0,2,2,FALSE,"traversal",<<>>) dummyM == OpenMovement6(beforeControl.traversal,"Initiation",0,0,TRUE) work == [jackChoice |-> "Continue",resolvedSub |-> 0] step == [tag |-> "TimingStructureStepCompleted",structure |-> TimingRef9("TraversalPhase",20),procedureId |-> 2,step |-> "ProcedureCode453e949a114f",previousSerial |-> 0,serial |-> 1] advanced == [received5 EXCEPT !.stepSerial=1] cp6 == StaticCheckpointFixture96(advanced,6,s.definitions,s.objects,0,0) allocation6 == [key \in s.keys |-> 602] bindings6 == ConditionalBindingsFixture96(s.keys,6,903,93) result == ConditionalCommittedFixture96(advanced,s.definitions,cp6,allocation6,bindings6,Empty9) IN /\ StaticSelectionValidFixture96(s) /\ ResolveConditionalWithoutInterrupt96(s.selected,atomic,<>,s.imminentP,atomicP,s.imminentPlan,atomicPlan, NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),StaticExpectedFixture96(s.imminentPlan,{})) /\ CarryConditionalInstruction96(atomic,complete,complete,<>,<>,atomicP,completeP,atomicPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> s.plan.steps[1],complete |-> TRUE],beforeSnapshot,afterSnapshot) /\ ConditionalExpectedEmpty96(complete.instances[601],s.d.instructions) /\ ~StaticRetryAllowed96(s.d,complete) /\ complete.stepSerial=0 /\ complete.instances[601].status="Complete" /\ ProcessConditionalCheckpoint96(complete,drained,<>,<>,s.definitions,cp3,StaticConditionsFixture96(s.definitions,cp3),Empty9,Empty9,Empty9,Empty9,{900}) /\ ~ProcessConditionalCheckpoint96(complete,badAfter,<>,<>,s.definitions,cp3,StaticConditionsFixture96(s.definitions,cp3),badAllocation,badBindings,Empty9,Empty9,{900}) /\ ConditionalInstructionCheckpoint96(drained,<>,completeP,finalP,StaticInstructionCheckpointFixture96(completeP,3)) /\ FinishConditionalProcedure96(<>,<>,finalP,returnedP,PaidReturnFixture95(s.busy,3)) /\ ProcessConditionalCheckpoint96(drained,received4,<>,<>,s.definitions,cp4,StaticConditionsFixture96(s.definitions,cp4),Empty9,Empty9,Empty9,Empty9,{900}) /\ CheckpointPriorityWithConditionals96(received4,<>,<>,[CheckpointFixture92(resumed) EXCEPT !.id=4]) /\ PassConditionalPriority96(received4,received4,received4,<>,<>,"SideB",Empty9, StaticSnapshotFixture96(40,4,"BeforeSideBPass",s.definitions,s.objects,received4,0),StaticSnapshotFixture96(41,4,"AfterSideBPass",s.definitions,s.objects,received4,0)) /\ ProcessConditionalCheckpoint96(received4,received5,<>,<>,s.definitions,cp5,StaticConditionsFixture96(s.definitions,cp5),Empty9,Empty9,Empty9,Empty9,{900}) /\ CheckpointPriorityWithConditionals96(received5,<>,<>,[CheckpointFixture92(passed) EXCEPT !.id=5]) /\ PassConditionalPriority96(received5,received5,received5,<>,<>,"SideA",Empty9, StaticSnapshotFixture96(50,5,"BeforeSideAPass",s.definitions,s.objects,received5,0),StaticSnapshotFixture96(51,5,"AfterSideAPass",s.definitions,s.objects,received5,0)) /\ PopClosedPriorityWindow9(<>,<<>>) /\ \A ledger \in {drained,received4,received5} : ledger.stepSerial=0 /\ ~StaticRetryAllowed96(s.d,ledger) /\ AdvanceConditionalTraversalStep96(received5,advanced,beforeControl,afterControl,LayoutFixture92,{2},dummyE,dummyM,work,20,TRUE,TRUE,step) /\ AdvanceNormalTraversalStep6(beforeControl,afterControl,LayoutFixture92,{2},dummyE,dummyM,work,20,TRUE,TRUE,{}) /\ ~AdvanceConditionalTraversalStep96(received5,advanced,beforeControl,afterControl,LayoutFixture92,{2},dummyE,dummyM,work,20,FALSE,TRUE,step) /\ ~AdvanceConditionalTraversalStep96(received5,advanced,beforeControl,afterControl,LayoutFixture92,{2},dummyE,dummyM,work,20,TRUE,FALSE,step) /\ ~AdvanceConditionalTraversalStep96(received5,advanced,beforeControl,afterControl,LayoutFixture92,{2},dummyE,dummyM,work,20,TRUE,TRUE,[step EXCEPT !.structure=TimingRef9("SchemaAtom138",20)]) /\ StaticRetryAllowed96(s.d,advanced) /\ ProcessConditionalCheckpoint96(advanced,result,<<>>,<<>>,s.definitions,cp6,StaticConditionsFixture96(s.definitions,cp6),allocation6,bindings6,Empty9,Empty9,{900}) /\ result.instances[602].status="Pending" /\ result.stepSerial=1 ConditionalExampleFamily001ExampleFamily012Scenario96 == LET d == [ConditionalDefinitionFixture96(870,"Specimen0007","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") EXCEPT !.effectChoices={{},{1}}] exampleFamily012 == [ConditionalDefinitionFixture96(871,"Specimen0078","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2)] key == ConditionalKey96(d) definitions == [k \in {key,ConditionalKey96(exampleFamily012)} |-> IF k=key THEN d ELSE exampleFamily012] objects == [id \in {1,2} |-> CardObject9(IF id=1 THEN "Specimen0007" ELSE "Specimen0078","Play",TRUE,"Up")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) events == [id \in {100} |-> ConditionalEventFixture96(id,"TurnBegins",0,"SideB","SideB",initial,500)] begin1 == [initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current1 == [begin1 EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp1 == ConditionalCheckpointFixture96(seed,1,begin1,current1,events) keys == {[definition |-> k,occurrence |-> 100] : k \in DOMAIN definitions} alloc == [k \in keys |-> IF k.definition=key THEN 201 ELSE 202] bindings == ConditionalBindingsFixture96(keys,1,400,40) pending == ConditionalCommittedFixture96(seed,definitions,cp1,alloc,bindings,Empty9) site == TurnSiteFixture92("SideB","ProcedureCodef53fc09e15ad",4) members == ConditionalWindowMembers96(pending.instances,400) open == WindowFixture92(400,"Reaction",site,members,40,NoTimingRef9) begin2 == SnapshotWithConditionalRegistry96([begin1 EXCEPT !.id=20,!.checkpointId=2],pending) current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(pending,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] reception == ConditionalCommittedFixture96(pending,definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,201) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(201,d,ready,option,LegalityFixture92(ready,option).transactionId,"Play") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == OpenInstruction93(700,"Ability",201,d.syntax.source,"Play",1,"NoValue",<<"RetireOtherDeployedCardGain3">>,TRUE) imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE,!.targets={2}] selected == [reception EXCEPT !.instances[201].status="Imminent"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {1}] resolving == [selected EXCEPT !.instances[201].status="Resolving",!.instances[201].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {1}]]] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] IN [definition |-> d,key |-> key,definitions |-> definitions,seed |-> seed,events |-> events,cp1 |-> cp1,alloc |-> alloc,bindings |-> bindings,pending |-> pending, site |-> site,open |-> open,cp2 |-> cp2,reception |-> reception,ready |-> ready,option |-> option,busy |-> busy,p |-> p,imminentP |-> imminentP, plan |-> plan,imminentPlan |-> imminentPlan,selected |-> selected,current |-> current2,expected |-> expected,resolving |-> resolving,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan] ConditionalExampleFamily001ExampleFamily012Checks96 == LET s == ConditionalExampleFamily001ExampleFamily012Scenario96 exampleFamily012Key == [ability |-> 871,source |-> ObjectAbilitySource9(2)] used == [s.resolving EXCEPT !.instances[201].used=TRUE] usedEvent == ConditionalUsedEvent96(s.resolvingP,1) before == SnapshotWithConditionalRegistry96(s.current,used) objects == [id \in {1,12} |-> IF id=1 THEN before.objects[1] ELSE CardObject9("Specimen0078","SideBDiscard",FALSE,"Up")] epochs == [key \in DOMAIN before.activationEpoch |-> IF key=exampleFamily012Key THEN 1 ELSE before.activationEpoch[key]] removed == [used EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.instances[202].status="Lost"] after == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(30,2,"AfterExampleFamily001Retire",s.definitions,objects),used) EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.usedObjects=before.usedObjects \cup DOMAIN objects] stackAfter == [s.busy EXCEPT !.pending={},!.lostPending={202}] IN /\ ProcessConditionalCheckpoint96(s.seed,s.pending,<<>>,<<>>,s.definitions,s.cp1,ConditionalConditionsFixture96(s.definitions,s.events),s.alloc,s.bindings,Empty9,Empty9,{}) /\ ~s.pending.instances[201].member.mandatory /\ s.pending.instances[202].member.mandatory /\ OpenConditionalReaction96(<<>>,<>,s.pending,400,s.site,OpeningFixture92(400,"Reaction",s.site,s.open.members,40,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.reception,<>,<>,s.definitions,s.cp2,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{400}) /\ CheckpointPriorityWithConditionals96(s.reception,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(s.reception,s.selected,<>,<>,s.p,s.imminentP,s.definition,SnapshotWithConditionalRegistry96(s.current,s.reception),201,s.option,LegalityFixture92(s.ready,s.option),Empty9, s.plan,s.imminentPlan,InstructionTargetsFixture93(s.plan),InstructionEntryFixture93(s.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> s.definition.syntax.id,source |-> s.definition.syntax.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(s.selected,s.resolving,<>,s.imminentP,s.resolvingP,s.imminentPlan,s.resolvingPlan,NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),s.expected) /\ RecordConditionalExecutionUse96(s.resolving,used,s.resolvingP,s.resolvingPlan,ConditionalExecutionFixture96(s.resolvingP,s.resolvingPlan,{1}), Empty9,[id \in {1} |-> usedEvent],Empty9,[id \in {1} |-> ConditionalTurnUseRow96(s.resolvingP,1)],1,{usedEvent}) /\ ObserveConditionalActivity96(used,used,removed,<>,<>,before,after) /\ removed.instances[201].status="Resolving" /\ removed.instances[202].status="Lost" /\ stackAfter.members=s.busy.members /\ stackAfter.pending={} /\ ~ConditionalInstanceCurrent96(s.pending.instances[202],s.definitions,SnapshotWithConditionalRegistry96(after,removed)) /\ objects[12].card="Specimen0078" /\ objects[12].zone="SideBDiscard" ConditionalPaidCheckpointChecks96 == LET paidD == PaidDefinitionFixture95(880,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) base == ConditionalDefinitionFixture96(881,"Specimen0007","Trigger","AbilityUsed","SchemaAtom016","SideB","SideB") reaction == [base EXCEPT !.syntax.source=RuleAbilitySource9("SyntheticCostReaction96"),!.syntax.cardKind="NoValue",!.activity.source=RuleAbilitySource9("SyntheticCostReaction96"),!.activity.provider="Rule",!.effectChoices={{},{1}}] definitions == [key \in {ConditionalKey96(reaction)} |-> reaction] objects == PaidSourceFixture95("Specimen0002") initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) EXCEPT !.activity.activeRules={"SyntheticCostReaction96"}] seed == NewConditionalLedger96(initial) window == PaidWindowFixture95(549,"Paid","SideB") option == PaidOptionFixture95(paidD,window) busy == StartedFixture92(window,option) p == OpenPaidProcedure95(1500,paidD,option,window,LegalityFixture92(window,option).transactionId,"Play") paid == PaidCommittedFixture95(p,Empty9,FALSE) planning == PaidTargetsFrame95(paid,1) uses == PaidUsesFixture95(p) turnUses == PaidTurnUsesFixture95(p) event == ConditionalEventFixture96(700,"AbilityUsed",1,"SideB","SideB",initial,1500) begin == [initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] events == [id \in {700} |-> event] cp == [ConditionalCheckpointFixture96(seed,1,begin,current,events) EXCEPT !.caller=PaidCheckpointCaller96(paid)] keys == {[definition |-> ConditionalKey96(reaction),occurrence |-> 700]} allocation == [key \in keys |-> 2201] bindings == ConditionalBindingsFixture96(keys,1,550,55) pending == ConditionalCommittedFixture96(seed,definitions,cp,allocation,bindings,Empty9) emptyCP == [cp EXCEPT !.occurrences=Empty9] noReactions == ConditionalCommittedFixture96(seed,definitions,emptyCP,Empty9,Empty9,Empty9) wrongCP == [emptyCP EXCEPT !.caller=[kind |-> "Observation"]] wrongCaller == ConditionalCommittedFixture96(seed,definitions,wrongCP,Empty9,Empty9,Empty9) IN /\ ReservePaidAbility95(<>,<>,p,1500,paidD,PaidContextFixture95(paidD,objects,TurnFixture92("SideB")),option,LegalityFixture92(window,option),{}) /\ PayPaidTrigger95(<>,p,paid,objects,objects,Empty9,Empty9,Empty9,DOMAIN objects,PaidPaymentFixture95(p,objects,objects,1,FALSE,FALSE),Empty9,uses,Empty9,turnUses,1,{PaidUseFixture95(p)}) /\ ProcessConditionalCheckpoint96(seed,pending,<>,<>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{549}) /\ ~PaidCheckpointWithConditionals96(pending,<>,paid,planning,objects,Empty9,PaidCheckpointFixture95(paid,1)) /\ ProcessConditionalCheckpoint96(seed,noReactions,<>,<>,definitions,emptyCP,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{549}) /\ PaidCheckpointWithConditionals96(noReactions,<>,paid,planning,objects,Empty9,PaidCheckpointFixture95(paid,1)) /\ ProcessConditionalCheckpoint96(seed,wrongCaller,<>,<>,definitions,wrongCP,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{549}) /\ ~PaidCheckpointWithConditionals96(wrongCaller,<>,paid,planning,objects,Empty9,PaidCheckpointFixture95(paid,1)) DelayedCreatorFixture96(source,kind) == LET base == OpenAbilityResolution9(6000,kind,source,"Play",<<6001>>,6002) ready == IF kind="Paid" THEN [base EXCEPT !.detached=TRUE] ELSE base planning == OpenInstruction93(6001,"Ability",6000,source,"Play",1,"NoValue",<<"CreateConditional">>,FALSE) announced == [planning EXCEPT !.announced=TRUE,!.targets={}] imminent == [announced EXCEPT !.phase="Imminent"] parentImminent == [ready EXCEPT !.phase="Imminent",!.firstImminent=TRUE,!.detached=ready.detached \/ kind="Conditional"] IN [base |-> base,ready |-> ready,planning |-> planning,announced |-> announced,imminent |-> imminent, parentImminent |-> parentImminent,resolving |-> [imminent EXCEPT !.phase="Resolving"], parentResolving |-> [parentImminent EXCEPT !.phase="Resolving"]] DelayedCreatorEntered96(c) == /\ IF c.ready.kind="Paid" THEN DetachPaidAbility9(c.base,c.ready,[abilityInstance |-> c.ready.id,allPaid |-> TRUE]) ELSE c.ready=c.base /\ AnnounceInstructionTargets93(c.planning,c.announced,[InstructionTargetsFixture93(c.planning) EXCEPT !.targets={}],c.ready,"NoValue") /\ EnterFirstAbilityInstruction93(c.ready,c.parentImminent,c.announced,c.imminent,InstructionEntryFixture93(c.announced)) /\ NoInstructionInterrupt93(c.imminent,c.parentImminent,"NoValue",NoModifiersFixture95(c.imminent),InstructionClearanceFixture93(c.imminent,0,0)) /\ BeginAbilityInstructionAtomic93(c.parentImminent,c.parentResolving,c.imminent,c.resolving,InstructionClearanceFixture93(c.imminent,0,0)) DelayedCreationReceiptFixture96(template,plan,duration,trigger) == [tag |-> "DelayedConditionalCreation",instruction |-> InstructionWindowRef93(plan),template |-> template, association |-> "Ordinary",duration |-> duration,triggerStructure |-> trigger, ifSuccessfulOrigin |-> [traversalId |-> 0,targetSiteRestricted |-> FALSE],permittedTargetSites |-> {}] DelayedCreatedFixture96(before,effectId,definitionId,template,plan,creation,traversal) == LET definition == DelayedDefinition96(template,definitionId,effectId) duration == IF creation.association="IfSuccessfulInspection" THEN TimingRef9("SchemaAtom138",traversal.id) ELSE creation.duration effect == [id |-> effectId,definition |-> definition,source |-> plan.source, policy |-> IF duration=NoTimingRef9 THEN "UntilResolution" ELSE "UntilDurationExpires", duration |-> duration,triggerStructure |-> IF template.thisTraversal THEN TimingRef9("SchemaAtom138",traversal.id) ELSE creation.triggerStructure, association |-> creation.association,traversalId |-> IF creation.association="IfSuccessfulInspection" THEN traversal.id ELSE 0] IN [before EXCEPT !.effects=[id \in DOMAIN @ \cup {effectId} |-> IF id=effectId THEN effect ELSE @[id]], !.usedDelayedEffects=@ \cup {effectId},!.usedDelayedDefinitions=@ \cup {definitionId}] DelayedTemplateFixture96(id,card,eventKind,thisTraversal) == [ConditionalDefinitionFixture96(id,card,"Trigger",eventKind,"SchemaAtom016","SideB","SideB") EXCEPT !.thisTraversal=thisTraversal] DelayedScenarioFixture96(card,eventKind,duration,trigger,thisTraversal) == LET template == [DelayedTemplateFixture96(6100,card,eventKind,thisTraversal) EXCEPT !.triggerRequirements=IF card="Specimen0117" THEN {1} ELSE {}] creator == DelayedCreatorFixture96(template.syntax.source,IF card="Specimen0126" THEN "Conditional" ELSE IF card="Specimen0142" THEN "Paid" ELSE "Play") objects == [id \in {1} |-> CardObject9(card,"Play",card # "Specimen0117","Up")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,objects) before == NewConditionalLedger96(initial) creation == DelayedCreationReceiptFixture96(template,creator.resolving,duration,trigger) after == DelayedCreatedFixture96(before,6200,6300,template,creator.resolving,creation,NoTraversal6) IN [template |-> template,creator |-> creator,objects |-> objects,initial |-> initial,before |-> before, creation |-> creation,after |-> after,definition |-> after.effects[6200].definition] DelayedDeployEventFixture96(event,cost) == [field \in DOMAIN event \cup {"printedDeployCost"} |-> IF field="printedDeployCost" THEN cost ELSE event[field]] DelayedConditionsFixture96(definitions,events) == [key \in DOMAIN definitions |-> [id \in DOMAIN events |-> [ConditionalTriggerReceiptFixture96(definitions[key],events[id]) EXCEPT !.results=[part \in definitions[key].triggerRequirements |-> IF part=1 THEN events[id].printedDeployCost>=1 ELSE TRUE]]]] DelayedRecognitionFixture96(s,eventKind,eventId,checkpointId,windowId) == LET definitions == DelayedConditionalDefinitions96(s.after.effects) objects == [id \in {11,20} |-> IF id=11 THEN CardObject9(s.objects[1].card,"SideBDiscard",FALSE,"Up") ELSE CardObject9("Specimen0079","Play",TRUE,"Up")] begin == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(10,checkpointId,"CheckpointBeginning",definitions,objects),s.after) EXCEPT !.usedObjects={1,11,20}] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] event == DelayedDeployEventFixture96([ConditionalEventFixture96(eventId,eventKind,20,"SideB","SideB",s.initial,6001) EXCEPT !.structure=s.creation.triggerStructure],3) events == [id \in {eventId} |-> event] cp == ConditionalCheckpointFixture96(s.after,checkpointId,begin,current,events) key == [definition |-> ConditionalKey96(s.definition),occurrence |-> eventId] allocation == [k \in {key} |-> 6400] bindings == ConditionalBindingsFixture96({key},checkpointId,windowId,64) after == ConditionalCommittedFixture96(s.after,definitions,cp,allocation,bindings,Empty9) IN [definitions |-> definitions,objects |-> objects,begin |-> begin,current |-> current,events |-> events,cp |-> cp, key |-> key,allocation |-> allocation,bindings |-> bindings,after |-> after] DelayedExplicitDurationChecks96 == LET s == DelayedScenarioFixture96("Specimen0117","Deployed",TimingRef9("Turn",3),NoTimingRef9,FALSE) r == DelayedRecognitionFixture96(s,"Deployed",101,1,6500) d == s.definition secondBegin == [SnapshotWithConditionalRegistry96(r.current,r.after) EXCEPT !.id=20,!.checkpointId=2,!.point="CheckpointBeginning", !.objects=[id \in DOMAIN @ \cup {21} |-> IF id=21 THEN CardObject9("Specimen0079","Play",TRUE,"Up") ELSE @[id]],!.usedObjects=@ \cup {21}] secondCurrent == [secondBegin EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] events2 == [id \in {102} |-> DelayedDeployEventFixture96(ConditionalEventFixture96(id,"Deployed",21,"SideB","SideB",r.current,6003),3)] cp2 == ConditionalCheckpointFixture96(r.after,2,secondBegin,secondCurrent,events2) key2 == [definition |-> ConditionalKey96(d),occurrence |-> 102] allocation2 == [k \in {key2} |-> 6401] bindings2 == ConditionalBindingsFixture96({key2},2,6501,65) twice == ConditionalCommittedFixture96(r.after,r.definitions,cp2,allocation2,bindings2,Empty9) ended == [tag |-> "TimingStructureEnded",structure |-> TimingRef9("Turn",3)] lost == [twice EXCEPT !.effects=Empty9,!.instances=[id \in DOMAIN @ |-> [@[id] EXCEPT !.status="Lost"]]] expired == [lost EXCEPT !.activationEpoch=[k \in DOMAIN @ |-> 1],!.activationSerial=1] beforeExpiry == SnapshotWithConditionalRegistry96(secondCurrent,twice) afterExpiry == [SnapshotWithConditionalRegistry96(secondCurrent,lost) EXCEPT !.id=30,!.activationEpoch=expired.activationEpoch,!.activationSerial=1] IN /\ CardFacts9["Specimen0117"].kind="Action" /\ DelayedCreatorEntered96(s.creator) /\ CreateDelayedConditional96(s.before,s.after,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ s.after.effects[6200].policy="UntilDurationExpires" /\ s.after.effects[6200].duration=TimingRef9("Turn",3) /\ s.after.effects[6200].source=ObjectAbilitySource9(1) /\ ProcessConditionalCheckpoint96(s.after,r.after,<<>>,<<>>,r.definitions,r.cp,DelayedConditionsFixture96(r.definitions,r.events),r.allocation,r.bindings,Empty9,Empty9,{}) /\ 1 \notin DOMAIN r.objects /\ ConditionalActive96(d,r.current) /\ r.after.instances[6400].member.source=ObjectAbilitySource9(1) /\ ProcessConditionalCheckpoint96(r.after,twice,<<>>,<<>>,r.definitions,cp2,DelayedConditionsFixture96(r.definitions,events2),allocation2,bindings2,Empty9,Empty9,{6500}) /\ DOMAIN twice.instances={6400,6401} /\ twice.instances[6400].status="Pending" /\ twice.instances[6401].status="Pending" /\ EffectsAfterConditionalResolution96(twice.effects,d)=twice.effects /\ ExpireDelayedConditionalTiming96(twice,lost,expired,<<>>,<<>>,ended,beforeExpiry,afterExpiry) /\ expired.effects=Empty9 /\ \A id \in DOMAIN expired.instances : expired.instances[id].status="Lost" /\ expired.usedDelayedEffects={6200} /\ expired.usedDelayedDefinitions={6300} /\ ~CreateDelayedConditional96(expired,DelayedCreatedFixture96(expired,6200,6301,s.template,s.creator.resolving,s.creation,NoTraversal6),6200,6301,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ ~CreateDelayedConditional96(expired,DelayedCreatedFixture96(expired,6201,6300,s.template,s.creator.resolving,s.creation,NoTraversal6),6201,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ ~CreateDelayedConditional96(s.before,s.after,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",[s.creation EXCEPT !.instruction.source=ObjectAbilitySource9(2)],NoTraversal6,{6100}) /\ ~CreateDelayedConditional96(s.before,s.after,6200,6300,s.template,s.creator.imminent,s.creator.parentImminent,"NoValue",[s.creation EXCEPT !.instruction=InstructionWindowRef93(s.creator.imminent)],NoTraversal6,{6100}) DelayedTraversalScopeChecks96 == LET s == DelayedScenarioFixture96("Specimen0142","TraversalEnds",NoTimingRef9,NoTimingRef9,TRUE) traversal == TraversalFixture92("ProcedureCode8b3260c0010f") after1 == DelayedCreatedFixture96(s.before,6200,6300,s.template,s.creator.resolving,s.creation,traversal) after2 == DelayedCreatedFixture96(after1,6201,6301,s.template,s.creator.resolving,s.creation,traversal) d1 == after1.effects[6200].definition d2 == after2.effects[6201].definition event == [ConditionalEventFixture96(110,"TraversalEnds",2,"SideB","SideB",s.initial,6001) EXCEPT !.structure=TimingRef9("SchemaAtom138",traversal.id)] siteInspectionTemplate == [DelayedTemplateFixture96(6110,"Specimen0117","Inspection",FALSE) EXCEPT !.trigger.actor="SchemaAtom016"] creation == [DelayedCreationReceiptFixture96(siteInspectionTemplate,s.creator.resolving,NoTimingRef9,NoTimingRef9) EXCEPT !.association="IfSuccessfulInspection",!.ifSuccessfulOrigin=[traversalId |-> traversal.id,targetSiteRestricted |-> TRUE],!.permittedTargetSites={"SchemaAtom082"}] successful == [traversal EXCEPT !.successful=TRUE,!.reachedSuccess=TRUE,!.step="ProcedureCoded75d879e00ff",!.phase="Success"] siteInspectionAfter == DelayedCreatedFixture96(s.before,6202,6302,siteInspectionTemplate,s.creator.resolving,creation,successful) siteInspectionDefinition == siteInspectionAfter.effects[6202].definition siteInspectionEvent == [ConditionalEventFixture96(111,"Inspection",2,"SideB","SideB",s.initial,6001) EXCEPT !.traversal=successful,!.step="ProcedureCoded75d879e00ff",!.siteInspection=[traversalId |-> successful.id,origin |-> "RulesTraversalInspection"]] IN /\ CardFacts9["Specimen0142"].kind="Technique" /\ DelayedCreatorEntered96(s.creator) /\ CreateDelayedConditional96(s.before,s.before,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ ~CreateDelayedConditional96(s.before,s.after,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ CreateDelayedConditional96(s.before,after1,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,traversal,{6100}) /\ CreateDelayedConditional96(after1,after2,6201,6301,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,traversal,{6100,6300}) /\ d1.syntax.source=d2.syntax.source /\ d1.syntax.id # d2.syntax.id /\ DOMAIN after2.effects={6200,6201} /\ DelayedConditionalEventScope96(d1,after2,event) /\ DelayedConditionalEventScope96(d2,after2,event) /\ ~DelayedConditionalEventScope96(d1,after2,[event EXCEPT !.structure=TimingRef9("SchemaAtom138",3)]) /\ CreateDelayedConditional96(s.before,siteInspectionAfter,6202,6302,siteInspectionTemplate,s.creator.resolving,s.creator.parentResolving,"NoValue",creation,successful,{6100,6110}) /\ siteInspectionAfter.effects[6202].duration=TimingRef9("SchemaAtom138",2) /\ DelayedConditionalEventScope96(siteInspectionDefinition,siteInspectionAfter,siteInspectionEvent) /\ ~DelayedConditionalEventScope96(siteInspectionDefinition,siteInspectionAfter,[siteInspectionEvent EXCEPT !.step="ProcedureCodebbb14496b09b"]) /\ ~DelayedConditionalEventScope96(siteInspectionDefinition,siteInspectionAfter,[siteInspectionEvent EXCEPT !.traversal.id=3,!.siteInspection.traversalId=3]) /\ ~DelayedConditionalEventScope96(siteInspectionDefinition,siteInspectionAfter,[siteInspectionEvent EXCEPT !.siteInspection.origin="AbilityInspection"]) /\ ~CreateDelayedConditional96(s.before,siteInspectionAfter,6202,6302,siteInspectionTemplate,s.creator.resolving,s.creator.parentResolving,"NoValue",creation,[successful EXCEPT !.successful=FALSE],{6100,6110}) /\ ~CreateDelayedConditional96(s.before,siteInspectionAfter,6202,6302,siteInspectionTemplate,s.creator.resolving,s.creator.parentResolving,"NoValue",[creation EXCEPT !.permittedTargetSites={"SchemaAtom129"}],successful,{6100,6110}) ExampleFamily092ReceiptFixture96(d,requestedClass,creator,snapshot,id) == [tag |-> "ConditionalExampleFamily092",class |-> requestedClass,ability |-> d.syntax.id,source |-> d.syntax.source, snapshotId |-> snapshot.id,instruction |-> InstructionWindowRef93(creator.resolving),authorized |-> TRUE, occurrenceId |-> id,deployActor |-> "SideA"] ExampleFamily092EventFixture96(d,requestedClass,creator,snapshot,id) == [ConditionalEventFixture96(id,CASE requestedClass="WhenScored" -> "ObjectivePlacementd" [] requestedClass="WhenDeployed" -> "Deployed" [] OTHER -> "EncounterBarrier", d.syntax.source.object,IF requestedClass="WhenEncountered" THEN "SideB" ELSE "SideA",d.syntax.side,snapshot,creator.resolving.id) EXCEPT !.scopeKind="Ability",!.scopeDefinition=ConditionalKey96(d)] ExampleFamily092SelectedChecks96 == LET astro == [ConditionalDefinitionFixture96(6700,"Specimen0022","Trigger","ObjectivePlacementd","SchemaAtom149","SideA","SideA") EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2)] exampleFamily029 == [ConditionalDefinitionFixture96(6701,"Specimen0140","Trigger","ObjectivePlacementd","SchemaAtom149","SideA","SideA") EXCEPT !.syntax.source=ObjectAbilitySource9(3),!.activity.source=ObjectAbilitySource9(3),!.triggerRequirements={2}] Specimen0150 == [ConditionalDefinitionFixture96(6702,"Specimen0150","Trigger","ObjectivePlacementd","SchemaAtom016","SideA","SideA") EXCEPT !.syntax.source=ObjectAbilitySource9(4),!.activity.source=ObjectAbilitySource9(4)] definitions == [key \in {ConditionalKey96(astro),ConditionalKey96(exampleFamily029),ConditionalKey96(Specimen0150)} |-> IF key=ConditionalKey96(astro) THEN astro ELSE IF key=ConditionalKey96(exampleFamily029) THEN exampleFamily029 ELSE Specimen0150] scoredObjects == [id \in {1,2,3,4} |-> IF id=1 THEN CardObject9("Specimen0001","Play",FALSE,"Up") ELSE IF id=2 THEN CardObject9("Specimen0022","SideAObjectiveCompletion",FALSE,"Up") ELSE IF id=3 THEN CardObject9("Specimen0140","SideAObjectiveCompletion",FALSE,"Up") ELSE CardObject9("Specimen0150","Play",TRUE,"Up")] objects == [id \in {1,2,4,13} |-> IF id=13 THEN CardObject9("Specimen0140","Removed",FALSE,"Up") ELSE scoredObjects[id]] exampleFamily029Objects == [id \in {1,3,4,12} |-> IF id=12 THEN CardObject9("Specimen0022","Removed",FALSE,"Up") ELSE scoredObjects[id]] snapshot == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) EXCEPT !.usedObjects={1,2,3,4,13},!.objectiveCompletionEvents={1001,1002}] before == NewConditionalLedger96(snapshot) creator == DelayedCreatorFixture96(ObjectAbilitySource9(1),"Play") effect == ExampleFamily092ReceiptFixture96(astro,"WhenScored",creator,snapshot,201) event == ExampleFamily092EventFixture96(astro,"WhenScored",creator,snapshot,201) events == [id \in {201} |-> event] begin == [snapshot EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp == ConditionalCheckpointFixture96(before,1,begin,current,events) key == [definition |-> ConditionalKey96(astro),occurrence |-> 201] allocation == [k \in {key} |-> 6800] bindings == ConditionalBindingsFixture96({key},1,6900,69) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) IN /\ CardFacts9["Specimen0001"].kind="Plan" /\ DelayedCreatorEntered96(creator) /\ ForfeitObjectivePost8(scoredObjects,objects,3,13,DOMAIN scoredObjects) /\ ForfeitObjectivePost8(scoredObjects,exampleFamily029Objects,2,12,DOMAIN scoredObjects) /\ ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",effect,snapshot,event) /\ ProcessConditionalCheckpoint96(before,after,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ DOMAIN after.instances={6800} /\ after.instances[6800].member.ability=6700 /\ after.lastSnapshot.objectiveCompletionEvents=snapshot.objectiveCompletionEvents /\ after.lastSnapshot.objects=objects /\ ~TriggerPattern96(Specimen0150,event) /\ ~TriggerPattern96(exampleFamily029,event) /\ ~ExampleFamily092Occurrence96([astro EXCEPT !.syntax.kind="Paid"],"WhenScored",creator.resolving,creator.parentResolving,"NoValue",effect,snapshot,event) /\ ~ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",effect,snapshot,[event EXCEPT !.scopeKind="Global"]) /\ ~ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",effect,snapshot,[event EXCEPT !.scopeDefinition=ConditionalKey96(exampleFamily029)]) /\ ~ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",[effect EXCEPT !.ability=6701],snapshot,event) /\ ~ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",[effect EXCEPT !.source=ObjectAbilitySource9(3)],snapshot,event) /\ ~ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",[effect EXCEPT !.snapshotId=99],snapshot,event) /\ ~ExampleFamily092Occurrence96(astro,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",[effect EXCEPT !.authorized=FALSE],snapshot,event) /\ \A exposureMarkers \in 0..2 : LET hasExposureMarkers == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,exampleFamily029Objects) EXCEPT !.exposureMarkers["SideB"]=exposureMarkers,!.usedObjects={1,2,3,4,12},!.objectiveCompletionEvents={1001,1002}] mEvent == ExampleFamily092EventFixture96(exampleFamily029,"WhenScored",creator,hasExposureMarkers,202) mEvents == [id \in {202} |-> mEvent] mEffect == ExampleFamily092ReceiptFixture96(exampleFamily029,"WhenScored",creator,hasExposureMarkers,202) mBegin == [hasExposureMarkers EXCEPT !.id=20,!.checkpointId=1,!.point="CheckpointBeginning"] mCurrent == [mBegin EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] mCp == ConditionalCheckpointFixture96(NewConditionalLedger96(hasExposureMarkers),1,mBegin,mCurrent,mEvents) candidates == IF exposureMarkers>0 THEN {[definition |-> ConditionalKey96(exampleFamily029),occurrence |-> 202]} ELSE {} alloc == [k \in candidates |-> 6801] binds == ConditionalBindingsFixture96(candidates,1,6901,69) conditions == [ConditionalConditionsFixture96(definitions,mEvents) EXCEPT ![ConditionalKey96(exampleFamily029)][202].results[2]=exposureMarkers>0] result == ConditionalCommittedFixture96(NewConditionalLedger96(hasExposureMarkers),definitions,mCp,alloc,binds,Empty9) IN /\ ExampleFamily092Occurrence96(exampleFamily029,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",mEffect,hasExposureMarkers,mEvent) /\ ProcessConditionalCheckpoint96(NewConditionalLedger96(hasExposureMarkers),result,<<>>,<<>>,definitions,mCp,conditions,alloc,binds,Empty9,Empty9,{}) /\ Cardinality(DOMAIN result.instances)=IF exposureMarkers>0 THEN 1 ELSE 0 /\ LET other == [astro EXCEPT !.syntax.controller="SideB"] e == ExampleFamily092EventFixture96(other,"WhenScored",creator,snapshot,203) receipt == ExampleFamily092ReceiptFixture96(other,"WhenScored",creator,snapshot,203) IN /\ ExampleFamily092Occurrence96(other,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",receipt,snapshot,e) /\ e.actor="SideA" /\ ~ExampleFamily092Occurrence96(other,"WhenScored",creator.resolving,creator.parentResolving,"NoValue",receipt,snapshot,[e EXCEPT !.actor="SideB"]) /\ LET chosenBarrier == ConditionalDefinitionFixture96(6703,"Specimen0088","Trigger","EncounterBarrier","SchemaAtom016","SideB","SchemaAtom016") ownDeploy == [chosenBarrier EXCEPT !.trigger.kinds={"Deployed"},!.trigger.subject="SchemaAtom149"] barrierCard == ConditionalDefinitionFixture96(6704,"NeutralValue00016","Trigger","EncounterBarrier","SchemaAtom149","SideB","SchemaAtom016") IN /\ "WhenEncountered" \notin ConditionalClasses96(chosenBarrier) /\ "WhenDeployed" \in ConditionalClasses96(ownDeploy) /\ "WhenEncountered" \in ConditionalClasses96(barrierCard) /\ ~ExampleFamily092Occurrence96(chosenBarrier,"WhenEncountered",creator.resolving,creator.parentResolving,"NoValue", ExampleFamily092ReceiptFixture96(chosenBarrier,"WhenEncountered",creator,snapshot,204),snapshot, ExampleFamily092EventFixture96(chosenBarrier,"WhenEncountered",creator,snapshot,204)) DelayedNextResolutionChecks96 == \A card \in {"Specimen0126","Specimen0117"} : LET oneShot == card="Specimen0126" eventKind == IF oneShot THEN "TurnEnds" ELSE "Deployed" stepName == IF oneShot THEN "TakeOneExposureMarker" ELSE "DrawOneOrGainOne" s == DelayedScenarioFixture96(card,eventKind,IF oneShot THEN NoTimingRef9 ELSE TimingRef9("Turn",1),IF oneShot THEN TimingRef9("Turn",1) ELSE NoTimingRef9,FALSE) r == DelayedRecognitionFixture96(s,eventKind,103,1,6502) d == s.definition turn == [TurnFixture92("SideB") EXCEPT !.phase=IF oneShot THEN "Discard" ELSE "NeutralValue00001"] endedTurn == IF oneShot THEN [turn EXCEPT !.formalEnded=TRUE] ELSE turn siteStep == IF oneShot THEN "ProcedureCode8f113080e47f" ELSE "ProcedureCode989abc27e0c6" site == TurnPrioritySite9(endedTurn,siteStep,10,3,TurnContextFixture92(endedTurn,siteStep)) members == ConditionalWindowMembers96(r.after.instances,6502) open == WindowFixture92(6502,"Reaction",site,members,64,NoTimingRef9) begin2 == [SnapshotWithConditionalRegistry96(r.current,r.after) EXCEPT !.id=20,!.checkpointId=2,!.point="CheckpointBeginning"] current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(r.after,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] received == ConditionalCommittedFixture96(r.after,r.definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,6400) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(6400,d,ready,option,LegalityFixture92(ready,option).transactionId,"NoValue") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received EXCEPT !.instances[6400].status="Imminent"] plan == OpenInstruction93(700,"Ability",6400,d.syntax.source,"NoValue",1,"NoValue",<>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={},!.phase="Imminent"] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {stepName}] resolving == [selected EXCEPT !.instances[6400].status="Resolving",!.instances[6400].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {stepName}]]] completeP == [resolvingP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <>] candidate == [resolving EXCEPT !.instances[6400].status="Complete",!.effects=IF oneShot THEN Empty9 ELSE @] complete == IF oneShot THEN [candidate EXCEPT !.activationEpoch=[key \in DOMAIN @ |-> 1],!.activationSerial=1] ELSE candidate beforeCompletion == SnapshotWithConditionalRegistry96(current2,resolving) afterCompletion == [SnapshotWithConditionalRegistry96(current2,candidate) EXCEPT !.id=30,!.activationEpoch=complete.activationEpoch,!.activationSerial=complete.activationSerial] IN /\ CardFacts9["Specimen0126"].kind="Support" /\ DelayedCreatorEntered96(s.creator) /\ IF oneShot THEN TurnFormalEnd5(turn,endedTurn,TRUE,TurnEndEvents5(turn)) ELSE endedTurn=turn /\ CreateDelayedConditional96(s.before,s.after,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ s.after.effects[6200].policy=IF oneShot THEN "UntilResolution" ELSE "UntilDurationExpires" /\ ProcessConditionalCheckpoint96(s.after,r.after,<<>>,<<>>,r.definitions,r.cp,DelayedConditionsFixture96(r.definitions,r.events),r.allocation,r.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,r.after,6502,site,OpeningFixture92(6502,"Reaction",site,members,64,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(r.after,received,<>,<>,r.definitions,cp2,ConditionalConditionsFixture96(r.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{6502}) /\ CheckpointPriorityWithConditionals96(received,<>,<>,[CheckpointFixture92(open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(received,selected,<>,<>,p,imminentP,d,SnapshotWithConditionalRegistry96(current2,received),6400,option,LegalityFixture92(ready,option),Empty9, plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9]) /\ selected.effects=s.after.effects /\ selected.instances[6400].status="Imminent" /\ ResolveConditionalWithoutInterrupt96(selected,resolving,<>,imminentP,resolvingP,imminentPlan,resolvingPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0),expected) /\ resolving.effects=s.after.effects /\ resolving.instances[6400].status="Resolving" /\ CarryConditionalInstruction96(resolving,candidate,complete,<>,<>,resolvingP,completeP,resolvingPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> stepName,complete |-> TRUE],beforeCompletion,afterCompletion) /\ complete.effects=IF oneShot THEN Empty9 ELSE s.after.effects /\ complete.instances[6400].status="Complete" /\ ~completeP.ability.returned /\ complete.instances[6400].member.source=ObjectAbilitySource9(1) /\ 1 \notin DOMAIN beforeCompletion.objects /\ ConditionalActive96(d,afterCompletion)=~oneShot /\ ~CarryConditionalInstruction96(resolving,resolving,resolving,<>,<>,resolvingP,completeP,resolvingPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> stepName,complete |-> TRUE],beforeCompletion,beforeCompletion) DelayedGenericExpiryChecks96 == LET duration == [kind |-> "Stated",id |-> 7000,condition |-> "NextOwnDrawComplete",player |-> "SideB",createdBy |-> 6001] s == DelayedScenarioFixture96("Specimen0117","Deployed",duration,NoTimingRef9,FALSE) r == DelayedRecognitionFixture96(s,"Deployed",104,1,6503) d == s.definition pendingWindow == WindowFixture92(6503,"Reaction",TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3),ConditionalWindowMembers96(r.after.instances,6503),64,NoTimingRef9) ready == ReadyFixture92(pendingWindow) busy == StartedFixture92(ready,ConditionalOptionFixture92(ready,6400)) lostWindow == [pendingWindow EXCEPT !.pending={},!.lostPending={6400}] detached == [r.after EXCEPT !.instances[6400].status="Resolving"] beforeSnapshot == SnapshotWithConditionalRegistry96(r.current,detached) candidate == [detached EXCEPT !.effects=Empty9] after == [candidate EXCEPT !.activationEpoch=[key \in DOMAIN @ |-> 1],!.activationSerial=1] afterSnapshot == [SnapshotWithConditionalRegistry96(r.current,candidate) EXCEPT !.id=31,!.activationEpoch=after.activationEpoch,!.activationSerial=1] receipt == [tag |-> "DelayedConditionalDurationExpiry",observationId |-> 7001,expiredDurations |-> {duration}] wrongDuration == [duration EXCEPT !.player="SideA"] IN /\ DelayedDurationValid96(duration) /\ DelayedCreatorEntered96(s.creator) /\ PriorityStackValid9(<>) /\ 6400 \notin busy.pending /\ busy.busy.instance=6400 /\ CreateDelayedConditional96(s.before,s.after,6200,6300,s.template,s.creator.resolving,s.creator.parentResolving,"NoValue",s.creation,NoTraversal6,{6100}) /\ s.after.effects[6200].duration=duration /\ ProcessConditionalCheckpoint96(s.after,r.after,<<>>,<<>>,r.definitions,r.cp,DelayedConditionsFixture96(r.definitions,r.events),r.allocation,r.bindings,Empty9,Empty9,{}) /\ ExpireDelayedConditionalDuration96(detached,candidate,after,<>,<>,receipt,beforeSnapshot,afterSnapshot) /\ after.instances[6400]=detached.instances[6400] /\ after.effects=Empty9 /\ ~ConditionalActive96(d,afterSnapshot) /\ ~ExpireDelayedConditionalDuration96(detached,candidate,after,<>,<>,[receipt EXCEPT !.expiredDurations={wrongDuration}],beforeSnapshot,afterSnapshot) /\ ExpireDelayedConditionalDuration96(detached,detached,detached,<>,<>,[receipt EXCEPT !.expiredDurations={wrongDuration}],beforeSnapshot,beforeSnapshot) /\ ~ExpireDelayedConditionalDuration96(detached,candidate,after,<>,<>,[receipt EXCEPT !.observationId=0],beforeSnapshot,afterSnapshot) /\ LET pendingCandidate == [r.after EXCEPT !.effects=Empty9,!.instances[6400].status="Lost"] pendingAfter == [pendingCandidate EXCEPT !.activationEpoch=after.activationEpoch,!.activationSerial=1] pendingBefore == SnapshotWithConditionalRegistry96(r.current,r.after) pendingSnapshot == [SnapshotWithConditionalRegistry96(r.current,pendingCandidate) EXCEPT !.id=32,!.activationEpoch=after.activationEpoch,!.activationSerial=1] IN /\ ExpireDelayedConditionalDuration96(r.after,pendingCandidate,pendingAfter,<>,<>,receipt,pendingBefore,pendingSnapshot) /\ pendingAfter.instances[6400].status="Lost" ConditionalDepartureDefinitionBindingChecks96 == LET s == ConditionalDepartureScenario96("Specimen0110",800,3,"Retireed") changed == [s.definition EXCEPT !.effectChoices={{},{1}}] definitions == [key \in {s.key} |-> changed] cp == [s.cp EXCEPT !.processingSnapshot.definitions=definitions,!.beginSnapshot.definitions=definitions] result == ConditionalCommittedFixture96(s.moved,definitions,cp,s.allocation,s.bindings,s.holds) IN /\ ConditionalDefinitionValid96(changed) /\ ~ConditionalOptional96(s.original) /\ ConditionalOptional96(changed) /\ \A id \in DOMAIN result.instances : ~result.instances[id].member.mandatory /\ result.instances[id].definitionCopy=changed /\ ~ProcessConditionalCheckpoint96(s.moved,result,<<>>,<<>>,definitions,cp,s.conditions,s.allocation,s.bindings,s.departures,s.holds,{}) ConditionalAbilityChecks9 == /\ ConditionalMultiplicityChecks96 /\ ConditionalDepartureChecks96 /\ ConditionalMixedDepartureChecks96 /\ ConditionalSpecimen0150LifecycleChecks96 /\ ConditionalEpochChecks96 /\ ConditionalOptionalUseChecks96 /\ ConditionalOnceUseChecks96 /\ ConditionalTraversalCleanupChecks96 /\ ConditionalPassClosureChecks96 /\ ConditionalInterruptRecognitionChecks96 /\ ObservationSpecimen0033Checks96 /\ ObservationLateExampleFamily035Checks96 /\ ObservationExampleFamily069Checks96 /\ ObservationItemInspectionStipulationChecks96 /\ ObservationInstructionConditionChecks96 /\ ObservationHistoricalAdvanceChecks96 /\ StaticBeginningChecks96 /\ StaticNoModifierExpectedChecks96 /\ StaticSingletonChecks96 /\ StaticTriggerSiblingControlChecks96 /\ StaticInterruptPreventionChecks96 /\ StaticAllInstructionExpectedChecks96 /\ StaticNoEffectThrottleChecks96 /\ ConditionalExampleFamily001ExampleFamily012Checks96 /\ ConditionalPaidCheckpointChecks96 /\ DelayedExplicitDurationChecks96 /\ DelayedTraversalScopeChecks96 /\ ExampleFamily092SelectedChecks96 /\ DelayedNextResolutionChecks96 /\ DelayedGenericExpiryChecks96 /\ ConditionalDepartureDefinitionBindingChecks96 ExampleFamily037CardFixture97(zone) == LET base == [CardObject9("Specimen0169",zone,FALSE,IF zone="SideAHand" THEN "Down" ELSE "Up") EXCEPT !.loc=IF zone="SideADiscard" THEN "Discard" ELSE @] IN [key \in DOMAIN base \cup {"playCost","playX","subtypes"} |-> CASE key="playCost" -> 2 [] key="playX" -> FALSE [] key="subtypes" -> {"SchemaAtom160","SchemaAtom081"} [] OTHER -> base[key]] ExampleFamily037SourceTextFixture97(object,playId) == LET restrictionSyntax == [SyntaxFixture93(901,"Static","SideA","Plan",<>) EXCEPT !.source=ObjectAbilitySource9(object)] restriction == [syntax |-> restrictionSyntax,activity |-> [AbilityDefinition9(901,"Static",restrictionSyntax.source,"Printed") EXCEPT !.ownPermissionModifier=TRUE],instructions |-> <<>>,optionalParts |-> {},partsByInstruction |-> Empty9] conditional == [ConditionalDefinitionFixture96(902,"Specimen0169","Trigger","PlayResolved","SchemaAtom149","SideA","SideA") EXCEPT !.syntax.source=ObjectAbilitySource9(object),!.activity.source=ObjectAbilitySource9(object),!.activity.rulesOnlyZones={"SideADiscard"}, !.instructions= <<720>>,!.partsByInstruction=[id \in {720} |-> {1}]] firstSyntax == [SyntaxFixture93(903,"Play","SideA","Plan",<>) EXCEPT !.source=ObjectAbilitySource9(object)] secondSyntax == [SyntaxFixture93(904,"Play","SideA","Plan",<>) EXCEPT !.source=ObjectAbilitySource9(object)] first == [syntax |-> firstSyntax,activity |-> AbilityDefinition9(903,"Play",firstSyntax.source,"Printed"),instructions |-> <<730>>,optionalParts |-> {},partsByInstruction |-> [id \in {730} |-> {1}]] SchemaAtom187 == [syntax |-> secondSyntax,activity |-> AbilityDefinition9(904,"Play",secondSyntax.source,"Printed"),instructions |-> <<740>>,optionalParts |-> {1},partsByInstruction |-> [id \in {740} |-> {1}]] definitions == [id \in 901..904 |-> CASE id=901 -> restriction [] id=902 -> conditional [] id=903 -> first [] OTHER -> SchemaAtom187] IN [tag |-> "NormalizedPrintedAbilities",playId |-> playId,object |-> object,card |-> "Specimen0169",sourceSHA |-> CardFacts9["Specimen0169"].sourceSHA, order |-> <<901,902,903,904>>,definitions |-> definitions] PlaySnapshotFixture97(id,checkpoint,point,definitions,objects,ledger,active,exposureMarkers) == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(id,checkpoint,point,definitions,objects),ledger) EXCEPT !.ordinaryActivity=[key \in DOMAIN definitions |-> active /\ definitions[key].syntax.source.object=1],!.activationEpoch=ConditionalEpochMap96(ledger,definitions),!.activationSerial=ledger.activationSerial, !.usedObjects=@ \cup ledger.lastSnapshot.usedObjects,!.exposureMarkers["SideB"]=exposureMarkers,!.points=ledger.lastSnapshot.points] PlayEmptyCheckpointFixture97(ledger,id,definitions,objects,active,exposureMarkers,caller) == [ConditionalCheckpointFixture96(ledger,id, PlaySnapshotFixture97(10*id,id,"CheckpointBeginning",definitions,objects,ledger,active,exposureMarkers), PlaySnapshotFixture97(10*id+1,id,"ProcedureCodee605a78f5d5e",definitions,objects,ledger,active,exposureMarkers),Empty9) EXCEPT !.caller=caller] PlayCheckpointReceiptFixture97(c,id) == [tag |-> "PlayInstructionCheckpoint",id |-> id,playId |-> c.playId,abilityInstance |-> c.id,source |-> c.source, instruction |-> c.ability.instructions[c.ability.cursor],index |-> c.ability.cursor,transactionId |-> c.transaction,complete |-> TRUE,allNewerChainsComplete |-> TRUE] ExampleFamily037StartFixture97(points) == LET action == ReadyFixture92(WindowFixture92(600,"NeutralValue00001",TurnSiteFixture92("SideA","ProcedureCode0e20572a4bab",1),Empty9,0,NoTimingRef9)) option == [SyntheticOption92(970,"NeutralValue00001","SideA") EXCEPT !.target=10,!.source=RuleAbilitySource9("SideABasicPlay")] busy == StartedFixture92(action,option) objects == [id \in {10,22} |-> ExampleFamily037CardFixture97(IF id=10 THEN "SideAHand" ELSE "SideADiscard")] played == [id \in {1,22} |-> IF id=1 THEN PlayedPlacementRow8(objects[10],TRUE) ELSE objects[22]] start == OpenPlay8(7000,10,"SideA",600) b == [start EXCEPT !.object=1,!.stage="ProcedureCode0f076861472c",!.kind="Plan",!.subtypes=objects[10].subtypes] transaction == [id |-> 7001,procedureId |-> 7000,object |-> 1,allPaid |-> TRUE,basePart |-> PlayInherentPart8(played[1],0), playCostIgnored |-> FALSE,paidSomething |-> TRUE,checkpointRequired |-> TRUE] cost == [b EXCEPT !.stage="CostBarrier",!.transaction=7001,!.checkpointRequired=TRUE] c == [cost EXCEPT !.stage="ProcedureCodecbf6b11f0ae0"] d == [c EXCEPT !.stage="ProcedureCode7647b901fcb1",!.activationReached=TRUE] e == [d EXCEPT !.stage="ProcedureCodebddd9a1a600b"] f == [e EXCEPT !.stage="ProcedureCode3d7f756d78f7"] text == ExampleFamily037SourceTextFixture97(1,7000) conditional == text.definitions[902] foreignConditional == ReboundConditionalDefinition96(conditional,22) definitions == [key \in {ConditionalKey96(conditional),ConditionalKey96(foreignConditional)} |-> IF key=ConditionalKey96(conditional) THEN conditional ELSE foreignConditional] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,played) EXCEPT !.points=points,!.usedObjects={1,10,22}] seed == NewConditionalLedger96(initial) cp1 == PlayEmptyCheckpointFixture97(seed,1,definitions,played,FALSE,0,[kind |-> "PlayCost",playId |-> 7000,transactionId |-> 7001]) costLedger == ConditionalCommittedFixture96(seed,definitions,cp1,Empty9,Empty9,Empty9) activationSnapshot == PlaySnapshotFixture97(15,1,"PlayedCardActivated",definitions,played,costLedger,TRUE,0) cp2 == PlayEmptyCheckpointFixture97(costLedger,2,definitions,played,TRUE,0,PlayActivationCaller97(e)) activationLedger == ConditionalCommittedFixture96(costLedger,definitions,cp2,Empty9,Empty9,Empty9) invocation == [tag |-> "PlayInvocation",playId |-> 7000,object |-> 1,caller |-> 600,transactionId |-> 7001,origin |-> "NeutralValue00001", owner |-> [windowId |-> 600,option |-> busy.busy,transaction |-> busy.busyTransaction]] cohort == NewPlayCohort97(f,text,invocation) IN [action |-> action,option |-> option,busy |-> busy,objects |-> objects,played |-> played,start |-> start,b |-> b,transaction |-> transaction,cost |-> cost, c |-> c,d |-> d,e |-> e,f |-> f,text |-> text,conditional |-> conditional,foreignConditional |-> foreignConditional,definitions |-> definitions,seed |-> seed,cp1 |-> cp1,costLedger |-> costLedger, activationSnapshot |-> activationSnapshot,cp2 |-> cp2,ledger |-> activationLedger,invocation |-> invocation,cohort |-> cohort] ExampleFamily037StartValid97(s) == /\ BeginPriorityOption9(<>,<>,s.option,s.objects,LegalityFixture92(s.action,s.option),Empty9) /\ BeginPlay8(s.start,s.b,s.objects,s.played,1,{10,22},TRUE) /\ PayPlayStep8(s.b,s.cost,s.played,s.transaction,FALSE,0,TRUE) /\ ProcessConditionalCheckpoint96(s.seed,s.costLedger,<>,<>,s.definitions,s.cp1,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600}) /\ ConditionalCheckpointDrained96(s.costLedger,<>,1) /\ DrainPlayCostBarrier8(s.cost,s.c,7001,1,TRUE) /\ ActivatePlayedCard8(s.c,s.d) /\ MeetPlayedConditions8(s.d,s.e,{PlayedCondition8(s.d)}) /\ ObserveConditionalActivity96(s.costLedger,s.costLedger,s.costLedger,<>,<>,SnapshotWithConditionalRegistry96(s.cp1.processingSnapshot,s.costLedger),s.activationSnapshot) /\ ProcessConditionalCheckpoint96(s.costLedger,s.ledger,<>,<>,s.definitions,s.cp2,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600}) /\ EnterPlayCohort97(s.e,s.f,s.cohort,s.played,s.text,s.invocation,s.ledger,<>,2,CardFacts9) PlaySingleFixture97(c,f,stack,objects,ledger,points,instance,instruction,step,checkpoint,exposureMarkers,checkpointPoints) == LET definition == CurrentPlayDefinition97(c) plan == OpenInstruction93(instruction,"Ability",instance,c.source,"Play",1,"NoValue",<>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] ability == [OpenAbilityResolution9(instance,"Play",c.source,"Play",definition.instructions,c.playId) EXCEPT !.phase="Imminent",!.firstImminent=TRUE] imminent == [c EXCEPT !.id=instance,!.ability=ability,!.phase="Imminent",!.usedInstances=@ \cup {instance}] resolving == [imminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] finished == [resolving EXCEPT !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE,!.phase="InstructionCheckpoint"] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <>] definitions == ledger.lastSnapshot.definitions cp == [PlayEmptyCheckpointFixture97(ledger,checkpoint,definitions,objects,TRUE,exposureMarkers,PlayInstructionCaller97(finished)) EXCEPT !.beginSnapshot.points=checkpointPoints,!.processingSnapshot.points=checkpointPoints] drained == ConditionalCommittedFixture96(ledger,definitions,cp,Empty9,Empty9,Empty9) afterCP == [finished EXCEPT !.phase="AbilityComplete",!.checkpoint=checkpoint] returned == PlayAdvanceDisposition97(afterCP,"Resolved",instance) IN [before |-> c,f |-> f,stack |-> stack,objects |-> objects,points |-> points,definition |-> definition,instance |-> instance, plan |-> plan,imminentPlan |-> imminentPlan,imminent |-> imminent,resolving |-> resolving,resolvingPlan |-> resolvingPlan, finished |-> finished,completePlan |-> completePlan,definitions |-> definitions,cp |-> cp,beforeLedger |-> ledger,drained |-> drained,afterCP |-> afterCP,returned |-> returned] PlaySingleValid97(s) == /\ BeginPlayAbility97(s.before,s.imminent,s.f,s.stack,s.objects,DOMAIN s.before.sourceText.definitions,ActivityContext9,s.points,s.instance,{}, s.plan,s.imminentPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}],InstructionEntryFixture93(s.plan), [tag |-> "AbilityRestrictions",ability |-> s.definition.syntax.id,source |-> s.before.source,results |-> Empty9]) /\ ResolvePlayWithoutInterrupt97(s.imminent,s.resolving,s.f,s.stack,s.imminentPlan,s.resolvingPlan,NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0)) /\ CarryPlayInstruction97(s.resolving,s.finished,s.f,s.stack,s.resolvingPlan,s.completePlan, [tag |-> "InstructionStepReturn",instruction |-> s.plan.id,index |-> 1,step |-> s.plan.steps[1],complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(s.beforeLedger,s.drained,s.stack,s.stack,s.definitions,s.cp,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600}) /\ PlayInstructionCheckpoint97(s.finished,s.afterCP,s.f,s.stack,s.drained,PlayCheckpointReceiptFixture97(s.finished,s.cp.id)) /\ FinishOnePlayAbility97(s.afterCP,s.returned,s.f,s.stack) PlayClassificationChecks97 == LET s == ExampleFamily037StartFixture97([player \in SetupPlayers |-> 0]) IN /\ ExampleFamily037StartValid97(s) /\ PrintedPlayOrder97(s.text)= <<903,904>> /\ s.cohort.order= <<903,904>> /\ InferredAbilityKind93(s.text.definitions[901].syntax)="Static" /\ InferredAbilityKind93(s.text.definitions[902].syntax)="Conditional" /\ \A id \in {903,904} : InferredAbilityKind93(s.text.definitions[id].syntax)="Play" /\ PlayDefinitionValid97(s.text.definitions[id]) /\ ~s.text.definitions[904].syntax.paidPrefix.present /\ FlagPresent93(s.text.definitions[904].syntax.units,"Threat") /\ ~AbilityIsResolving9(s.cohort.ability) /\ PlayedSourceIsResolving9(s.f) /\ \A bad \in {[s.text EXCEPT !.sourceSHA="ForeignRecord"],[s.text EXCEPT !.object=22], [s.text EXCEPT !.playId=7002],[s.text EXCEPT !.definitions[903].syntax.source=ObjectAbilitySource9(22),!.definitions[903].activity.source=ObjectAbilitySource9(22)]} : ~EnterPlayCohort97(s.e,s.f,NewPlayCohort97(s.f,bad,s.invocation),s.played,bad,s.invocation,s.ledger,<>,2,CardFacts9) /\ ~EnterPlayCohort97(s.e,s.f,s.cohort,s.played,s.text,s.invocation,s.ledger,<>,1,CardFacts9) PlayExampleFamily037SequenceChecks97 == LET points == [player \in SetupPlayers |-> IF player="SideA" THEN 3 ELSE 0] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) SchemaAtom187 == PlaySingleFixture97(first.returned,s.f,<>,s.played,first.drained,points,8101,740,"MayPay5GiveSideB2ExposureMarkers",4,4,points) g == [s.f EXCEPT !.stage="ProcedureCodee977e478b45b"] receipt == [tag |-> "PlayCohortCompletion",playId |-> 7000,object |-> 1,dispositions |-> SchemaAtom187.returned.dispositions, ownedTimingIds |-> {},returnedTimingIds |-> {},ownEndTriggersResolved |-> TRUE] IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ PlaySingleValid97(SchemaAtom187) /\ first.returned.cursor=2 /\ first.returned.dispositions[903].disposition="Resolved" /\ ~first.finished.ability.detached /\ ~AbilityIsResolving9(first.finished.ability) /\ first.finished.checkpoint=0 /\ PlayedSourceIsResolving9(s.f) /\ ~PlayedSourceIsResolving9(g) /\ SchemaAtom187.returned.phase="Complete" /\ SchemaAtom187.returned.dispositions[904].disposition="Resolved" /\ FinishPlayCohort97(SchemaAtom187.returned,s.f,g,<>,receipt) /\ ~FinishOnePlayAbility97(first.finished,PlayAdvanceDisposition97(first.finished,"Resolved",8100),s.f,<>) /\ ~FinishPlayCohort97(first.returned,s.f,g,<>,[receipt EXCEPT !.dispositions=first.returned.dispositions]) /\ \A bad \in {[receipt EXCEPT !.playId=7001],[receipt EXCEPT !.object=22], [receipt EXCEPT !.dispositions[904].disposition="SkippedInactive"],[receipt EXCEPT !.ownedTimingIds={77}]} : ~FinishPlayCohort97(SchemaAtom187.returned,s.f,g,<>,bad) /\ \A p \in {s.cohort,first.returned,SchemaAtom187.returned} : p.order= <<903,904>> /\ p.sourceText=s.text PlayThreatSkipChecks97 == \A sideAPoints,sideBPoints \in 0..3 : LET points == [player \in SetupPlayers |-> IF player="SideA" THEN sideAPoints ELSE sideBPoints] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) active == sideAPoints>=3 \/ sideBPoints>=3 SchemaAtom187 == PlaySingleFixture97(first.returned,s.f,<>,s.played,first.drained,points,8101,740,"MayPay5GiveSideB2ExposureMarkers",4,4,points) skipped == PlayAdvanceDisposition97(first.returned,"SkippedInactive",0) complete == IF active THEN SchemaAtom187.returned ELSE skipped receipt == [tag |-> "PlayCohortCompletion",playId |-> 7000,object |-> 1,dispositions |-> complete.dispositions, ownedTimingIds |-> {},returnedTimingIds |-> {},ownEndTriggersResolved |-> TRUE] IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ PlayCurrentActive97(first.returned,s.f,s.played,DOMAIN s.text.definitions,ActivityContext9,points)=active /\ SkipInactivePlay97(first.returned,skipped,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points)=~active /\ IF active THEN PlaySingleValid97(SchemaAtom187) ELSE /\ skipped.order= <<903,904>> /\ skipped.cursor=3 /\ skipped.phase="Complete" /\ skipped.dispositions[904]=[disposition |-> "SkippedInactive",instance |-> 0] /\ skipped.usedInstances={8100} /\ skipped.checkpoint=0 /\ ~BeginPlayAbility97(first.returned,SchemaAtom187.imminent,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points,8101,{}, SchemaAtom187.plan,SchemaAtom187.imminentPlan,[InstructionTargetsFixture93(SchemaAtom187.plan) EXCEPT !.targets={}],InstructionEntryFixture93(SchemaAtom187.plan), [tag |-> "AbilityRestrictions",ability |-> 904,source |-> first.returned.source,results |-> Empty9]) /\ FinishPlayCohort97(complete,s.f,[s.f EXCEPT !.stage="ProcedureCodee977e478b45b"],<>,receipt) /\ ~SkipInactivePlay97(complete,complete,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points) PlayThreatRefreshChecks97 == \A beforeHigh,afterHigh \in BOOLEAN : LET beforePoints == [p \in SetupPlayers |-> IF p="SideA" /\ beforeHigh THEN 3 ELSE 0] afterPoints == [p \in SetupPlayers |-> IF p="SideB" /\ afterHigh THEN 3 ELSE 0] s == ExampleFamily037StartFixture97(beforePoints) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,beforePoints,8100,730,"GiveSideB2ExposureMarkers",3,2,afterPoints) SchemaAtom187 == PlaySingleFixture97(first.returned,s.f,<>,s.played,first.drained,afterPoints,8101,740,"MayPay5GiveSideB2ExposureMarkers",4,4,afterPoints) skipped == PlayAdvanceDisposition97(first.returned,"SkippedInactive",0) IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ first.drained.lastSnapshot.points=afterPoints /\ PlayCurrentActive97(first.returned,s.f,s.played,DOMAIN s.text.definitions,ActivityContext9,first.drained.lastSnapshot.points)=afterHigh /\ IF afterHigh THEN PlaySingleValid97(SchemaAtom187) ELSE SkipInactivePlay97(first.returned,skipped,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,afterPoints) /\ ~AbilityIsResolving9(first.afterCP.ability) /\ PlayedSourceIsResolving9(s.f) PlayOptionalChoiceChecks97 == LET points == [p \in SetupPlayers |-> IF p="SideA" THEN 3 ELSE 0] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) SchemaAtom187 == PlaySingleFixture97(first.returned,s.f,<>,s.played,first.drained,points,8101,740,"MayPay5GiveSideB2ExposureMarkers",4,4,points) choice == [tag |-> "PlayOptionalChoice",instruction |-> InstructionWindowRef93(SchemaAtom187.resolvingPlan),abilityInstance |-> 8101,source |-> s.cohort.source, component |-> 1,id |-> 1,complete |-> TRUE,carriedOut |-> TRUE] event == [tag |-> "AbilityUsed",useId |-> 1,abilityInstance |-> 8101,source |-> s.cohort.source,player |-> "SideA"] uses == [id \in {1} |-> event] choices == {[instance |-> 8101,choice |-> 1]} firstChoice == [choice EXCEPT !.instruction=InstructionWindowRef93(first.resolvingPlan),!.abilityInstance=8100] firstEvent == [event EXCEPT !.abilityInstance=8100] IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ PlaySingleValid97(SchemaAtom187) /\ SchemaAtom187.definition.syntax.kind="Play" /\ ~SchemaAtom187.definition.syntax.paidPrefix.present /\ ~SchemaAtom187.imminent.ability.detached /\ RecordPlayOptionalChoice97(Empty9,uses,{},choices,SchemaAtom187.resolving,SchemaAtom187.resolvingPlan,choice,1,{event}) /\ RecordPlayOptionalChoice97(Empty9,Empty9,{},choices,SchemaAtom187.resolving,SchemaAtom187.resolvingPlan,[choice EXCEPT !.carriedOut=FALSE],1,{}) /\ ~RecordPlayOptionalChoice97(uses,[id \in {1,2} |-> IF id=1 THEN event ELSE [event EXCEPT !.useId=2]],choices,choices,SchemaAtom187.resolving,SchemaAtom187.resolvingPlan,choice,2,{[event EXCEPT !.useId=2]}) /\ ~RecordPlayOptionalChoice97(Empty9,[id \in {1} |-> firstEvent],{}, {[instance |-> 8100,choice |-> 1]},first.resolving,first.resolvingPlan,firstChoice,1,{firstEvent}) /\ \A bad \in {[choice EXCEPT !.source=ObjectAbilitySource9(22)],[choice EXCEPT !.abilityInstance=8100], [choice EXCEPT !.instruction.id=730],[choice EXCEPT !.complete=FALSE],[choice EXCEPT !.component=2]} : ~RecordPlayOptionalChoice97(Empty9,uses,{},choices,SchemaAtom187.resolving,SchemaAtom187.resolvingPlan,bad,1,{event}) /\ \A lastTurnEvent \in {"NoValue","StoleSideACard","RetireedSideACard"} : LET allowed == lastTurnEvent # "NoValue" originalRestriction == [s.text.definitions[901].syntax EXCEPT !.source=ObjectAbilitySource9(10)] restrictionReceipt == [tag |-> "AbilityRestrictions",ability |-> 901,source |-> originalRestriction.source,results |-> [id \in {1} |-> allowed]] IN /\ WholeAbilityRestrictionGate93(originalRestriction,restrictionReceipt)=allowed /\ BeginPlay8(s.start,s.b,s.objects,s.played,1,{10,22},allowed)=allowed /\ AbilityActive9([s.text.definitions[901].activity EXCEPT !.source=ObjectAbilitySource9(10)],s.objects,{901},FALSE,ActivityContext9) PlayResolvedEventFixture97(id,d,snapshot,raw) == LET base == ConditionalEventFixture96(id,"PlayResolved",d.syntax.source.object,"SideA","SideA",snapshot,raw.playId) IN [key \in DOMAIN base \cup {"rawOrigin"} |-> IF key="rawOrigin" THEN raw ELSE base[key]] PlayNormalCleanupChecks97 == LET points == [p \in SetupPlayers |-> IF p="SideA" THEN 3 ELSE 0] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) SchemaAtom187 == PlaySingleFixture97(first.returned,s.f,<>,s.played,first.drained,points,8101,740,"MayPay5GiveSideB2ExposureMarkers",4,4,points) g == [s.f EXCEPT !.stage="ProcedureCodee977e478b45b"] h == [g EXCEPT !.stage="ProcedureCodec610fc738935"] i == [h EXCEPT !.stage="ProcedureCode03de9212dc90"] completion == [tag |-> "PlayCohortCompletion",playId |-> 7000,object |-> 1,dispositions |-> SchemaAtom187.returned.dispositions, ownedTimingIds |-> {},returnedTimingIds |-> {},ownEndTriggersResolved |-> TRUE] cleanup == [playId |-> 7000,object |-> 1,disposition |-> "Retire",trashInstructionComplete |-> TRUE] afterObjects == [id \in {11,22} |-> IF id=11 THEN ExampleFamily037CardFixture97("SideADiscard") ELSE s.played[id]] d == ReboundConditionalDefinition96(s.conditional,11) definitions == [key \in {ConditionalKey96(d),ConditionalKey96(s.foreignConditional)} |-> IF key=ConditionalKey96(d) THEN d ELSE s.foreignConditional] epochs == [key \in DOMAIN SchemaAtom187.drained.activationEpoch \cup {ConditionalKey96(d)} |-> IF key=ConditionalKey96(s.conditional) THEN 1 ELSE 0] observed == [SchemaAtom187.drained EXCEPT !.activationEpoch=epochs,!.activationSerial=1] beforeMove == SnapshotWithConditionalRegistry96(SchemaAtom187.cp.processingSnapshot,SchemaAtom187.drained) afterMove == [ConditionalSnapshotFixture96(50,4,"AfterNormalPlayCleanup",definitions,afterObjects) EXCEPT !.activationEpoch=epochs,!.activationSerial=1, !.usedObjects=beforeMove.usedObjects \cup {11},!.points=points,!.exposureMarkers["SideB"]=4] eventSnapshot == [SnapshotWithConditionalRegistry96(afterMove,observed) EXCEPT !.id=51,!.point="ProcedureCodec610fc738935"] raw == [tag |-> "PlayResolved",object |-> 1,kind |-> "Plan",actor |-> "SideA",playId |-> 7000] event == PlayResolvedEventFixture97(1000,d,eventSnapshot,raw) origin == [beforeCleanup |-> g,afterCleanup |-> h,afterResolved |-> i,beforeObjects |-> s.played,afterObjects |-> afterObjects,successor |-> 11, usedIds |-> beforeMove.usedObjects,cleanup |-> cleanup,rawEvents |-> {raw},originalDefinition |-> s.conditional,currentDefinition |-> d, snapshot |-> eventSnapshot,occurrenceId |-> 1000,event |-> event,cohort |-> SchemaAtom187.returned] begin5 == [eventSnapshot EXCEPT !.id=60,!.checkpointId=5,!.point="CheckpointBeginning"] current5 == [begin5 EXCEPT !.id=61,!.point="ProcedureCodee605a78f5d5e"] events == [id \in {1000} |-> event] cp5 == ConditionalCheckpointFixture96(observed,5,begin5,current5,events) keys == {[definition |-> ConditionalKey96(d),occurrence |-> 1000]} allocation == [key \in keys |-> 8200] bindings == ConditionalBindingsFixture96(keys,5,610,61) recognized == ConditionalCommittedFixture96(observed,definitions,cp5,allocation,bindings,Empty9) group == ConditionalWindowMembers96(recognized.instances,610) site == TurnSiteFixture92("SideA","ProcedureCode0e20572a4bab",1) window == WindowFixture92(610,"Reaction",site,group,61,NoTimingRef9) foreignEvent == PlayResolvedEventFixture97(1000,s.foreignConditional,eventSnapshot,raw) foreignOrigin == [origin EXCEPT !.currentDefinition=s.foreignConditional,!.event=foreignEvent] foreignCP == [cp5 EXCEPT !.occurrences=[id \in {1000} |-> foreignEvent]] foreignKeys == {[definition |-> ConditionalKey96(s.foreignConditional),occurrence |-> 1000]} foreignAllocation == [key \in foreignKeys |-> 8201] foreignBindings == ConditionalBindingsFixture96(foreignKeys,5,611,62) foreignResult == ConditionalCommittedFixture96(observed,definitions,foreignCP,foreignAllocation,foreignBindings,Empty9) IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ PlaySingleValid97(SchemaAtom187) /\ FinishPlayCohort97(SchemaAtom187.returned,s.f,g,<>,completion) /\ NormalPlayCleanup97(g,h,s.played,afterObjects,11,beforeMove.usedObjects,cleanup) /\ PublishNormalPlayCleanup97(SchemaAtom187.drained,observed,<>,<>,beforeMove,afterMove,g,h,11,beforeMove.usedObjects,cleanup) /\ MeetPlayResolvedConditions8(h,i,{raw}) /\ ~MeetPlayResolvedConditions8(g,i,{raw}) /\ ~MeetPlayResolvedConditions8(s.f,i,{raw}) /\ ~PlayedSourceIsResolving9(g) /\ ~PlayedSourceIsResolving9(h) /\ 1 \notin DOMAIN afterObjects /\ d.syntax.source=ObjectAbilitySource9(11) /\ ~eventSnapshot.ordinaryActivity[ConditionalKey96(d)] /\ ConditionalActive96(d,eventSnapshot) /\ ~ConditionalActive96([d EXCEPT !.activity.rulesOnlyZones={}],eventSnapshot) /\ event.rawOrigin.object=1 /\ event.object=11 /\ event.rawOrigin.playId=7000 /\ RecognizeNormalPlayResolved97(observed,recognized,<>,<>,origin,definitions,cp5,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{600}) /\ DOMAIN recognized.instances={8200} /\ recognized.instances[8200].member.source=ObjectAbilitySource9(11) /\ recognized.instances[8200].member.ability=902 /\ recognized.instances[8200].member.mandatory /\ recognized.instances[8200].status="Pending" /\ recognized.instances[8200].definitionCopy=d /\ OpenConditionalReaction96(<>,<>,recognized,610,site,OpeningFixture92(610,"Reaction",site,group,61,NoTimingRef9),{600}) /\ afterObjects[11].card=afterObjects[22].card /\ ConditionalActive96(s.foreignConditional,eventSnapshot) /\ ProcessConditionalCheckpoint96(observed,foreignResult,<>,<>,definitions,foreignCP,ConditionalConditionsFixture96(definitions,foreignCP.occurrences),foreignAllocation,foreignBindings,Empty9,Empty9,{600}) /\ foreignResult.instances[8201].member.source=ObjectAbilitySource9(22) /\ ~RecognizeNormalPlayResolved97(observed,foreignResult,<>,<>,origin,definitions,foreignCP, ConditionalConditionsFixture96(definitions,foreignCP.occurrences),foreignAllocation,foreignBindings,Empty9,Empty9,{600}) /\ \A badEvent \in {[event EXCEPT !.rawOrigin.playId=7001],[event EXCEPT !.effectId=7001], [event EXCEPT !.snapshot.id=77],[event EXCEPT !.scopeKind="Ability",!.scopeDefinition=ConditionalKey96(d)]} : LET badOrigin == [origin EXCEPT !.event=badEvent] badCP == [cp5 EXCEPT !.occurrences=[id \in {1000} |-> badEvent]] IN ~RecognizeNormalPlayResolved97(observed,recognized,<>,<>,badOrigin,definitions,badCP, ConditionalConditionsFixture96(definitions,badCP.occurrences),allocation,bindings,Empty9,Empty9,{600}) /\ ~RecognizeNormalPlayResolved97(observed,foreignResult,<>,<>,foreignOrigin,definitions,foreignCP, ConditionalConditionsFixture96(definitions,foreignCP.occurrences),foreignAllocation,foreignBindings,Empty9,Empty9,{600}) /\ ~NormalPlayResolvedOccurrence97(s.f,h,i,s.played,afterObjects,11,beforeMove.usedObjects,cleanup,{raw},s.conditional,d,eventSnapshot,1000,event,SchemaAtom187.returned) /\ ~NormalPlayCleanup97(g,h,s.played,[id \in {22} |-> s.played[id]],22,beforeMove.usedObjects,cleanup) /\ ~NormalPlayCleanup97(g,h,s.played,afterObjects,11,beforeMove.usedObjects,[cleanup EXCEPT !.trashInstructionComplete=FALSE]) /\ ~RecognizeNormalPlayResolved97(observed,recognized,<>,<>,[origin EXCEPT !.occurrenceId=1001],definitions,cp5, ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{600}) LoopGenericSource97 == "SyntheticTextbedff52c140b" LoopGenericSourceSHA97 == "53f319bbd7f012027a4f1c27f2d55662e92d1ef68a596992703667b14fc71e9a" LoopNextEntryFixture97(plan,checkpoint) == LET base == InstructionEntryFixture93(plan) IN [field \in DOMAIN base \cup {"checkpointId"} |-> IF field="checkpointId" THEN checkpoint ELSE base[field]] LoopRestrictionsFixture97(d) == [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9] LoopGenericFixture97 == LET shape == ExampleFamily037StartFixture97([p \in SetupPlayers |-> 0]) card == "StructuralTwoInstructionOperation97" objects == [id \in {1,2} |-> IF id=1 THEN [shape.played[1] EXCEPT !.card=card] ELSE CardObject9("Specimen0221","SideAHand",FALSE,"Down")] syntax == SyntaxFixture93(950,"Play","SideA","Plan",<>) definition == [syntax |-> syntax,activity |-> AbilityDefinition9(950,"Play",syntax.source,"Printed"),instructions |-> <<750,751>>, optionalParts |-> {1,2},partsByInstruction |-> [id \in {750,751} |-> IF id=750 THEN {1} ELSE {2}]] text == [tag |-> "NormalizedPrintedAbilities",playId |-> shape.f.id,object |-> 1,card |-> card,sourceSHA |-> LoopGenericSourceSHA97, order |-> <<950>>,definitions |-> [id \in {950} |-> definition]] syntheticFacts == [id \in {card} |-> [sourceSHA |-> LoopGenericSourceSHA97]] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,objects) seed == NewConditionalLedger96(initial) activationCP == PlayEmptyCheckpointFixture97(seed,1,Empty9,objects,TRUE,0,PlayActivationCaller97(shape.e)) ledger == ConditionalCommittedFixture96(seed,Empty9,activationCP,Empty9,Empty9,Empty9) cohort == NewPlayCohort97(shape.f,text,shape.invocation) firstPlan == OpenInstruction93(750,"Ability",8500,cohort.source,"Play",1,"NoValue",<<"StructuralFirstOptionalComponent">>,TRUE) firstImminentPlan == [firstPlan EXCEPT !.announced=TRUE,!.targets={2},!.phase="Imminent"] firstAbility == [OpenAbilityResolution9(8500,"Play",cohort.source,"Play",definition.instructions,cohort.playId) EXCEPT !.phase="Imminent",!.firstImminent=TRUE] firstImminent == [cohort EXCEPT !.id=8500,!.ability=firstAbility,!.phase="Imminent",!.usedInstances={8500}] firstAtomic == [firstImminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] firstAtomicPlan == [firstImminentPlan EXCEPT !.phase="Resolving"] firstFinished == [firstAtomic EXCEPT !.ability.phase="Between",!.phase="InstructionCheckpoint"] firstCompletePlan == [firstAtomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=firstPlan.steps] firstCP == PlayEmptyCheckpointFixture97(ledger,2,Empty9,objects,TRUE,0,PlayInstructionCaller97(firstFinished)) firstDrained == ConditionalCommittedFixture96(ledger,Empty9,firstCP,Empty9,Empty9,Empty9) between == [firstFinished EXCEPT !.checkpoint=2,!.phase="Targets"] secondPlan == OpenInstruction93(751,"Ability",8500,cohort.source,"Play",2,"NoValue",<<"StructuralSecondOptionalComponent">>,TRUE) secondImminentPlan == [secondPlan EXCEPT !.announced=TRUE,!.targets={2},!.phase="Imminent"] secondImminent == [between EXCEPT !.ability.cursor=2,!.ability.phase="Imminent",!.phase="Imminent",!.checkpoint=0] secondAtomic == [secondImminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] secondAtomicPlan == [secondImminentPlan EXCEPT !.phase="Resolving"] secondFinished == [secondAtomic EXCEPT !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE,!.phase="InstructionCheckpoint"] secondCompletePlan == [secondAtomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=secondPlan.steps] secondCP == PlayEmptyCheckpointFixture97(firstDrained,3,Empty9,objects,TRUE,0,PlayInstructionCaller97(secondFinished)) secondDrained == ConditionalCommittedFixture96(firstDrained,Empty9,secondCP,Empty9,Empty9,Empty9) afterCP == [secondFinished EXCEPT !.phase="AbilityComplete",!.checkpoint=3] returned == PlayAdvanceDisposition97(afterCP,"Resolved",8500) IN [shape |-> shape,objects |-> objects,definition |-> definition,text |-> text,facts |-> syntheticFacts,seed |-> seed,activationCP |-> activationCP, ledger |-> ledger,cohort |-> cohort,firstPlan |-> firstPlan,firstImminentPlan |-> firstImminentPlan,firstImminent |-> firstImminent, firstAtomic |-> firstAtomic,firstAtomicPlan |-> firstAtomicPlan,firstFinished |-> firstFinished,firstCompletePlan |-> firstCompletePlan, firstCP |-> firstCP,firstDrained |-> firstDrained,between |-> between,secondPlan |-> secondPlan,secondImminentPlan |-> secondImminentPlan, secondImminent |-> secondImminent,secondAtomic |-> secondAtomic,secondAtomicPlan |-> secondAtomicPlan,secondFinished |-> secondFinished, secondCompletePlan |-> secondCompletePlan,secondCP |-> secondCP,secondDrained |-> secondDrained,afterCP |-> afterCP,returned |-> returned] LoopGenericValidFixture97(s) == /\ ProcessConditionalCheckpoint96(s.seed,s.ledger,<>,<>,Empty9,s.activationCP,Empty9,Empty9,Empty9,Empty9,Empty9,{600}) /\ EnterPlayCohort97(s.shape.e,s.shape.f,s.cohort,s.objects,s.text,s.shape.invocation,s.ledger,<>,1,s.facts) /\ BeginPlayAbility97(s.cohort,s.firstImminent,s.shape.f,<>,s.objects,{950},ActivityContext9,s.ledger.lastSnapshot.points,8500,{}, s.firstPlan,s.firstImminentPlan,InstructionTargetsFixture93(s.firstPlan),InstructionEntryFixture93(s.firstPlan),LoopRestrictionsFixture97(s.definition)) /\ ResolvePlayWithoutInterrupt97(s.firstImminent,s.firstAtomic,s.shape.f,<>,s.firstImminentPlan,s.firstAtomicPlan, NoModifiersFixture95(s.firstImminentPlan),InstructionClearanceFixture93(s.firstImminentPlan,0,0)) /\ CarryPlayInstruction97(s.firstAtomic,s.firstFinished,s.shape.f,<>,s.firstAtomicPlan,s.firstCompletePlan, [tag |-> "InstructionStepReturn",instruction |-> 750,index |-> 1,step |-> s.firstPlan.steps[1],complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(s.ledger,s.firstDrained,<>,<>,Empty9,s.firstCP,Empty9,Empty9,Empty9,Empty9,Empty9,{600}) /\ PlayInstructionCheckpoint97(s.firstFinished,s.between,s.shape.f,<>,s.firstDrained,PlayCheckpointReceiptFixture97(s.firstFinished,2)) /\ EnterNextPlayInstruction97(s.between,s.secondImminent,s.shape.f,<>,s.secondPlan,s.secondImminentPlan, InstructionTargetsFixture93(s.secondPlan),LoopNextEntryFixture97(s.secondPlan,2)) /\ ResolvePlayWithoutInterrupt97(s.secondImminent,s.secondAtomic,s.shape.f,<>,s.secondImminentPlan,s.secondAtomicPlan, NoModifiersFixture95(s.secondImminentPlan),InstructionClearanceFixture93(s.secondImminentPlan,0,0)) /\ CarryPlayInstruction97(s.secondAtomic,s.secondFinished,s.shape.f,<>,s.secondAtomicPlan,s.secondCompletePlan, [tag |-> "InstructionStepReturn",instruction |-> 751,index |-> 1,step |-> s.secondPlan.steps[1],complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(s.firstDrained,s.secondDrained,<>,<>,Empty9,s.secondCP,Empty9,Empty9,Empty9,Empty9,Empty9,{600}) /\ PlayInstructionCheckpoint97(s.secondFinished,s.afterCP,s.shape.f,<>,s.secondDrained,PlayCheckpointReceiptFixture97(s.secondFinished,3)) /\ FinishOnePlayAbility97(s.afterCP,s.returned,s.shape.f,<>) LoopGenericLifecycleChecks97 == LET s == LoopGenericFixture97 g == [s.shape.f EXCEPT !.stage="ProcedureCodee977e478b45b"] completion == [tag |-> "PlayCohortCompletion",playId |-> s.cohort.playId,object |-> 1,dispositions |-> s.returned.dispositions, ownedTimingIds |-> {},returnedTimingIds |-> {},ownEndTriggersResolved |-> TRUE] IN /\ LoopGenericValidFixture97(s) /\ s.text.card # "Specimen0169" /\ s.text.sourceSHA # CardFacts9["Specimen0169"].sourceSHA /\ s.cohort.order= <<950>> /\ s.definition.instructions= <<750,751>> /\ AbilityIsResolving9(s.firstFinished.ability) /\ ~s.firstFinished.ability.returned /\ s.firstFinished.phase="InstructionCheckpoint" /\ s.firstFinished.checkpoint=0 /\ s.between.phase="Targets" /\ s.between.checkpoint=2 /\ s.secondImminent.ability.cursor=2 /\ s.secondImminent.checkpoint=0 /\ ~AbilityIsResolving9(s.secondFinished.ability) /\ ~s.secondFinished.ability.returned /\ PlayedSourceIsResolving9(s.shape.f) /\ ~PlayedSourceIsResolving9(g) /\ \A c \in {s.firstImminent,s.firstAtomic,s.firstFinished,s.between,s.secondImminent,s.secondAtomic,s.secondFinished,s.afterCP} : c.source=ObjectAbilitySource9(1) /\ c.sourceText=s.text /\ ~c.ability.detached /\ s.returned.phase="Complete" /\ s.returned.dispositions[950]=[disposition |-> "Resolved",instance |-> 8500] /\ FinishPlayCohort97(s.returned,s.shape.f,g,<>,completion) LoopGenericProfileChecks97 == LET s == LoopGenericFixture97 targets == InstructionTargetsFixture93(s.firstPlan) firstReceipt == PlayCheckpointReceiptFixture97(s.firstFinished,2) nextEntry == LoopNextEntryFixture97(s.secondPlan,2) IN /\ LoopGenericValidFixture97(s) /\ \A bad \in {[targets EXCEPT !.valid=FALSE],[targets EXCEPT !.source=ObjectAbilitySource9(2)], [targets EXCEPT !.abilityInstance=8501],[targets EXCEPT !.instruction=751],[targets EXCEPT !.index=2]} : ~BeginPlayAbility97(s.cohort,s.firstImminent,s.shape.f,<>,s.objects,{950},ActivityContext9,s.ledger.lastSnapshot.points,8500,{}, s.firstPlan,s.firstImminentPlan,bad,InstructionEntryFixture93(s.firstPlan),LoopRestrictionsFixture97(s.definition)) /\ ~BeginPlayAbility97(s.cohort,s.firstImminent,s.shape.f,<>,s.objects,{950},ActivityContext9,s.ledger.lastSnapshot.points,8500,{}, [s.firstPlan EXCEPT !.announced=TRUE],s.firstImminentPlan,targets,InstructionEntryFixture93(s.firstPlan),LoopRestrictionsFixture97(s.definition)) /\ \A bad \in {[firstReceipt EXCEPT !.source=ObjectAbilitySource9(2)],[firstReceipt EXCEPT !.abilityInstance=8501], [firstReceipt EXCEPT !.instruction=751],[firstReceipt EXCEPT !.index=2],[firstReceipt EXCEPT !.transactionId=7002], [firstReceipt EXCEPT !.playId=7001],[firstReceipt EXCEPT !.complete=FALSE],[firstReceipt EXCEPT !.allNewerChainsComplete=FALSE]} : ~PlayInstructionCheckpoint97(s.firstFinished,s.between,s.shape.f,<>,s.firstDrained,bad) /\ ~PlayInstructionCheckpoint97(s.firstFinished,[s.between EXCEPT !.checkpoint=1],s.shape.f,<>,s.firstDrained,[firstReceipt EXCEPT !.id=1]) /\ ~EnterNextPlayInstruction97(s.firstFinished,s.secondImminent,s.shape.f,<>,s.secondPlan,s.secondImminentPlan, InstructionTargetsFixture93(s.secondPlan),LoopNextEntryFixture97(s.secondPlan,0)) /\ \A bad \in {[nextEntry EXCEPT !.checkpointId=1],[nextEntry EXCEPT !.source=ObjectAbilitySource9(2)], [nextEntry EXCEPT !.abilityInstance=8501],[nextEntry EXCEPT !.instruction=750],[nextEntry EXCEPT !.index=1], [nextEntry EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE]} : ~EnterNextPlayInstruction97(s.between,s.secondImminent,s.shape.f,<>,s.secondPlan,s.secondImminentPlan,InstructionTargetsFixture93(s.secondPlan),bad) /\ ~EnterNextPlayInstruction97(s.between,s.secondImminent,s.shape.f,<>,[s.secondPlan EXCEPT !.announced=TRUE],s.secondImminentPlan, InstructionTargetsFixture93(s.secondPlan),nextEntry) /\ ~FinishOnePlayAbility97(s.secondFinished,PlayAdvanceDisposition97(s.secondFinished,"Resolved",8500),s.shape.f,<>) LoopGenericOptionalScopeChecks97 == LET s == LoopGenericFixture97 firstChoice == [tag |-> "PlayOptionalChoice",id |-> 1,instruction |-> InstructionWindowRef93(s.firstAtomicPlan),abilityInstance |-> 8500, source |-> s.cohort.source,component |-> 1,complete |-> TRUE,carriedOut |-> FALSE] secondChoice == [firstChoice EXCEPT !.id=2,!.instruction=InstructionWindowRef93(s.secondAtomicPlan),!.component=2] wrongChoice == [firstChoice EXCEPT !.id=2,!.component=2] firstChoices == {[instance |-> 8500,choice |-> 1]} secondChoices == firstChoices \cup {[instance |-> 8500,choice |-> 2]} IN /\ LoopGenericValidFixture97(s) /\ s.definition.optionalParts={1,2} /\ s.definition.partsByInstruction[750]={1} /\ s.definition.partsByInstruction[751]={2} /\ RecordPlayOptionalChoice97(Empty9,Empty9,{},firstChoices,s.firstAtomic,s.firstAtomicPlan,firstChoice,0,{}) /\ RecordPlayOptionalChoice97(Empty9,Empty9,firstChoices,secondChoices,s.secondAtomic,s.secondAtomicPlan,secondChoice,0,{}) /\ ~RecordPlayOptionalChoice97(Empty9,Empty9,{}, {[instance |-> 8500,choice |-> 2]},s.firstAtomic,s.firstAtomicPlan,wrongChoice,0,{}) LoopExampleFamily037InterruptChecks97 == LET points == [p \in SetupPlayers |-> 0] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8600,730,"GiveSideB2ExposureMarkers",6,0,points) site == s.busy.site opening == [OpeningFixture92(650,"Interrupt",site,Empty9,65,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(first.imminentPlan)] child == NewPriorityWindow9(650,"Interrupt",site,Empty9,65,NoTimingRef9,opening.instruction,opening.effectRevision) cp3 == PlayEmptyCheckpointFixture97(s.ledger,3,s.definitions,s.played,TRUE,0,ConditionalPriorityCaller96(child)) received3 == ConditionalCommittedFixture96(s.ledger,s.definitions,cp3,Empty9,Empty9,Empty9) ready == [ReadyFixture92(child) EXCEPT !.checkpoint=3] option == PriorityOption9(660,"PaidInterrupt","SideA",999,0,RuleAbilitySource9("SyntheticPreventExampleFamily037ExposureMarkers97"),0,{}) effect == EffectFixture92(child,{}, {999}) started == StartedFixture92(ready,option) modification == [tag |-> "InstructionModification",instruction |-> 730,revision |-> 0,authorized |-> TRUE,steps |-> <<"PreventedSideBExposureMarkers">>] modified == [first.imminentPlan EXCEPT !.steps=modification.steps,!.revision=1] returned == CompletePriorityOptionFrame9(started) cp4 == PlayEmptyCheckpointFixture97(received3,4,s.definitions,s.played,TRUE,0,ConditionalPriorityCaller96(returned)) received4 == ConditionalCommittedFixture96(received3,s.definitions,cp4,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(returned) EXCEPT !.checkpoint=4] passed == PassPriorityFrame9(sideA) cp5 == PlayEmptyCheckpointFixture97(received4,5,s.definitions,s.played,TRUE,0,ConditionalPriorityCaller96(passed)) received5 == ConditionalCommittedFixture96(received4,s.definitions,cp5,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(passed) EXCEPT !.checkpoint=5] closed == PassPriorityFrame9(sideB) modifiedEffect == [effect EXCEPT !.revision=2] clearance == InstructionClearanceFixture93(modified,650,0) atomic == [first.imminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] atomicPlan == [modified EXCEPT !.phase="Resolving"] finished == [atomic EXCEPT !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE,!.phase="InstructionCheckpoint"] completePlan == [atomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=modification.steps] finalCP == PlayEmptyCheckpointFixture97(received5,6,s.definitions,s.played,TRUE,0,PlayInstructionCaller97(finished)) drained == ConditionalCommittedFixture96(received5,s.definitions,finalCP,Empty9,Empty9,Empty9) afterCP == [finished EXCEPT !.phase="AbilityComplete",!.checkpoint=6] nextAbility == PlayAdvanceDisposition97(afterCP,"Resolved",8600) IN /\ ExampleFamily037StartValid97(s) /\ BeginPlayAbility97(s.cohort,first.imminent,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points,8600,{}, first.plan,first.imminentPlan,[InstructionTargetsFixture93(first.plan) EXCEPT !.targets={}],InstructionEntryFixture93(first.plan),LoopRestrictionsFixture97(s.text.definitions[903])) /\ OpenPlayInstructionInterrupt97(first.imminent,s.f,<>,<>,first.imminentPlan,650,site,Empty9,opening,{600}) /\ ProcessConditionalCheckpoint96(s.ledger,received3,<>,<>,s.definitions,cp3,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,650}) /\ CheckpointPriorityWithConditionals96(received3,<>,<>,[CheckpointFixture92(child) EXCEPT !.id=3]) /\ BeginPriorityOption9(<>,<>,option,s.played,LegalityFixture92(ready,option),effect) /\ AlterAbilityInstruction93(first.imminent.ability,first.imminentPlan,modified,modification) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(started)) /\ ProcessConditionalCheckpoint96(received3,received4,<>,<>,s.definitions,cp4,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,650}) /\ CheckpointPriorityWithConditionals96(received4,<>,<>,[CheckpointFixture92(returned) EXCEPT !.id=4]) /\ PassConditionalPriority96(received4,received4,received4,<>,<>,"SideA",modifiedEffect, PlaySnapshotFixture97(44,4,"BeforeSideAPass",s.definitions,s.played,received4,TRUE,0),PlaySnapshotFixture97(45,4,"AfterSideAPass",s.definitions,s.played,received4,TRUE,0)) /\ ProcessConditionalCheckpoint96(received4,received5,<>,<>,s.definitions,cp5,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,650}) /\ CheckpointPriorityWithConditionals96(received5,<>,<>,[CheckpointFixture92(passed) EXCEPT !.id=5]) /\ PassConditionalPriority96(received5,received5,received5,<>,<>,"SideB",modifiedEffect, PlaySnapshotFixture97(54,5,"BeforeSideBPass",s.definitions,s.played,received5,TRUE,0),PlaySnapshotFixture97(55,5,"AfterSideBPass",s.definitions,s.played,received5,TRUE,0)) /\ ~closed.open /\ closed.pending={} /\ closed.busy.id=0 /\ ResolvePlayAfterInterrupt97(first.imminent,atomic,s.f,<>,<>,modified,atomicPlan,clearance) /\ ~ResolvePlayAfterInterrupt97(first.imminent,atomic,s.f,<>,<>,modified,atomicPlan,clearance) /\ ~ResolvePlayAfterInterrupt97(first.imminent,atomic,s.f,<>,<>,modified,atomicPlan,[clearance EXCEPT !.source=ObjectAbilitySource9(22)]) /\ ~ResolvePlayAfterInterrupt97(first.imminent,atomic,s.f,<>,<>,modified,atomicPlan,[clearance EXCEPT !.openingRevision=1]) /\ CarryPlayInstruction97(atomic,finished,s.f,<>,atomicPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 730,index |-> 1,step |-> "PreventedSideBExposureMarkers",complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(received5,drained,<>,<>,s.definitions,finalCP,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,650}) /\ PlayInstructionCheckpoint97(finished,afterCP,s.f,<>,drained,PlayCheckpointReceiptFixture97(finished,6)) /\ FinishOnePlayAbility97(afterCP,nextAbility,s.f,<>) /\ drained.lastSnapshot.exposureMarkers["SideB"]=0 /\ drained.instances=Empty9 /\ ~AbilityIsResolving9(finished.ability) /\ PlayedSourceIsResolving9(s.f) /\ s.f.stage="ProcedureCode3d7f756d78f7" /\ nextAbility.cursor=2 /\ nextAbility.dispositions[903].disposition="Resolved" /\ \A c \in {first.imminent,atomic,finished,afterCP} : ~c.ability.detached /\ c.source=ObjectAbilitySource9(1) /\ c.sourceText=s.text PlayInstructionInvocationChecks97 == LET s == ExampleFamily037StartFixture97([p \in SetupPlayers |-> 0]) step == "SyntheticPlayInstruction97" parent == OpenInstruction93(9000,"Rule",0,RuleAbilitySource9(step),"NoValue",0,step,<<"PlayAnOperation">>,FALSE) imminent == [parent EXCEPT !.phase="Imminent"] atomic == [imminent EXCEPT !.phase="Resolving"] e == [s.e EXCEPT !.caller=9000] f == [s.f EXCEPT !.caller=9000] invocation == [tag |-> "PlayInvocation",playId |-> f.id,object |-> 1,caller |-> 9000,transactionId |-> 7001,origin |-> "Instruction", owner |-> [windowId |-> 0,option |-> NoPriorityOption9,transaction |-> 0],parentPlan |-> atomic,parentAbility |-> Empty9,ruleStep |-> step,instruction |-> InstructionWindowRef93(atomic)] cp == PlayEmptyCheckpointFixture97(s.costLedger,2,s.definitions,s.played,TRUE,0,PlayActivationCaller97(e)) ledger == ConditionalCommittedFixture96(s.costLedger,s.definitions,cp,Empty9,Empty9,Empty9) cohort == NewPlayCohort97(f,s.text,invocation) first == PlaySingleFixture97(cohort,f,<<>>,s.played,ledger,[p \in SetupPlayers |-> 0],8100,730,"GiveSideB2ExposureMarkers",3,2,[p \in SetupPlayers |-> 0]) IN /\ EnterRuleInstruction93(parent,imminent,step) /\ NoInstructionInterrupt93(imminent,Empty9,step,NoModifiersFixture95(imminent),InstructionClearanceFixture93(imminent,0,0)) /\ BeginRuleInstructionAtomic93(imminent,atomic,step,InstructionClearanceFixture93(imminent,0,0)) /\ BeginPlay8([s.start EXCEPT !.caller=9000],[s.b EXCEPT !.caller=9000],s.objects,s.played,1,{10,22},TRUE) /\ PayPlayStep8([s.b EXCEPT !.caller=9000],[s.cost EXCEPT !.caller=9000],s.played,s.transaction,FALSE,0,TRUE) /\ DrainPlayCostBarrier8([s.cost EXCEPT !.caller=9000],[s.c EXCEPT !.caller=9000],7001,1,TRUE) /\ ActivatePlayedCard8([s.c EXCEPT !.caller=9000],[s.d EXCEPT !.caller=9000]) /\ MeetPlayedConditions8([s.d EXCEPT !.caller=9000],e,{PlayedCondition8(s.d)}) /\ ProcessConditionalCheckpoint96(s.costLedger,ledger,<<>>,<<>>,s.definitions,cp,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{}) /\ EnterPlayCohort97(e,f,cohort,s.played,s.text,invocation,ledger,<<>>,2,CardFacts9) /\ PlaySingleValid97(first) /\ cohort.owner.windowId=0 /\ \A bad \in {[invocation EXCEPT !.ruleStep="ForeignRule"],[invocation EXCEPT !.parentPlan=imminent], [invocation EXCEPT !.instruction.id=9001],[invocation EXCEPT !.caller=9001]} : ~EnterPlayCohort97(e,f,NewPlayCohort97(f,s.text,bad),s.played,s.text,bad,ledger,<<>>,2,CardFacts9) /\ ~EnterPlayCohort97(e,f,cohort,s.played,s.text,invocation,s.ledger,<<>>,2,CardFacts9) PlayOwnerBindingChecks97 == LET points == [p \in SetupPlayers |-> 0] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) step == [tag |-> "InstructionStepReturn",instruction |-> 730,index |-> 1,step |-> first.plan.steps[1],complete |-> TRUE] child == WindowFixture92(651,"Paid",TurnSiteFixture92("SideA","ProcedureCoded6fbcb09dd4f",1),Empty9,0,NoTimingRef9) IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ ~CarryPlayInstruction97(first.resolving,first.finished,s.f,<>,first.resolvingPlan,first.completePlan,step) /\ ~CarryPlayInstruction97(first.resolving,first.finished,[s.f EXCEPT !.object=22],<>,first.resolvingPlan,first.completePlan,step) /\ ~CarryPlayInstruction97(first.resolving,first.finished,[s.f EXCEPT !.id=7002],<>,first.resolvingPlan,first.completePlan,step) /\ ~CarryPlayInstruction97(first.resolving,first.finished,[s.f EXCEPT !.transaction=7002],<>,first.resolvingPlan,first.completePlan,step) /\ ~CarryPlayInstruction97(first.resolving,first.finished,[s.f EXCEPT !.stage="ProcedureCodee977e478b45b"],<>,first.resolvingPlan,first.completePlan,step) /\ ~CarryPlayInstruction97(first.resolving,first.finished,s.f,<<[s.busy EXCEPT !.busyTransaction=1]>>,first.resolvingPlan,first.completePlan,step) /\ ~CarryPlayInstruction97(first.resolving,first.finished,s.f,<<[s.busy EXCEPT !.busy.id=971]>>,first.resolvingPlan,first.completePlan,step) ExampleFamily039CardFixture97(zone) == LET base == [CardObject9("Specimen0176",zone,FALSE,IF zone="SideAHand" THEN "Down" ELSE "Up") EXCEPT !.loc=IF zone="SideADiscard" THEN "Discard" ELSE @] IN [key \in DOMAIN base \cup {"playCost","playX","subtypes"} |-> CASE key="playCost" -> 0 [] key="playX" -> FALSE [] key="subtypes" -> {"SchemaAtom048","SchemaAtom167"} [] OTHER -> base[key]] ExampleFamily039SourceTextFixture97(object,playId) == LET syntax == [SyntaxFixture93(921,"Static","SideA","Plan",<>) EXCEPT !.source=ObjectAbilitySource9(object)] static == [syntax |-> syntax,activity |-> AbilityDefinition9(921,"Static",syntax.source,"Printed"),instructions |-> <<>>,optionalParts |-> {},partsByInstruction |-> Empty9] conditional == [ConditionalDefinitionFixture96(922,"Specimen0176","Trigger","TraversalSuccessful","SchemaAtom016","SideB","SchemaAtom016") EXCEPT !.syntax.source=ObjectAbilitySource9(object),!.activity.source=ObjectAbilitySource9(object),!.syntax.units= <>] IN [tag |-> "NormalizedPrintedAbilities",playId |-> playId,object |-> object,card |-> "Specimen0176",sourceSHA |-> CardFacts9["Specimen0176"].sourceSHA, order |-> <<921,922>>,definitions |-> [id \in {921,922} |-> IF id=921 THEN static ELSE conditional]] ExampleFamily039StartFixture97(points) == LET action == ReadyFixture92(WindowFixture92(600,"NeutralValue00001",TurnSiteFixture92("SideA","ProcedureCode0e20572a4bab",1),Empty9,0,NoTimingRef9)) option == [SyntheticOption92(970,"NeutralValue00001","SideA") EXCEPT !.target=10,!.source=RuleAbilitySource9("SideABasicPlay")] busy == StartedFixture92(action,option) objects == [id \in {10,22} |-> ExampleFamily039CardFixture97(IF id=10 THEN "SideAHand" ELSE "SideADiscard")] played == [id \in {1,22} |-> IF id=1 THEN PlayedPlacementRow8(objects[10],TRUE) ELSE objects[22]] start == OpenPlay8(7000,10,"SideA",600) b == [start EXCEPT !.object=1,!.stage="ProcedureCode0f076861472c",!.kind="Plan",!.subtypes=objects[10].subtypes] transaction == [id |-> 7001,procedureId |-> 7000,object |-> 1,allPaid |-> TRUE,basePart |-> PlayInherentPart8(played[1],0), playCostIgnored |-> FALSE,paidSomething |-> TRUE,checkpointRequired |-> TRUE] cost == [b EXCEPT !.stage="CostBarrier",!.transaction=7001,!.checkpointRequired=TRUE] c == [cost EXCEPT !.stage="ProcedureCodecbf6b11f0ae0"] d == [c EXCEPT !.stage="ProcedureCode7647b901fcb1",!.activationReached=TRUE] e == [d EXCEPT !.stage="ProcedureCodebddd9a1a600b"] f == [e EXCEPT !.stage="ProcedureCode3d7f756d78f7"] text == ExampleFamily039SourceTextFixture97(1,7000) conditional == text.definitions[922] foreignConditional == ReboundConditionalDefinition96(conditional,22) definitions == [key \in {ConditionalKey96(conditional),ConditionalKey96(foreignConditional)} |-> IF key=ConditionalKey96(conditional) THEN conditional ELSE foreignConditional] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,played) EXCEPT !.points=points,!.usedObjects={1,10,22}] seed == NewConditionalLedger96(initial) cp1 == PlayEmptyCheckpointFixture97(seed,1,definitions,played,FALSE,0,[kind |-> "PlayCost",playId |-> 7000,transactionId |-> 7001]) costLedger == ConditionalCommittedFixture96(seed,definitions,cp1,Empty9,Empty9,Empty9) activationSnapshot == PlaySnapshotFixture97(15,1,"PlayedCardActivated",definitions,played,costLedger,TRUE,0) cp2 == PlayEmptyCheckpointFixture97(costLedger,2,definitions,played,TRUE,0,PlayActivationCaller97(e)) activationLedger == ConditionalCommittedFixture96(costLedger,definitions,cp2,Empty9,Empty9,Empty9) invocation == [tag |-> "PlayInvocation",playId |-> 7000,object |-> 1,caller |-> 600,transactionId |-> 7001,origin |-> "NeutralValue00001", owner |-> [windowId |-> 600,option |-> busy.busy,transaction |-> busy.busyTransaction]] cohort == NewPlayCohort97(f,text,invocation) IN [action |-> action,option |-> option,busy |-> busy,objects |-> objects,played |-> played,start |-> start,b |-> b,transaction |-> transaction,cost |-> cost, c |-> c,d |-> d,e |-> e,f |-> f,text |-> text,conditional |-> conditional,foreignConditional |-> foreignConditional,definitions |-> definitions,seed |-> seed,cp1 |-> cp1,costLedger |-> costLedger, activationSnapshot |-> activationSnapshot,cp2 |-> cp2,ledger |-> activationLedger,invocation |-> invocation,cohort |-> cohort] PlayEmptyCohortChecks97 == LET s == ExampleFamily039StartFixture97([p \in SetupPlayers |-> 0]) g == [s.f EXCEPT !.stage="ProcedureCodee977e478b45b"] h == [g EXCEPT !.stage="ProcedureCodec610fc738935"] i == [h EXCEPT !.stage="ProcedureCode03de9212dc90"] complete == [i EXCEPT !.stage="Complete",!.complete=TRUE] returned == [complete EXCEPT !.returned=TRUE] receipt == [tag |-> "PlayCohortCompletion",playId |-> 7000,object |-> 1,dispositions |-> Empty9, ownedTimingIds |-> {},returnedTimingIds |-> {},ownEndTriggersResolved |-> TRUE] cleanup == [playId |-> 7000,object |-> 1,disposition |-> "RetainSelf",trashInstructionComplete |-> FALSE] retention == [id |-> 9500,playId |-> 7000,source |-> 1,created |-> TRUE,expiryEffect |-> "AnotherCurrentPlayedOrObjectiveClaimedObjective"] effects == [id \in {9500} |-> retention] IN /\ ExampleFamily037StartValid97(s) /\ CardFacts9["Specimen0176"].kind="Plan" /\ s.cohort.order= <<>> /\ s.cohort.phase="Complete" /\ s.cohort.dispositions=Empty9 /\ s.cohort.usedInstances={} /\ ConditionalDefinitionValid96(s.conditional) /\ InferredAbilityKind93(s.conditional.syntax)="Conditional" /\ PlayedSourceIsResolving9(s.f) /\ ~AbilityIsResolving9(s.cohort.ability) /\ FinishPlayCohort97(s.cohort,s.f,g,<>,receipt) /\ FinishPlayCleanup8(g,h,s.played,TRUE,FALSE,cleanup,Empty9,effects,retention) /\ MeetPlayResolvedConditions8(h,i,{[tag |-> "PlayResolved",object |-> 1,kind |-> "Plan",actor |-> "SideA",playId |-> 7000]}) /\ CompletePlay8(i,complete) /\ ReturnPlayToCaller8(complete,returned,TRUE,600) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(s.busy)) /\ ~CompletePriorityOptionFrame9(s.busy).open /\ effects[9500].source=1 /\ ~PlayedSourceIsResolving9(g) PlayOriginalConditionalBindingChecks97 == LET points == [p \in SetupPlayers |-> IF p="SideA" THEN 3 ELSE 0] s == ExampleFamily037StartFixture97(points) first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) SchemaAtom187 == PlaySingleFixture97(first.returned,s.f,<>,s.played,first.drained,points,8101,740,"MayPay5GiveSideB2ExposureMarkers",4,4,points) g == [s.f EXCEPT !.stage="ProcedureCodee977e478b45b"] h == [g EXCEPT !.stage="ProcedureCodec610fc738935"] i == [h EXCEPT !.stage="ProcedureCode03de9212dc90"] objects == [id \in {11,22} |-> IF id=11 THEN ExampleFamily037CardFixture97("SideADiscard") ELSE s.played[id]] cleanup == [playId |-> 7000,object |-> 1,disposition |-> "Retire",trashInstructionComplete |-> TRUE] raw == [tag |-> "PlayResolved",object |-> 1,kind |-> "Plan",actor |-> "SideA",playId |-> 7000] corruptOriginal == [s.conditional EXCEPT !.effectChoices={{},{1}}] corruptCurrent == ReboundConditionalDefinition96(corruptOriginal,11) definitions == [key \in {ConditionalKey96(corruptCurrent)} |-> corruptCurrent] snapshot == ConditionalSnapshotFixture96(51,4,"ProcedureCodec610fc738935",definitions,objects) event == PlayResolvedEventFixture97(1000,corruptCurrent,snapshot,raw) IN /\ ExampleFamily037StartValid97(s) /\ PlaySingleValid97(first) /\ PlaySingleValid97(SchemaAtom187) /\ NormalPlayCleanup97(g,h,s.played,objects,11,SchemaAtom187.drained.lastSnapshot.usedObjects,cleanup) /\ ConditionalDefinitionValid96(corruptOriginal) /\ ConditionalDefinitionValid96(corruptCurrent) /\ ~ConditionalOptional96(s.conditional) /\ ConditionalOptional96(corruptCurrent) /\ ~NormalPlayResolvedOccurrence97(g,h,i,s.played,objects,11,SchemaAtom187.drained.lastSnapshot.usedObjects,cleanup,{raw},corruptOriginal,corruptCurrent,snapshot,1000,event,SchemaAtom187.returned) ExampleFamily047DefinitionFixture97 == [ConditionalDefinitionFixture96(905,"Specimen0153","Trigger","ExposureMarkerTaken","SchemaAtom016","SideB","SideB") EXCEPT !.syntax.source=ObjectAbilitySource9(30),!.activity.source=ObjectAbilitySource9(30),!.triggerRequirements={1}, !.instructions= <<750>>,!.partsByInstruction=[id \in {750} |-> {1,2}],!.effectChoices={{1},{2}}] ExampleFamily047SnapshotFixture97(id,checkpoint,point,definitions,objects,ledger,exampleFamily037Active,exposureMarkers,exposureMarkerTakes) == LET base == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(id,checkpoint,point,definitions,objects),ledger) EXCEPT !.ordinaryActivity=[key \in DOMAIN definitions |-> IF definitions[key].syntax.source.object=1 THEN exampleFamily037Active ELSE IF definitions[key].syntax.source.object=30 THEN TRUE ELSE @], !.activationEpoch=ConditionalEpochMap96(ledger,definitions),!.activationSerial=ledger.activationSerial, !.usedObjects=@ \cup ledger.lastSnapshot.usedObjects,!.exposureMarkers["SideB"]=exposureMarkers,!.points=ledger.lastSnapshot.points] IN [field \in DOMAIN base \cup {"exposureMarkerTakes"} |-> IF field="exposureMarkerTakes" THEN [turn \in {1} |-> exposureMarkerTakes] ELSE base[field]] ExampleFamily047EmptyCheckpointFixture97(ledger,id,definitions,objects,exampleFamily037Active,exposureMarkers,exposureMarkerTakes,caller) == [ConditionalCheckpointFixture96(ledger,id, ExampleFamily047SnapshotFixture97(10*id,id,"CheckpointBeginning",definitions,objects,ledger,exampleFamily037Active,exposureMarkers,exposureMarkerTakes), ExampleFamily047SnapshotFixture97(10*id+1,id,"ProcedureCodee605a78f5d5e",definitions,objects,ledger,exampleFamily037Active,exposureMarkers,exposureMarkerTakes),Empty9) EXCEPT !.caller=caller] ExampleFamily047ExampleFamily037StartFixture97 == LET action == ReadyFixture92(WindowFixture92(600,"NeutralValue00001",TurnSiteFixture92("SideA","ProcedureCode0e20572a4bab",1),Empty9,0,NoTimingRef9)) option == [SyntheticOption92(970,"NeutralValue00001","SideA") EXCEPT !.target=10,!.source=RuleAbilitySource9("SideABasicPlay")] busy == StartedFixture92(action,option) objects == [id \in {10,30} |-> IF id=10 THEN ExampleFamily037CardFixture97("SideAHand") ELSE CardObject9("Specimen0153","SideAProfile",FALSE,"Up")] played == [id \in {1,30} |-> IF id=1 THEN PlayedPlacementRow8(objects[10],TRUE) ELSE objects[30]] start == OpenPlay8(7000,10,"SideA",600) b == [start EXCEPT !.object=1,!.stage="ProcedureCode0f076861472c",!.kind="Plan",!.subtypes=objects[10].subtypes] transaction == [id |-> 7001,procedureId |-> 7000,object |-> 1,allPaid |-> TRUE,basePart |-> PlayInherentPart8(played[1],0), playCostIgnored |-> FALSE,paidSomething |-> TRUE,checkpointRequired |-> TRUE] cost == [b EXCEPT !.stage="CostBarrier",!.transaction=7001,!.checkpointRequired=TRUE] c == [cost EXCEPT !.stage="ProcedureCodecbf6b11f0ae0"] d == [c EXCEPT !.stage="ProcedureCode7647b901fcb1",!.activationReached=TRUE] e == [d EXCEPT !.stage="ProcedureCodebddd9a1a600b"] f == [e EXCEPT !.stage="ProcedureCode3d7f756d78f7"] text == ExampleFamily037SourceTextFixture97(1,7000) exampleFamily037Conditional == text.definitions[902] affiliationProfile == ExampleFamily047DefinitionFixture97 definitions == [key \in {ConditionalKey96(exampleFamily037Conditional),ConditionalKey96(affiliationProfile)} |-> IF key=ConditionalKey96(affiliationProfile) THEN affiliationProfile ELSE exampleFamily037Conditional] initialBase == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,played) EXCEPT !.points=[p \in SetupPlayers |-> IF p="SideA" THEN 3 ELSE 0],!.usedObjects={1,10,30}] initial == [field \in DOMAIN initialBase \cup {"exposureMarkerTakes"} |-> IF field="exposureMarkerTakes" THEN [turn \in {1} |-> {}] ELSE initialBase[field]] seed == NewConditionalLedger96(initial) cp1 == ExampleFamily047EmptyCheckpointFixture97(seed,1,definitions,played,FALSE,0,{},[kind |-> "PlayCost",playId |-> 7000,transactionId |-> 7001]) costLedger == ConditionalCommittedFixture96(seed,definitions,cp1,Empty9,Empty9,Empty9) activationSnapshot == ExampleFamily047SnapshotFixture97(15,1,"PlayedCardActivated",definitions,played,costLedger,TRUE,0,{}) cp2 == ExampleFamily047EmptyCheckpointFixture97(costLedger,2,definitions,played,TRUE,0,{},PlayActivationCaller97(e)) activationLedger == ConditionalCommittedFixture96(costLedger,definitions,cp2,Empty9,Empty9,Empty9) invocation == [tag |-> "PlayInvocation",playId |-> 7000,object |-> 1,caller |-> 600,transactionId |-> 7001,origin |-> "NeutralValue00001", owner |-> [windowId |-> 600,option |-> busy.busy,transaction |-> busy.busyTransaction]] cohort == NewPlayCohort97(f,text,invocation) IN [action |-> action,option |-> option,busy |-> busy,objects |-> objects,played |-> played,start |-> start,b |-> b,transaction |-> transaction,cost |-> cost, c |-> c,d |-> d,e |-> e,f |-> f,text |-> text,definitions |-> definitions,seed |-> seed,cp1 |-> cp1,costLedger |-> costLedger, activationSnapshot |-> activationSnapshot,cp2 |-> cp2,ledger |-> activationLedger,invocation |-> invocation,cohort |-> cohort,affiliationProfile |-> affiliationProfile] ExampleFamily047ExampleFamily037StartValid97(s) == /\ BeginPriorityOption9(<>,<>,s.option,s.objects,LegalityFixture92(s.action,s.option),Empty9) /\ BeginPlay8(s.start,s.b,s.objects,s.played,1,{10,30},TRUE) /\ PayPlayStep8(s.b,s.cost,s.played,s.transaction,FALSE,0,TRUE) /\ ProcessConditionalCheckpoint96(s.seed,s.costLedger,<>,<>,s.definitions,s.cp1,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600}) /\ ConditionalCheckpointDrained96(s.costLedger,<>,1) /\ DrainPlayCostBarrier8(s.cost,s.c,7001,1,TRUE) /\ ActivatePlayedCard8(s.c,s.d) /\ MeetPlayedConditions8(s.d,s.e,{PlayedCondition8(s.d)}) /\ ObserveConditionalActivity96(s.costLedger,s.costLedger,s.costLedger,<>,<>,SnapshotWithConditionalRegistry96(s.cp1.processingSnapshot,s.costLedger),s.activationSnapshot) /\ ProcessConditionalCheckpoint96(s.costLedger,s.ledger,<>,<>,s.definitions,s.cp2,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600}) /\ EnterPlayCohort97(s.e,s.f,s.cohort,s.played,s.text,s.invocation,s.ledger,<>,2,CardFacts9) ExampleFamily047ExposureMarkerConditionsFixture97(definitions,events) == [key \in DOMAIN definitions |-> [id \in DOMAIN events |-> [ConditionalTriggerReceiptFixture96(definitions[key],events[id]) EXCEPT !.results=[part \in definitions[key].triggerRequirements |-> events[id].snapshot.exposureMarkerTakes[1]={}]]]] ExampleFamily047PlayReactionDrainChecks97 == LET s == ExampleFamily047ExampleFamily037StartFixture97 points == s.ledger.lastSnapshot.points first == PlaySingleFixture97(s.cohort,s.f,<>,s.played,s.ledger,points,8100,730,"GiveSideB2ExposureMarkers",3,2,points) beforeFirstExposureMarker == ExampleFamily047SnapshotFixture97(23,2,"BeforeExposureMarkerTaken",s.definitions,s.played,s.ledger,TRUE,0,{}) beforeSecondExposureMarker == ExampleFamily047SnapshotFixture97(24,2,"BeforeExposureMarkerTaken",s.definitions,s.played,s.ledger,TRUE,1,{31}) events == [id \in {31,32} |-> ConditionalEventFixture96(id,"ExposureMarkerTaken",0,"SideB","SideB",IF id=31 THEN beforeFirstExposureMarker ELSE beforeSecondExposureMarker,730)] cp3 == [ExampleFamily047EmptyCheckpointFixture97(s.ledger,3,s.definitions,s.played,TRUE,2,{31,32},PlayInstructionCaller97(first.finished)) EXCEPT !.occurrences=events] key == [definition |-> ConditionalKey96(s.affiliationProfile),occurrence |-> 31] allocation == [k \in {key} |-> 9900] bindings == ConditionalBindingsFixture96({key},3,610,61) recognized == ConditionalCommittedFixture96(s.ledger,s.definitions,cp3,allocation,bindings,Empty9) members == ConditionalWindowMembers96(recognized.instances,610) child == WindowFixture92(610,"Reaction",s.busy.site,members,61,NoTimingRef9) cp4 == ExampleFamily047EmptyCheckpointFixture97(recognized,4,s.definitions,s.played,TRUE,2,{31,32},ConditionalPriorityCaller96(child)) received4 == ConditionalCommittedFixture96(recognized,s.definitions,cp4,Empty9,Empty9,Empty9) ready == [ReadyFixture92(child) EXCEPT !.checkpoint=4] option == ConditionalOptionFixture92(ready,9900) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(9900,s.affiliationProfile,ready,option,LegalityFixture92(ready,option).transactionId,"SideAProfile") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received4 EXCEPT !.instances[9900].status="Imminent"] plan == OpenInstruction93(750,"Ability",9900,s.affiliationProfile.syntax.source,"SideAProfile",1,"NoValue",<<"GainSideA2ResourceUnits">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={},!.phase="Imminent"] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {"GainSideA2ResourceUnits"}] resolving == [selected EXCEPT !.instances[9900].status="Resolving",!.instances[9900].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {"GainSideA2ResourceUnits"}]]] completeP == [resolvingP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"GainSideA2ResourceUnits">>] complete == [resolving EXCEPT !.instances[9900].status="Complete"] cp5 == ExampleFamily047EmptyCheckpointFixture97(complete,5,s.definitions,s.played,TRUE,2,{31,32},ConditionalInstructionCaller96(completeP)) finalLedger == ConditionalCommittedFixture96(complete,s.definitions,cp5,Empty9,Empty9,Empty9) finalP == [completeP EXCEPT !.phase="Complete",!.checkpoint=5] returnedP == [finalP EXCEPT !.phase="Returned",!.ability.returned=TRUE] returned == CompletePriorityOptionFrame9(busy) conditionalCP == [tag |-> "ConditionalInstructionCheckpoint",id |-> 5,abilityInstance |-> 9900,transactionId |-> p.transaction, source |-> s.affiliationProfile.syntax.source,instruction |-> 750,index |-> 1,complete |-> TRUE,allNewerChainsComplete |-> TRUE] cp6 == ExampleFamily047EmptyCheckpointFixture97(finalLedger,6,s.definitions,s.played,TRUE,2,{31,32},ConditionalPriorityCaller96(returned)) received6 == ConditionalCommittedFixture96(finalLedger,s.definitions,cp6,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(returned) EXCEPT !.checkpoint=6] passed == PassPriorityFrame9(sideA) cp7 == ExampleFamily047EmptyCheckpointFixture97(received6,7,s.definitions,s.played,TRUE,2,{31,32},ConditionalPriorityCaller96(passed)) received7 == ConditionalCommittedFixture96(received6,s.definitions,cp7,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(passed) EXCEPT !.checkpoint=7] closed == PassPriorityFrame9(sideB) playCP == PlayCheckpointReceiptFixture97(first.finished,3) nextPlay == PlayAdvanceDisposition97(first.afterCP,"Resolved",8100) SchemaAtom187 == PlaySingleFixture97(nextPlay,s.f,<>,s.played,received7,points,8101,740,"MayPay5GiveSideB2ExposureMarkers",8,4,points) IN /\ CardFacts9["Specimen0153"].kind="Profile" /\ ExampleFamily047ExampleFamily037StartValid97(s) /\ ~FlagPresent93(s.affiliationProfile.syntax.units,"OncePerTurn") /\ ~ConditionalOptional96(s.affiliationProfile) /\ s.affiliationProfile.effectChoices={{1},{2}} /\ s.affiliationProfile.optionalParts={} /\ \A snapshot \in {s.cp1.beginSnapshot,s.cp1.processingSnapshot,s.cp2.beginSnapshot,s.cp2.processingSnapshot,cp3.beginSnapshot,cp3.processingSnapshot} : snapshot.ordinaryActivity[ConditionalKey96(s.affiliationProfile)] /\ ConditionalActive96(s.affiliationProfile,snapshot) /\ BeginPlayAbility97(s.cohort,first.imminent,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points,8100,{}, first.plan,first.imminentPlan,[InstructionTargetsFixture93(first.plan) EXCEPT !.targets={}],InstructionEntryFixture93(first.plan),LoopRestrictionsFixture97(s.text.definitions[903])) /\ ResolvePlayWithoutInterrupt97(first.imminent,first.resolving,s.f,<>,first.imminentPlan,first.resolvingPlan,NoModifiersFixture95(first.imminentPlan),InstructionClearanceFixture93(first.imminentPlan,0,0)) /\ CarryPlayInstruction97(first.resolving,first.finished,s.f,<>,first.resolvingPlan,first.completePlan, [tag |-> "InstructionStepReturn",instruction |-> 730,index |-> 1,step |-> "GiveSideB2ExposureMarkers",complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(s.ledger,recognized,<>,<>,s.definitions,cp3,ExampleFamily047ExposureMarkerConditionsFixture97(s.definitions,events),allocation,bindings,Empty9,Empty9,{600}) /\ DOMAIN recognized.instances={9900} /\ recognized.instances[9900].occurrence=31 /\ recognized.instances[9900].member.mandatory /\ recognized.instances[9900].member.source=ObjectAbilitySource9(30) /\ recognized.lastSnapshot.exposureMarkers["SideB"]=2 /\ recognized.lastSnapshot.exposureMarkerTakes[1]={31,32} /\ ~ConditionalCheckpointDrained96(recognized,<>,3) /\ ~PlayInstructionCheckpoint97(first.finished,first.afterCP,s.f,<>,recognized,playCP) /\ first.finished.phase="InstructionCheckpoint" /\ first.finished.checkpoint=0 /\ ~FinishOnePlayAbility97(first.finished,PlayAdvanceDisposition97(first.finished,"Resolved",8100),s.f,<>) /\ ~BeginPlayAbility97(first.finished,SchemaAtom187.imminent,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points,8101,{}, SchemaAtom187.plan,SchemaAtom187.imminentPlan,[InstructionTargetsFixture93(SchemaAtom187.plan) EXCEPT !.targets={}],InstructionEntryFixture93(SchemaAtom187.plan),LoopRestrictionsFixture97(s.text.definitions[904])) /\ OpenConditionalReaction96(<>,<>,recognized,610,s.busy.site,OpeningFixture92(610,"Reaction",s.busy.site,members,61,NoTimingRef9),{600}) /\ ProcessConditionalCheckpoint96(recognized,received4,<>,<>,s.definitions,cp4,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(received4,<>,<>,[CheckpointFixture92(child) EXCEPT !.id=4]) /\ ~PassPriority9(<>,<>,"SideA",Empty9) /\ BeginConditionalResolution96(received4,selected,<>,<>,p,imminentP,s.affiliationProfile, ExampleFamily047SnapshotFixture97(42,4,"BeforeAffiliationTrigger",s.definitions,s.played,received4,TRUE,2,{31,32}),9900,option,LegalityFixture92(ready,option),Empty9, plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> 905,source |-> ObjectAbilitySource9(30),results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(selected,resolving,<>,imminentP,resolvingP,imminentPlan,resolvingPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0),expected) /\ RecordConditionalExecutionUse96(resolving,resolving,resolvingP,resolvingPlan, [tag |-> "ConditionalEffectExecution",instruction |-> InstructionWindowRef93(resolvingPlan),abilityInstance |-> 9900,source |-> ObjectAbilitySource9(30),partIds |-> {1}],Empty9,Empty9,Empty9,Empty9,0,{}) /\ CarryConditionalInstruction96(resolving,complete,complete,<>,<>,resolvingP,completeP,resolvingPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 750,index |-> 1,step |-> "GainSideA2ResourceUnits",complete |-> TRUE], ExampleFamily047SnapshotFixture97(43,4,"BeforeAffiliationInstructionReturn",s.definitions,s.played,resolving,TRUE,2,{31,32}), ExampleFamily047SnapshotFixture97(44,4,"AfterAffiliationInstructionReturn",s.definitions,s.played,complete,TRUE,2,{31,32})) /\ ProcessConditionalCheckpoint96(complete,finalLedger,<>,<>,s.definitions,cp5,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,610}) /\ ConditionalInstructionCheckpoint96(finalLedger,<>,completeP,finalP,conditionalCP) /\ FinishConditionalProcedure96(<>,<>,finalP,returnedP,PaidReturnFixture95(busy,5)) /\ returned.stage="NeedCheckpoint" /\ ActionablePriority9(<>)={} /\ ProcessConditionalCheckpoint96(finalLedger,received6,<>,<>,s.definitions,cp6,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(received6,<>,<>,[CheckpointFixture92(returned) EXCEPT !.id=6]) /\ PassConditionalPriority96(received6,received6,received6,<>,<>,"SideA",Empty9, ExampleFamily047SnapshotFixture97(62,6,"BeforeSideAPass",s.definitions,s.played,received6,TRUE,2,{31,32}),ExampleFamily047SnapshotFixture97(63,6,"AfterSideAPass",s.definitions,s.played,received6,TRUE,2,{31,32})) /\ ProcessConditionalCheckpoint96(received6,received7,<>,<>,s.definitions,cp7,ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(received7,<>,<>,[CheckpointFixture92(passed) EXCEPT !.id=7]) /\ PassConditionalPriority96(received7,received7,received7,<>,<>,"SideB",Empty9, ExampleFamily047SnapshotFixture97(72,7,"BeforeSideBPass",s.definitions,s.played,received7,TRUE,2,{31,32}),ExampleFamily047SnapshotFixture97(73,7,"AfterSideBPass",s.definitions,s.played,received7,TRUE,2,{31,32})) /\ ~closed.open /\ closed.pending={} /\ closed.busy.id=0 /\ PopClosedPriorityWindow9(<>,<>) /\ ConditionalCheckpointDrained96(received7,<>,3) /\ PlayInstructionCheckpoint97(first.finished,first.afterCP,s.f,<>,received7,playCP) /\ FinishOnePlayAbility97(first.afterCP,nextPlay,s.f,<>) /\ BeginPlayAbility97(nextPlay,SchemaAtom187.imminent,s.f,<>,s.played,DOMAIN s.text.definitions,ActivityContext9,points,8101,{}, SchemaAtom187.plan,SchemaAtom187.imminentPlan,[InstructionTargetsFixture93(SchemaAtom187.plan) EXCEPT !.targets={}],InstructionEntryFixture93(SchemaAtom187.plan),LoopRestrictionsFixture97(s.text.definitions[904])) /\ received7.instances[9900].status="Complete" /\ ~received7.instances[9900].used /\ s.busy.stage="Resolving" /\ s.busy.reception=s.action.reception /\ s.busy.busy=s.option /\ s.f.stage="ProcedureCode3d7f756d78f7" /\ PlayedSourceIsResolving9(s.f) /\ nextPlay.cursor=2 PlayImmutablePresenceChecks97 == LET points == [p \in SetupPlayers |-> 0] s == ExampleFamily037StartFixture97(points) omitted == DOMAIN s.text.definitions \ {903} skipped == PlayAdvanceDisposition97(s.cohort,"SkippedInactive",0) IN /\ ExampleFamily037StartValid97(s) /\ 1 \in DOMAIN s.played /\ ~PlayPresenceValid97(s.cohort,s.played,omitted) /\ ~PlayCurrentActive97(s.cohort,s.f,s.played,omitted,ActivityContext9,points) /\ ~SkipInactivePlay97(s.cohort,skipped,s.f,<>,s.played,omitted,ActivityContext9,points) /\ s.cohort.order= <<903,904>> /\ s.cohort.dispositions=Empty9 PlayContinuationTargetReceiptChecks97 == LET s == LoopGenericFixture97 targets == InstructionTargetsFixture93(s.secondPlan) IN /\ LoopGenericValidFixture97(s) /\ \A bad \in {[targets EXCEPT !.valid=FALSE],[targets EXCEPT !.source=ObjectAbilitySource9(2)], [targets EXCEPT !.index=1],[targets EXCEPT !.instruction=750],[targets EXCEPT !.abilityInstance=8501]} : ~EnterNextPlayInstruction97(s.between,s.secondImminent,s.shape.f,<>,s.secondPlan,s.secondImminentPlan, bad,LoopNextEntryFixture97(s.secondPlan,2)) PlayAbilityChecks9 == /\ PlayClassificationChecks97 /\ PlayExampleFamily037SequenceChecks97 /\ PlayThreatSkipChecks97 /\ PlayThreatRefreshChecks97 /\ PlayOptionalChoiceChecks97 /\ PlayNormalCleanupChecks97 /\ LoopGenericLifecycleChecks97 /\ LoopGenericProfileChecks97 /\ LoopGenericOptionalScopeChecks97 /\ LoopExampleFamily037InterruptChecks97 /\ PlayInstructionInvocationChecks97 /\ PlayOwnerBindingChecks97 /\ PlayEmptyCohortChecks97 /\ PlayOriginalConditionalBindingChecks97 /\ ExampleFamily047PlayReactionDrainChecks97 /\ PlayImmutablePresenceChecks97 /\ PlayContinuationTargetReceiptChecks97 OrderInstructionFixture98(key) == CASE key="EndTraversal" -> 2001 [] key="Specimen0134EndTraversalUnlessShuffle" -> 2002 [] key="Damage1" -> 2003 [] key="GainResourceUnit" -> 2004 [] key="DamageDraw" -> 2005 [] key="LoseActionPoint" -> 2006 [] key="RetireTechnique" -> 2007 [] key="Damage2" -> 2008 [] OTHER -> 2009 OrderSubFixture98(id,barrierCard,key) == LET syntax == [SyntaxFixture93(id,"BarrierInstruction","SideA","Barrier",<>) EXCEPT !.source=ObjectAbilitySource9(barrierCard)] IN [syntax |-> syntax,activity |-> AbilityDefinition9(id,"BarrierInstruction",syntax.source,"Granted"),instructions |-> <>] OrderPrintedSubFixture98(id,barrierCard,key) == [OrderSubFixture98(id,barrierCard,key) EXCEPT !.activity.provider="Printed"] OrderTemplateFixture98(barrierCard,key) == [definition |-> OrderSubFixture98(9990,barrierCard,key),key |-> key] OrderGrantFixture98(id,card,source,target,kind,placement,mode,templates,specified,facts) == LET syntax == [SyntaxFixture93(3000+id,kind,facts[card].side,facts[card].kind,BaseUnits93(kind)) EXCEPT !.source=ObjectAbilitySource9(source)] IN [tag |-> "NormalizedBarrierInstructionGrant",id |-> id,card |-> card,sourceSHA |-> facts[card].sourceSHA,target |-> target, ability |-> [syntax |-> syntax,activity |-> AbilityDefinition9(3000+id,kind,syntax.source,"Printed"),instructions |-> IF kind="Static" THEN <<>> ELSE <<9000+id>>], origin |-> [tag |-> "NormalizedBarrierInstructionGrantOrigin",ability |-> 3000+id,source |-> syntax.source,card |-> card,sourceSHA |-> facts[card].sourceSHA, kind |-> IF card \in {"NeutralValue00012","Specimen0247"} THEN "MaintainedEffect" ELSE "Ability"], placement |-> placement,mode |-> mode,templates |-> templates,specified |-> specified] OrderRowsFixture98(ids,grant,indices) == [id \in SubIds6(ids) |-> [definition |-> ReidentifyBarrierInstruction98(grant.templates[indices[id]].definition,id), textKey |-> grant.templates[indices[id]].key,effect |-> grant.id,parent |-> 0,printedSlot |-> 0,template |-> indices[id]]] OrderDecisionFixture98(before,id,kind,spine,present,gained,lost,gainOrder) == [tag |-> "NormalizedBarrierInstructionOrderingDecision",id |-> id,kind |-> kind,barrierCard |-> before.barrierCard,clock |-> before.clock+1, beforeOrder |-> before.order,beforeSpine |-> before.spine,beforePresent |-> before.present,beforeDefinitions |-> before.definitions, beforeProvenance |-> before.provenance,beforeApplications |-> before.applications,beforeHistory |-> before.history, gained |-> gained,lost |-> lost,afterSpine |-> spine,afterOrder |-> VisibleSubOrder98(spine,present),gainOrder |-> gainOrder, authority |-> IF kind \in {"OrdinaryGain","SelfStaticResize","PrintedResize"} /\ OrderHasExceptions98(before) THEN "MixedHistoryExtension" ELSE "DirectSourceClauses"] OrderGainFixture98(before,id,grant,rows,spine,gainOrder) == LET applications == [g \in {grant.id} |-> grant] kind == IF grant.mode="SideAChoice" THEN "SideADeclaredGain" ELSE "OrdinaryGain" decision == OrderDecisionFixture98(before,id,kind,spine,before.present \cup DOMAIN rows,DOMAIN rows,{},gainOrder) after == OrderChangedState98(before,rows,applications,before.present \cup DOMAIN rows,spine,decision,kind,{},"Grant") IN [before |-> before,after |-> after,applications |-> applications,grant |-> grant,rows |-> rows,spine |-> spine,decision |-> decision] OrderGainValidFixture98(s,objects,facts) == GainOrderedBarrierInstructions98(s.before,s.after,s.applications,s.rows,s.spine,s.decision,objects,facts) OrderPrintedReceiptFixture98(barrierCard,card,order,definitions,keys,facts) == [tag |-> "NormalizedPrintedBarrierInstructions",barrierCard |-> barrierCard,card |-> card,sourceSHA |-> facts[card].sourceSHA,order |-> order,definitions |-> definitions,textKeys |-> keys] OrderLossFixture98(before,id,ids,ended) == LET receipt == [tag |-> "NormalizedBarrierInstructionPresenceLoss",id |-> id,barrierCard |-> before.barrierCard,beforeOrder |-> before.order,beforeHistory |-> before.history,ids |-> ids,endedApplications |-> ended] after == [before EXCEPT !.present=@ \ ids,!.order=VisibleSubOrder98(before.spine,before.present \ ids),!.clock=@+1,!.activeApplications=@ \ ended, !.history=Append(@,[kind |-> "Loss",clock |-> before.clock+1,gained |-> {},lost |-> ids,decision |-> id,applications |-> ended]), !.decisions=[d \in DOMAIN @ \cup {id} |-> IF d=id THEN receipt ELSE @[d]]] IN [before |-> before,after |-> after,receipt |-> receipt] OrderCountFixture98(before,application,count,tag) == [tag |-> tag,barrierCard |-> before.barrierCard,count |-> count,application |-> application,snapshotId |-> 500+before.clock, ability |-> IF application=0 THEN 0 ELSE before.applications[application].definition.ability.syntax.id, source |-> IF application=0 THEN ObjectAbilitySource9(before.barrierCard) ELSE before.applications[application].definition.ability.syntax.source] OrderSpecimen0134Checks98 == LET objects == [id \in 1..4 |-> [CardObject9(CASE id=1 -> "Specimen0134" [] id=2 -> "Specimen0262" [] id=3 -> "Specimen0223" [] OTHER -> "Specimen0245","Play",TRUE,"Up") EXCEPT !.activated=id # 3]] printed == [id \in {50} |-> OrderPrintedSubFixture98(id,1,"Specimen0134EndTraversalUnlessShuffle")] keys == [id \in {50} |-> "Specimen0134EndTraversalUnlessShuffle"] initial == NewBarrierInstructionOrder98(1,<<50>>,printed,keys) exampleFamily074 == OrderGrantFixture98(10,"Specimen0262",2,1,"Static","Before","Default",<>,TRUE,CardFacts9) wf == OrderGainFixture98(initial,1,exampleFamily074,OrderRowsFixture98(<<80>>,exampleFamily074,[id \in {80} |-> 1]),<<80,50>>,<<80>>) exampleFamily061 == OrderGrantFixture98(7,"Specimen0223",3,1,"Conditional","Before","Default",<>,TRUE,CardFacts9) sf == OrderGainFixture98(wf.after,2,exampleFamily061,OrderRowsFixture98(<<3>>,exampleFamily061,[id \in {3} |-> 1]),<<3,80,50>>,<<3>>) Specimen0134 == OrderGrantFixture98(2,"Specimen0134",1,1,"Conditional","Before","Default",<>,TRUE,CardFacts9) rows == OrderRowsFixture98(<<901,900>>,Specimen0134,[id \in {900,901} |-> IF id=901 THEN 1 ELSE 2]) lf == OrderGainFixture98(sf.after,3,Specimen0134,rows,<<901,900,3,80,50>>,<<901,900>>) bad == OrderGainFixture98(sf.after,3,Specimen0134,rows,<<3,901,900,80,50>>,<<901,900>>) reverse == OrderGainFixture98(sf.after,3,Specimen0134,rows,<<900,901,3,80,50>>,<<900,901>>) IN /\ InitializeBarrierInstructionOrder98(initial,1,<<50>>,printed,keys,objects,CardFacts9,OrderPrintedReceiptFixture98(1,"Specimen0134",<<50>>,printed,keys,CardFacts9)) /\ OrderGainValidFixture98(wf,objects,CardFacts9) /\ OrderGainValidFixture98(sf,objects,CardFacts9) /\ OrderGainValidFixture98(lf,objects,CardFacts9) /\ lf.after.order= <<901,900,3,80,50>> /\ [i \in 1..5 |-> lf.after.provenance[lf.after.order[i]].textKey]= <<"Damage1","GainResourceUnit","DamageDraw","LoseActionPoint","Specimen0134EndTraversalUnlessShuffle">> /\ GrantCategory98(exampleFamily074,1)=1 /\ GrantCategory98(Specimen0134,1)=1 /\ lf.after.applications[10].clock=1 /\ lf.after.applications[7].clock=2 /\ lf.after.applications[2].clock=3 /\ ~OrderGainValidFixture98(bad,objects,CardFacts9) /\ ~OrderGainValidFixture98(reverse,objects,CardFacts9) /\ CardFacts9["Specimen0245"].kind="Barrier" OrderSubtypeClass080ManualChecks98 == LET objects == [id \in {1,2,3} |-> CASE id=1 -> [CardObject9("Specimen0130","Play",TRUE,"Up") EXCEPT !.activated=TRUE] [] id=2 -> [CardObject9("Specimen0228","Play",TRUE,"Up") EXCEPT !.form="Counter",!.kind="SchemaAtom043",!.host=1] [] OTHER -> CardObject9("Specimen0143","SideAHand",FALSE,"Down")] printed == [id \in {50} |-> OrderPrintedSubFixture98(id,1,"RetireTechnique")] initial == NewBarrierInstructionOrder98(1,<<50>>,printed,[id \in {50} |-> "RetireTechnique"]) boost == OrderGrantFixture98(10,"Specimen0228",2,1,"Static","After","Default",<>,TRUE,CardFacts9) boosted == OrderGainFixture98(initial,1,boost,OrderRowsFixture98(<<99>>,boost,[id \in {99} |-> 1]),<<50,99>>,<<99>>) subtypeClass080 == OrderGrantFixture98(2,"Specimen0130",1,1,"Conditional","Unspecified","SideAChoice",<>,TRUE,CardFacts9) rows == OrderRowsFixture98(<<5>>,subtypeClass080,[id \in {5} |-> 1]) IN /\ OrderGainValidFixture98(boosted,objects,CardFacts9) /\ CardFacts9["Specimen0143"].kind="Barrier" /\ \A order \in {<<5,50,99>>,<<50,5,99>>,<<50,99,5>>} : LET f == OrderGainFixture98(boosted.after,2,subtypeClass080,rows,order,<<5>>) IN /\ OrderGainValidFixture98(f,objects,CardFacts9) /\ f.after.order=order /\ OrderPreserves98(f.after.order,boosted.after.order) /\ LET reversed == OrderGainFixture98(boosted.after,2,subtypeClass080,rows,<<99,5,50>>,<<5>>) IN ~OrderGainValidFixture98(reversed,objects,CardFacts9) OrderSpecimen0139Specimen0037Checks98 == LET objects == [id \in {1,2} |-> [CardObject9(IF id=1 THEN "Specimen0037" ELSE "NeutralValue00012","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] initial == NewBarrierInstructionOrder98(1,<<>>,Empty9,Empty9) NeutralValue00012 == OrderGrantFixture98(90,"NeutralValue00012",2,1,"BarrierInstruction","After","Default",<>,TRUE,CardFacts9) first == OrderGainFixture98(initial,1,NeutralValue00012,OrderRowsFixture98(<<90>>,NeutralValue00012,[id \in {90} |-> 1]),<<90>>,<<90>>) capacityHarmAlias == OrderGrantFixture98(2,"Specimen0037",1,1,"Conditional","Unspecified","Default",<>,FALSE,CardFacts9) rows == OrderRowsFixture98(<<5,4>>,capacityHarmAlias,[id \in {4,5} |-> IF id=5 THEN 1 ELSE 2]) SchemaAtom187 == OrderGainFixture98(first.after,2,capacityHarmAlias,rows,<<90,5,4>>,<<5,4>>) otherTie == OrderGainFixture98(first.after,2,capacityHarmAlias,rows,<<90,4,5>>,<<4,5>>) bad == OrderGainFixture98(first.after,2,capacityHarmAlias,rows,<<5,4,90>>,<<5,4>>) IN /\ OrderGainValidFixture98(first,objects,CardFacts9) /\ OrderGainValidFixture98(SchemaAtom187,objects,CardFacts9) /\ OrderGainValidFixture98(otherTie,objects,CardFacts9) /\ GrantCategory98(capacityHarmAlias,1)=5 /\ GrantCategory98(NeutralValue00012,1)=5 /\ SchemaAtom187.after.order[1]=90 /\ SchemaAtom187.after.applications[90].clock before,after |-> OrderChangedState98(before,rows,Empty9,present,spine,decision,"SelfStaticResize",lost,"Grant"), application |-> application,count |-> OrderCountFixture98(before,application,count,"NormalizedSelfStaticSubCount"),rows |-> rows,spine |-> spine,decision |-> decision] OrderResizeValidFixture98(s) == ResizeSelfStaticSubs98(s.before,s.after,s.application,s.count,s.rows,s.spine,s.decision) OrderPrintedResizeFixture98(before,id,count,rows,spine,gainOrder) == LET old == SelectSeq(before.order,LAMBDA sub : before.provenance[sub].kind="Printed") kept == SubSeq(old,1,IF count before,after |-> OrderChangedState98(before,rows,Empty9,present,spine,decision,"PrintedResize",lost,"Printed"), count |-> OrderCountFixture98(before,0,count,"NormalizedPrintedSubCount"),rows |-> rows,spine |-> spine,decision |-> decision] OrderPrintedResizeValidFixture98(s) == SetPrintedSubCount98(s.before,s.after,s.count,s.rows,s.spine,s.decision) OrderCopyFixture98(before,id,grant,copies) == LET gained == {copies[parent] : parent \in DOMAIN copies} rows == [sub \in gained |-> LET parent == CHOOSE p \in DOMAIN copies : copies[p]=sub IN [definition |-> CopiedBarrierInstructionDefinition98(before.definitions[parent],sub),textKey |-> before.provenance[parent].textKey, effect |-> grant.id,parent |-> parent,printedSlot |-> 0,template |-> 0]] spine == CopySubSpine98(before.spine,copies) decision == OrderDecisionFixture98(before,id,"TLDRCopy",spine,before.present \cup gained,gained,{},VisibleSubOrder98(spine,gained)) IN [before |-> before,after |-> OrderChangedState98(before,rows,[a \in {grant.id} |-> grant],before.present \cup gained,spine,decision,"TLDRCopy",{},"Copy"), grant |-> grant,copies |-> copies,spine |-> spine,decision |-> decision] OrderCopyValidFixture98(s,objects,facts) == CopyAllBarrierInstructions98(s.before,s.after,s.grant,s.copies,s.spine,s.decision,objects,facts) OrderSpecimen0020ProfileChecks98 == LET objects == [id \in 1..7 |-> CASE id=1 -> [CardObject9("Specimen0020","Play",TRUE,"Up") EXCEPT !.activated=TRUE] [] id \in 2..4 -> CardObject9(IF id=2 THEN "Specimen0221" ELSE IF id=3 THEN "Specimen0160" ELSE "Specimen0196","SideAHand",FALSE,"Down") [] OTHER -> CardObject9(IF id=5 THEN "Specimen0172" ELSE IF id=6 THEN "Specimen0099" ELSE "Specimen0256","Play",TRUE,"Up")] initial == NewBarrierInstructionOrder98(1,<<>>,Empty9,Empty9) grant == OrderGrantFixture98(10,"Specimen0020",1,1,"Static","Unspecified","Default",<>,TRUE,CardFacts9) first == OrderGainFixture98(initial,1,grant,OrderRowsFixture98(<<8,1,5>>,grant,[sub \in {8,1,5} |-> 1]),<<8,1,5>>,<<8,1,5>>) growRows == OrderRowsFixture98(<<3>>,grant,[sub \in {3} |-> 1]) aHandBefore == Cardinality({id \in DOMAIN objects : objects[id].zone="SideAHand"}) grow == OrderResizeFixture98(first.after,2,10,aHandBefore+1,growRows,<<8,1,5,3>>,<<3>>) shrink == OrderResizeFixture98(first.after,3,10,aHandBefore-2,Empty9,first.after.spine,<<>>) freshRows == OrderRowsFixture98(<<40,41>>,grant,[sub \in {40,41} |-> 1]) regain == OrderResizeFixture98(shrink.after,4,10,3,freshRows,<<8,1,5,40,41>>,<<40,41>>) reused == OrderResizeFixture98(shrink.after,4,10,3,OrderRowsFixture98(<<1,5>>,grant,[sub \in {1,5} |-> 1]),shrink.after.spine,<<1,5>>) allBarrierInstructionSuppressed == [OpenEncounter6(50,1,2,FALSE,"traversal",first.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE, !.barrierInstructionSuppressed={8,1,5},!.barrierInstructionSuppressedBy=[sub \in {8,1,5} |-> 999],!.fullyBarrierInstructionSuppressed=TRUE,!.fullyBy={999}] grownEncounter == [allBarrierInstructionSuppressed EXCEPT !.order=grow.after.order,!.usedSubIds=@ \cup {3},!.barrierInstructionSuppressedBy=[sub \in {8,1,5,3} |-> IF sub=3 THEN 0 ELSE 999]] firstBarrierInstructionSuppressed == [OpenEncounter6(51,1,2,FALSE,"traversal",first.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE, !.barrierInstructionSuppressed={8},!.barrierInstructionSuppressedBy=[sub \in {8,1,5} |-> IF sub=8 THEN 999 ELSE 0]] shrunkEncounter == WithFullySuppressInstruction6([firstBarrierInstructionSuppressed EXCEPT !.order=shrink.after.order]) IN /\ Cardinality({id \in DOMAIN objects : objects[id].zone="SideAHand"})=3 /\ OrderGainValidFixture98(first,objects,CardFacts9) /\ GrantCategory98(grant,1)=4 /\ OrderResizeValidFixture98(grow) /\ grow.after.order= <<8,1,5,3>> /\ grow.after.order[4]=3 /\ UpdateEncounterSubs6(allBarrierInstructionSuppressed,grownEncounter,grow.after.order,TRUE,{}) /\ grownEncounter.barrierInstructionSuppressed={8,1,5} /\ 3 \notin grownEncounter.barrierInstructionSuppressed /\ grownEncounter.barrierInstructionSuppressedBy[3]=0 /\ OrderResizeValidFixture98(shrink) /\ shrink.after.order= <<8>> /\ UpdateEncounterSubs6(firstBarrierInstructionSuppressed,shrunkEncounter,shrink.after.order,TRUE,NewFullySuppressInstructionEvents6(firstBarrierInstructionSuppressed,shrunkEncounter)) /\ 8 \in shrunkEncounter.barrierInstructionSuppressed /\ {1,5} \subseteq shrunkEncounter.usedSubIds /\ OrderResizeValidFixture98(regain) /\ regain.after.order= <<8,40,41>> /\ ~OrderResizeValidFixture98(reused) /\ CardFacts9["Specimen0172"].kind="Attachment" /\ CardFacts9["Specimen0099"].kind="Support" /\ CardFacts9["Specimen0256"].kind="Support" OrderSpecimen0108TLDRChecks98 == LET objects == [id \in {1,2} |-> [CardObject9(IF id=1 THEN "Specimen0108" ELSE "Specimen0247","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] printed == [sub \in 11..15 |-> OrderPrintedSubFixture98(sub,1,"EndTraversal")] keys == [sub \in 11..15 |-> "EndTraversal"] initial == NewBarrierInstructionOrder98(1,<<11,12,13,14,15>>,printed,keys) tldr == OrderGrantFixture98(20,"Specimen0247",2,1,"BarrierInstruction","After","TLDR",<<>>,TRUE,CardFacts9) copies == [sub \in 11..15 |-> sub+90] copied == OrderCopyFixture98(initial,1,tldr,copies) shrink == OrderPrintedResizeFixture98(copied.after,2,3,Empty9,copied.after.spine,<<>>) rows == [sub \in {201,202} |-> LET slot == sub-197 IN [definition |-> ReidentifyBarrierInstruction98(initial.printedText[slot].definition,sub),textKey |-> "EndTraversal",effect |-> 0,parent |-> 0,printedSlot |-> slot,template |-> 0]] regain == OrderPrintedResizeFixture98(shrink.after,3,5,rows,shrink.after.spine \o <<201,202>>,<<201,202>>) oldCopyGone == OrderLossFixture98(initial,4,{15},{}) wrongParents == [sub \in {11,12,13,15} |-> sub+100] badCopy == OrderCopyFixture98(oldCopyGone.after,5,tldr,wrongParents) IN /\ InitializeBarrierInstructionOrder98(initial,1,<<11,12,13,14,15>>,printed,keys,objects,CardFacts9,OrderPrintedReceiptFixture98(1,"Specimen0108",<<11,12,13,14,15>>,printed,keys,CardFacts9)) /\ OrderCopyValidFixture98(copied,objects,CardFacts9) /\ copied.after.order= <<11,101,12,102,13,103,14,104,15,105>> /\ \A parent \in initial.present : copied.after.provenance[copies[parent]].parent=parent /\ OrderPosition98(copied.after.order,copies[parent])=OrderPosition98(copied.after.order,parent)+1 /\ OrderPrintedResizeValidFixture98(shrink) /\ shrink.after.order= <<11,101,12,102,13,103,104,105>> /\ shrink.after.provenance[104].parent=14 /\ shrink.after.provenance[105].parent=15 /\ {14,15} \subseteq shrink.after.usedIds /\ {14,15} \cap shrink.after.present={} /\ OrderPreserves98(shrink.after.spine,copied.after.spine) /\ OrderPrintedResizeValidFixture98(regain) /\ regain.decision.authority="MixedHistoryExtension" /\ regain.after.order= <<11,101,12,102,13,103,104,105,201,202>> /\ RemoveOrderedBarrierInstructions98(oldCopyGone.before,oldCopyGone.after,oldCopyGone.receipt) /\ Cardinality(DOMAIN wrongParents)=Cardinality(oldCopyGone.after.present) /\ ~OrderCopyValidFixture98(badCopy,objects,CardFacts9) /\ \A points \in 0..5 : LET r == OrderPrintedResizeFixture98(initial,10+points,5-points,Empty9,initial.spine,<<>>) IN /\ OrderPrintedResizeValidFixture98(r) /\ r.after.order=SubSeq(initial.order,1,5-points) OrderLaterManualCopyChecks98 == LET objects == [id \in {1,2,3} |-> IF id=2 THEN [CardObject9("Specimen0228","Play",TRUE,"Up") EXCEPT !.form="Counter",!.kind="SchemaAtom043",!.host=1] ELSE [CardObject9(IF id=1 THEN "Specimen0130" ELSE "Specimen0247","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] printed == [sub \in {50} |-> OrderPrintedSubFixture98(sub,1,"RetireTechnique")] initial == NewBarrierInstructionOrder98(1,<<50>>,printed,[sub \in {50} |-> "RetireTechnique"]) boost == OrderGrantFixture98(10,"Specimen0228",2,1,"Static","After","Default",<>,TRUE,CardFacts9) boosted == OrderGainFixture98(initial,1,boost,OrderRowsFixture98(<<99>>,boost,[sub \in {99} |-> 1]),<<50,99>>,<<99>>) tldr == OrderGrantFixture98(20,"Specimen0247",3,1,"BarrierInstruction","After","TLDR",<<>>,TRUE,CardFacts9) copied == OrderCopyFixture98(boosted.after,2,tldr,[sub \in {50,99} |-> IF sub=50 THEN 150 ELSE 199]) subtypeClass080 == OrderGrantFixture98(30,"Specimen0130",1,1,"Conditional","Unspecified","SideAChoice",<>,TRUE,CardFacts9) manual == OrderGainFixture98(copied.after,3,subtypeClass080,OrderRowsFixture98(<<5>>,subtypeClass080,[sub \in {5} |-> 1]),<<50,5,150,99,199>>,<<5>>) loss == OrderLossFixture98(manual.after,4,{50},{}) secondTLDR == [tldr EXCEPT !.id=21,!.ability.syntax.id=3021,!.ability.activity.id=3021,!.origin.ability=3021] secondMap == [sub \in loss.after.present |-> CASE sub=5 -> 205 [] sub=150 -> 250 [] sub=99 -> 299 [] OTHER -> 399] SchemaAtom187 == OrderCopyFixture98(loss.after,5,secondTLDR,secondMap) IN /\ OrderGainValidFixture98(boosted,objects,CardFacts9) /\ OrderCopyValidFixture98(copied,objects,CardFacts9) /\ copied.after.order= <<50,150,99,199>> /\ OrderGainValidFixture98(manual,objects,CardFacts9) /\ manual.after.order= <<50,5,150,99,199>> /\ OrderPosition98(manual.after.order,150) # OrderPosition98(manual.after.order,50)+1 /\ RemoveOrderedBarrierInstructions98(loss.before,loss.after,loss.receipt) /\ loss.after.order= <<5,150,99,199>> /\ OrderCopyValidFixture98(SchemaAtom187,objects,CardFacts9) /\ SchemaAtom187.after.order= <<5,205,150,250,99,299,199,399>> /\ SchemaAtom187.after.provenance[250].parent=150 /\ SchemaAtom187.after.provenance[150].parent=50 OrderSelfBeforeSchemaChecks98 == LET name == "StructuralSelfBeforeBarrier98" facts == [card \in DOMAIN CardFacts9 \cup {name} |-> IF card=name THEN [kind |-> "Barrier",side |-> "SideA",sourceSHA |-> "SyntheticSelfBeforeSchemaOnly"] ELSE CardFacts9[card]] objects == [id \in {1,2,3} |-> CASE id=1 -> [CardObject9("Specimen0020","Play",TRUE,"Up") EXCEPT !.card=name,!.activated=TRUE] [] id=2 -> [CardObject9("Specimen0262","Play",TRUE,"Up") EXCEPT !.activated=TRUE] [] OTHER -> [CardObject9("Specimen0228","Play",TRUE,"Up") EXCEPT !.form="Counter",!.kind="SchemaAtom043",!.host=1]] printed == [sub \in {100} |-> OrderPrintedSubFixture98(sub,1,"EndTraversal")] initial == NewBarrierInstructionOrder98(1,<<100>>,printed,[sub \in {100} |-> "EndTraversal"]) externalBefore == OrderGrantFixture98(20,"Specimen0262",2,1,"Static","Before","Default",<>,TRUE,facts) first == OrderGainFixture98(initial,1,externalBefore,OrderRowsFixture98(<<80>>,externalBefore,[sub \in {80} |-> 1]),<<80,100>>,<<80>>) selfBefore == OrderGrantFixture98(21,name,1,1,"Static","Before","Default",<>,TRUE,facts) SchemaAtom187 == OrderGainFixture98(first.after,2,selfBefore,OrderRowsFixture98(<<70>>,selfBefore,[sub \in {70} |-> 1]),<<80,70,100>>,<<70>>) selfAfter == OrderGrantFixture98(22,name,1,1,"Static","Unspecified","Default",<>,TRUE,facts) third == OrderGainFixture98(SchemaAtom187.after,3,selfAfter,OrderRowsFixture98(<<60>>,selfAfter,[sub \in {60} |-> 1]),<<80,70,100,60>>,<<60>>) externalAfter == OrderGrantFixture98(23,"Specimen0228",3,1,"Static","After","Default",<>,TRUE,facts) fourth == OrderGainFixture98(third.after,4,externalAfter,OrderRowsFixture98(<<50>>,externalAfter,[sub \in {50} |-> 1]),<<80,70,100,60,50>>,<<50>>) grow == OrderResizeFixture98(fourth.after,5,21,2,OrderRowsFixture98(<<69>>,selfBefore,[sub \in {69} |-> 1]),<<80,70,69,100,60,50>>,<<69>>) shrink == OrderResizeFixture98(grow.after,6,21,1,Empty9,grow.after.spine,<<>>) IN /\ OrderGainValidFixture98(first,objects,facts) /\ OrderGainValidFixture98(SchemaAtom187,objects,facts) /\ OrderGainValidFixture98(third,objects,facts) /\ OrderGainValidFixture98(fourth,objects,facts) /\ [i \in 1..5 |-> SubOriginCategory98(fourth.after,fourth.after.order[i])]= <<1,2,3,4,5>> /\ OrderResizeValidFixture98(grow) /\ grow.after.order= <<80,70,69,100,60,50>> /\ OrderResizeValidFixture98(shrink) /\ shrink.after.order=fourth.after.order /\ 69 \in shrink.after.usedIds OrderMixedStaticCopyChecks98 == LET objects == [id \in {1,2} |-> [CardObject9(IF id=1 THEN "Specimen0020" ELSE "Specimen0247","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] initial == NewBarrierInstructionOrder98(1,<<>>,Empty9,Empty9) ash == OrderGrantFixture98(10,"Specimen0020",1,1,"Static","Unspecified","Default",<>,TRUE,CardFacts9) base == OrderGainFixture98(initial,1,ash,OrderRowsFixture98(<<8,1,5>>,ash,[sub \in {8,1,5} |-> 1]),<<8,1,5>>,<<8,1,5>>) tldr == OrderGrantFixture98(20,"Specimen0247",2,1,"BarrierInstruction","After","TLDR",<<>>,TRUE,CardFacts9) copied == OrderCopyFixture98(base.after,2,tldr,[sub \in {8,1,5} |-> sub+100]) rows == OrderRowsFixture98(<<3>>,ash,[sub \in {3} |-> 1]) IN /\ OrderGainValidFixture98(base,objects,CardFacts9) /\ OrderCopyValidFixture98(copied,objects,CardFacts9) /\ copied.after.order= <<8,108,1,101,5,105>> /\ \A spine \in {<<8,108,1,101,5,105,3>>,<<8,108,1,101,5,3,105>>} : LET f == OrderResizeFixture98(copied.after,3,10,4,rows,spine,<<3>>) badAuthority == [f.decision EXCEPT !.authority="DirectSourceClauses"] badHistory == [f.decision EXCEPT !.beforeHistory= <<>>] authorityAfter == OrderChangedState98(copied.after,rows,Empty9,f.after.present,spine,badAuthority,"SelfStaticResize",{},"Grant") historyAfter == OrderChangedState98(copied.after,rows,Empty9,f.after.present,spine,badHistory,"SelfStaticResize",{},"Grant") IN /\ OrderResizeValidFixture98(f) /\ f.decision.authority="MixedHistoryExtension" /\ OrderPreserves98(f.after.order,copied.after.order) /\ OrderBefore98(f.after.order,5,3) /\ ~ResizeSelfStaticSubs98(copied.after,authorityAfter,10,f.count,rows,spine,badAuthority) /\ ~ResizeSelfStaticSubs98(copied.after,historyAfter,10,f.count,rows,spine,badHistory) OrderOriginBindingChecks98 == LET objects == [id \in {1} |-> [CardObject9("Specimen0037","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] initial == NewBarrierInstructionOrder98(1,<<>>,Empty9,Empty9) NeutralValue00012 == OrderGrantFixture98(90,"NeutralValue00012",2,1,"BarrierInstruction","After","Default",<>,TRUE,CardFacts9) rows == OrderRowsFixture98(<<90>>,NeutralValue00012,[sub \in {90} |-> 1]) good == OrderGainFixture98(initial,1,NeutralValue00012,rows,<<90>>,<<90>>) wrongSource == [NeutralValue00012 EXCEPT !.origin.source=ObjectAbilitySource9(3)] wrongSHA == [NeutralValue00012 EXCEPT !.sourceSHA="ForeignRecord",!.origin.sourceSHA="ForeignRecord"] badSource == OrderGainFixture98(initial,1,wrongSource,rows,<<90>>,<<90>>) badSHA == OrderGainFixture98(initial,1,wrongSHA,rows,<<90>>,<<90>>) IN /\ NeutralValue00012.origin.kind="MaintainedEffect" /\ 2 \notin DOMAIN objects /\ OrderGainValidFixture98(good,objects,CardFacts9) /\ ~OrderGainValidFixture98(badSource,objects,CardFacts9) /\ ~OrderGainValidFixture98(badSHA,objects,CardFacts9) SubOwnerFixture98 == [windowId |-> 0,option |-> NoPriorityOption9,transaction |-> 0] SubControlFixture98(e) == [traversal |-> IF e.traversalId=0 THEN NoTraversal6 ELSE TraversalFixture92("ProcedureCodef1914978bb8e"),encounter |-> e.id, phaseEndedIds |-> {},redirect |-> NoTraversalRedirect6,phaseStepsSkipped |-> FALSE,redirectCheckpointDue |-> FALSE,redirectStage |-> "NoValue",paidOpen |-> FALSE, siteInspections |-> Empty9,itemInspections |-> Empty9,abortedEncounters |-> {},abortedInspectiones |-> {},abortedItemInspectiones |-> {},windowCleanupDue |-> FALSE,onlyWindowCleanup |-> FALSE] SubActivityFixture98(e,objects,definitions) == [tag |-> "CurrentBarrierInstructionActivity",objects |-> objects,present |-> DOMAIN definitions, ordinary |-> [id \in DOMAIN definitions |-> IF definitions[id].syntax.source.object \in DOMAIN objects THEN ConditionalCardActivityFixture96(objects[definitions[id].syntax.source.object]) ELSE FALSE], context |-> [ActivityContext9 EXCEPT !.encounteredObject=e.barrierCard,!.encounterLive=TRUE]] SubDeclarationFixture98(e,order,exampleFamily062) == [tag |-> "EncounterBarrierInstructionResolutionOrder",encounter |-> e.id,barrierCard |-> e.barrierCard,step |-> "ProcedureCodef1914978bb8e",physicalOrder |-> e.order, barrierInstructionSuppressed |-> e.barrierInstructionSuppressed,order |-> order,exampleFamily062 |-> exampleFamily062,controller |-> "SideB",source |-> ObjectAbilitySource9(3)] SubCurrentOrderFixture98(loop,e,order) == [tag |-> "CurrentBarrierInstructionResolutionOrder",encounter |-> e.id,barrierCard |-> e.barrierCard,physicalOrder |-> e.order,barrierInstructionSuppressed |-> e.barrierInstructionSuppressed, handled |-> loop.handled,initialOrder |-> loop.initialOrder,exampleFamily062 |-> loop.exampleFamily062,order |-> order] SubStartFixture98(card,keys,exampleFamily062Order) == LET order == [i \in 1..Len(keys) |-> 100+i] definitions == [id \in SubIds6(order) |-> OrderPrintedSubFixture98(id,2,keys[id-100])] textKeys == [id \in SubIds6(order) |-> keys[id-100]] state == NewBarrierInstructionOrder98(2,order,definitions,textKeys) objects == [id \in {2,3} |-> CardObject9(IF id=2 THEN card ELSE "Specimen0226","Play",TRUE,"Up")] e == [OpenEncounter6(20,2,2,FALSE,"traversal",order) EXCEPT !.stage="BarrierInstructions",!.paidReached=TRUE] control == SubControlFixture98(e) exampleFamily062Syntax == [SyntaxFixture93(650,"Static","SideB","Support",BaseUnits93("Static")) EXCEPT !.source=ObjectAbilitySource9(3)] exampleFamily062 == [syntax |-> exampleFamily062Syntax,activity |-> AbilityDefinition9(650,"Static",exampleFamily062Syntax.source,"Printed"),instructions |-> <<>>,sourceSHA |-> CardFacts9["Specimen0226"].sourceSHA] sources == IF exampleFamily062Order= <<>> THEN Empty9 ELSE [id \in {650} |-> exampleFamily062] allDefs == [id \in DOMAIN definitions \cup DOMAIN sources |-> IF id \in DOMAIN sources THEN sources[id] ELSE definitions[id]] activity == SubActivityFixture98(e,objects,allDefs) declared == IF exampleFamily062Order= <<>> THEN order ELSE exampleFamily062Order declaration == SubDeclarationFixture98(e,declared,IF exampleFamily062Order= <<>> THEN 0 ELSE 650) loop == NewBarrierInstructionLoop98(e,SubOwnerFixture98,declared,declaration.exampleFamily062) actualOrder == SubCurrentOrderFixture98(loop,e,declared) p == NewBarrierInstructionBarrierInstruction98(8000,declared[1],definitions[declared[1]],e,SubOwnerFixture98,"Play") selected == [loop EXCEPT !.current=p.id,!.usedInstances={p.id}] IN [state |-> state,objects |-> objects,e |-> e,control |-> control,sources |-> sources,definitions |-> allDefs,activity |-> activity, declaration |-> declaration,loop |-> loop,actualOrder |-> actualOrder,p |-> p,selected |-> selected] SubStartValid98(s) == /\ EnterBarrierInstructionLoop98(Empty9,[id \in {20} |-> s.loop],s.e,s.control,"ProcedureCodef1914978bb8e",s.state,s.sources,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],SubOwnerFixture98,<<>>,s.declaration,CardFacts9) /\ SelectNextBarrierInstruction98(s.loop,s.selected,s.p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,s.actualOrder,8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) SubClearanceFixture98(p,window,opening) == [tag |-> "BarrierInstructionInterruptReturn",barrierInstruction |-> BarrierInstructionWindowRef98(p),windowId |-> window,openingRevision |-> opening,complete |-> TRUE] SubNoModifiersFixture98(p) == [tag |-> "NoBarrierInstructionInterruptModifiers",barrierInstruction |-> BarrierInstructionWindowRef98(p),conditionalInstances |-> {},paidInterruptAbilities |-> {}] SubCPReceiptFixture98(p,id) == [tag |-> "BarrierInstructionInstructionCheckpoint",id |-> id,caller |-> BarrierInstructionInstructionCaller98(p),complete |-> TRUE,allNewerChainsComplete |-> TRUE] SubSingleFixture98(s,p,loop,step,ledger,checkpoint) == LET cleared == [p EXCEPT !.phase="FirstTargets"] plan == OpenInstruction93(p.payload.instructions[1],"Ability",p.id,p.ability.source,p.ability.sourceZone,1,"NoValue",<>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] imminent == [cleared EXCEPT !.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE,!.phase="Imminent"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] resolving == [imminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] completePlan == [resolvingPlan EXCEPT !.cursor=2,!.completedSteps= <>,!.phase="Complete"] finished == [resolving EXCEPT !.ability.phase="Complete",!.ability.complete=TRUE,!.ability.lastFinished=TRUE,!.phase="InstructionCheckpoint"] cp == PlayEmptyCheckpointFixture97(ledger,checkpoint,Empty9,s.objects,TRUE,0,BarrierInstructionInstructionCaller98(finished)) afterLedger == ConditionalCommittedFixture96(ledger,Empty9,cp,Empty9,Empty9,Empty9) afterCP == [finished EXCEPT !.checkpoint=checkpoint,!.phase="AbilityComplete"] returned == [afterCP EXCEPT !.ability.returned=TRUE,!.phase="Returned"] afterEncounter == [s.e EXCEPT !.resolved=@ \cup {p.barrierInstruction}] afterLoop == [loop EXCEPT !.current=0,!.handled=@ \cup {p.barrierInstruction},!.resolved=@ \cup {p.barrierInstruction}, !.history=Append(@,[barrierInstruction |-> p.barrierInstruction,instance |-> p.id,disposition |-> "Resolved",source |-> p.ability.source])] IN [start |-> s,p |-> p,loop |-> loop,step |-> step,ledger |-> ledger,cleared |-> cleared,plan |-> plan,imminentPlan |-> imminentPlan, imminent |-> imminent,resolvingPlan |-> resolvingPlan,resolving |-> resolving,completePlan |-> completePlan,finished |-> finished, cp |-> cp,afterLedger |-> afterLedger,afterCP |-> afterCP,returned |-> returned,afterEncounter |-> afterEncounter,afterLoop |-> afterLoop] SubSingleValid98(f) == /\ NoBarrierInstructionInterrupt98(f.p,f.cleared,<<>>,SubNoModifiersFixture98(f.p),SubClearanceFixture98(f.p,0,f.p.revision)) /\ EnterFirstBarrierInstructionInstruction98(f.cleared,f.imminent,f.start.e,f.start.control,f.start.state,f.start.objects,DOMAIN f.start.definitions,f.start.activity,[player \in SetupPlayers |-> 0],<<>>,f.plan,f.imminentPlan,[InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}],InstructionEntryFixture93(f.plan)) /\ ResolveBarrierInstructionWithoutInterrupt98(f.imminent,f.resolving,<<>>,f.imminentPlan,f.resolvingPlan,NoModifiersFixture95(f.imminentPlan),InstructionClearanceFixture93(f.imminentPlan,0,0)) /\ CarryBarrierInstructionInstruction98(f.resolving,f.finished,<<>>,f.resolvingPlan,f.completePlan,[tag |-> "InstructionStepReturn",instruction |-> f.plan.id,index |-> 1,step |-> f.step,complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(f.ledger,f.afterLedger,<<>>,<<>>,Empty9,f.cp,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ BarrierInstructionInstructionCheckpoint98(f.finished,f.afterCP,<<>>,f.afterLedger,SubCPReceiptFixture98(f.finished,f.cp.id)) /\ FinishBarrierInstruction98(f.loop,f.afterLoop,f.afterCP,f.returned,f.start.e,f.afterEncounter,<<>>) SubSeedFixture98(objects) == NewConditionalLedger96(ConditionalSnapshotFixture96(1,0,"Initial",Empty9,objects)) BarrierInstructionNormalChecks98 == LET s == SubStartFixture98("Specimen0132",<<"EndTraversal","EndTraversal","SideBGain5">>,<<>>) f == SubSingleFixture98(s,s.p,s.selected,"EndTheTraversal",SubSeedFixture98(s.objects),1) ended == EndTraversalOutcome6(s.control,21) nextOrder == SubCurrentOrderFixture98(f.afterLoop,f.afterEncounter,<<102,103>>) nextP == NewBarrierInstructionBarrierInstruction98(8001,102,s.state.definitions[102],f.afterEncounter,SubOwnerFixture98,"Play") nextLoop == [f.afterLoop EXCEPT !.current=8001,!.usedInstances=@ \cup {8001}] secondP == NewBarrierInstructionBarrierInstruction98(8001,101,s.state.definitions[101],s.e,SubOwnerFixture98,"Play") advance == [tag |-> "BarrierInstructionLoopStepReturn",encounter |-> 20,history |-> f.afterLoop.history,complete |-> TRUE,normalCheckpointAndReactionsDrained |-> TRUE,attempt |-> 8000] IN /\ SubStartValid98(s) /\ SubSingleValid98(f) /\ EndTheTraversal6(s.control,ended,21,TRUE,EndTraversalEffectEvents6(s.control)) /\ 20 \in ended.phaseEndedIds /\ ended.encounter=0 /\ ~SelectNextBarrierInstruction98(f.afterLoop,nextLoop,nextP,f.afterEncounter,ended,"ProcedureCodef1914978bb8e",s.state,nextOrder,8001,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ f.afterEncounter.resolved={101} /\ ResolvedBarrierInstructionCount98(f.afterLoop,Empty9,2,20)=1 /\ AdvanceBarrierInstructionStep98(f.afterLoop,s.control,[s.control EXCEPT !.traversal.step="ProcedureCodeaa0828fbf852"],f.afterEncounter,"ProcedureCodef1914978bb8e","ProcedureCodeaa0828fbf852",advance) /\ ~AdvanceBarrierInstructionStep98(f.afterLoop,s.control,[s.control EXCEPT !.traversal.step="ProcedureCode687f72772ab1"],f.afterEncounter,"ProcedureCodef1914978bb8e","ProcedureCode687f72772ab1",[advance EXCEPT !.attempt=0]) /\ ~FinishBarrierInstruction98(s.selected,f.afterLoop,f.finished,[f.finished EXCEPT !.ability.returned=TRUE,!.phase="Returned"],s.e,f.afterEncounter,<<>>) /\ ~AbilityIsResolving9(f.finished.ability) /\ ~f.finished.ability.returned /\ s.p.phase="BarrierInstructionImminent" /\ ~s.p.ability.firstImminent /\ ~s.p.ability.detached /\ f.imminent.ability.detached /\ AbilityIsResolving9(f.imminent.ability) /\ ~SelectNextBarrierInstruction98(s.selected,[s.selected EXCEPT !.current=8001,!.usedInstances=@ \cup {8001}],secondP,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,s.actualOrder,8001,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ~EnterFirstBarrierInstructionInstruction98(s.p,f.imminent,s.e,s.control,s.state,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>,f.plan,f.imminentPlan,[InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}],InstructionEntryFixture93(f.plan)) /\ ~NoBarrierInstructionInterrupt98(s.p,f.cleared,<<>>,[SubNoModifiersFixture98(s.p) EXCEPT !.paidInterruptAbilities={9}],SubClearanceFixture98(s.p,0,0)) /\ ~BarrierInstructionInstructionCheckpoint98(f.finished,f.afterCP,<<>>,f.ledger,SubCPReceiptFixture98(f.finished,1)) /\ ~BarrierInstructionInstructionCheckpoint98(f.finished,f.afterCP,<<>>,f.afterLedger,[SubCPReceiptFixture98(f.finished,1) EXCEPT !.allNewerChainsComplete=FALSE]) /\ ~BarrierInstructionInstructionCheckpoint98(f.finished,f.afterCP,<<>>,[f.afterLedger EXCEPT !.checkpoints[1].caller=[BarrierInstructionInstructionCaller98(f.finished) EXCEPT !.encounter=21]],SubCPReceiptFixture98(f.finished,1)) BarrierInstructionExampleFamily062Checks98 == LET s == SubStartFixture98("Specimen0132",<<"EndTraversal","EndTraversal","SideBGain5">>,<<103,101,102>>) f == SubSingleFixture98(s,s.p,s.selected,"SideBGain5ResourceUnits",SubSeedFixture98(s.objects),1) bad == SubCurrentOrderFixture98(s.loop,s.e,<<101,102,103>>) nextOrder == SubCurrentOrderFixture98(f.afterLoop,f.afterEncounter,<<101,102>>) p2 == NewBarrierInstructionBarrierInstruction98(8001,101,s.state.definitions[101],f.afterEncounter,SubOwnerFixture98,"Play") nextLoop == [f.afterLoop EXCEPT !.current=8001,!.usedInstances=@ \cup {8001}] barrierInstructionSuppressed == [s.e EXCEPT !.barrierInstructionSuppressed={102}] badDecl == SubDeclarationFixture98(barrierInstructionSuppressed,<<103,101,102>>,650) IN /\ SubStartValid98(s) /\ SubSingleValid98(f) /\ s.e.order= <<101,102,103>> /\ s.loop.initialOrder= <<103,101,102>> /\ ~ResolveEncounterSub6(s.e,f.afterEncounter,103,TRUE) /\ f.afterEncounter.resolved={103} /\ f.afterEncounter.order=s.e.order /\ ~ResolutionOrderBound98(s.loop,s.e,bad) /\ SelectNextBarrierInstruction98(f.afterLoop,nextLoop,p2,f.afterEncounter,s.control,"ProcedureCodef1914978bb8e",s.state,nextOrder,8001,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ~EnterBarrierInstructionLoop98([id \in {20} |-> s.loop],[id \in {20} |-> s.loop],s.e,s.control,"ProcedureCodef1914978bb8e",s.state,s.sources,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],SubOwnerFixture98,<<>>,s.declaration,CardFacts9) /\ ~EnterBarrierInstructionLoop98(Empty9,[id \in {20} |-> NewBarrierInstructionLoop98(barrierInstructionSuppressed,SubOwnerFixture98,badDecl.order,650)],barrierInstructionSuppressed,s.control,"ProcedureCodef1914978bb8e",s.state,s.sources,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],SubOwnerFixture98,<<>>,badDecl,CardFacts9) /\ ~SelectNextBarrierInstruction98(s.loop,s.selected,s.p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,bad,8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ \A order \in {<<101,103,102>>,<<102,101,103>>,<<103,102,101>>} : ResolutionOrderBound98([s.loop EXCEPT !.initialOrder=order],s.e,SubCurrentOrderFixture98([s.loop EXCEPT !.initialOrder=order],s.e,order)) BarrierInstructionProfileChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) f == SubSingleFixture98(s,s.p,s.selected,"Damage1",SubSeedFixture98(s.objects),1) targets == [InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}] ended == [s.control EXCEPT !.phaseEndedIds={20}] target == [phase |-> "Movement",phaseId |-> 22,position |-> "outer",attacked |-> "SchemaAtom082"] redirected == [s.control EXCEPT !.redirect=target,!.phaseStepsSkipped=TRUE,!.traversal.usedPhaseIds=@ \cup {22},!.phaseEndedIds={20},!.redirectStage="Checkpoint",!.redirectCheckpointDue=TRUE] child == WindowFixture92(990,"Reaction",TraversalSiteFixture92("ProcedureCodef1914978bb8e"),[id \in {1} |-> ConditionalInstance9(1,5,ObjectAbilitySource9(3),"SideB",FALSE,1,990,FALSE)],1,NoTimingRef9) gone == [id \in {3} |-> s.objects[id]] goneActivity == [s.activity EXCEPT !.objects=gone] IN /\ SubStartValid98(s) /\ SubSingleValid98(f) /\ RequestTraversalRedirect6(s.control,redirected,target,TRUE,{TraversalPhaseEndEvent6(s.control.traversal)}) /\ redirected.encounter=20 /\ 20 \in redirected.phaseEndedIds /\ ~EnterFirstBarrierInstructionInstruction98(f.cleared,f.imminent,s.e,redirected,s.state,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>,f.plan,f.imminentPlan,targets,InstructionEntryFixture93(f.plan)) /\ ~EnterFirstBarrierInstructionInstruction98(f.cleared,f.imminent,s.e,s.control,s.state,gone,DOMAIN s.definitions,goneActivity,[player \in SetupPlayers |-> 0],<<>>,f.plan,f.imminentPlan,targets,InstructionEntryFixture93(f.plan)) /\ ~EnterFirstBarrierInstructionInstruction98(f.cleared,f.imminent,s.e,s.control,s.state,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<>,f.plan,f.imminentPlan,targets,InstructionEntryFixture93(f.plan)) /\ \A bad \in {[targets EXCEPT !.valid=FALSE],[targets EXCEPT !.source=ObjectAbilitySource9(3)], [targets EXCEPT !.index=2],[targets EXCEPT !.instruction=2004],[targets EXCEPT !.abilityInstance=8001]} : ~EnterFirstBarrierInstructionInstruction98(f.cleared,f.imminent,s.e,s.control,s.state,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>,f.plan,f.imminentPlan,bad,InstructionEntryFixture93(f.plan)) /\ ~SelectNextBarrierInstruction98(s.loop,s.selected,s.p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,s.actualOrder,8000,{8000},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ~SelectNextBarrierInstruction98(s.loop,s.selected,s.p,s.e,[s.control EXCEPT !.encounter=21],"ProcedureCodef1914978bb8e",s.state,s.actualOrder,8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ~SelectNextBarrierInstruction98(s.loop,s.selected,s.p,s.e,ended,"ProcedureCodef1914978bb8e",s.state,s.actualOrder,8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ CarryBarrierInstructionInstruction98(f.resolving,f.finished,<<>>,f.resolvingPlan,f.completePlan,[tag |-> "InstructionStepReturn",instruction |-> f.plan.id,index |-> 1,step |-> f.step,complete |-> TRUE]) /\ f.finished.ability.source=ObjectAbilitySource9(2) BarrierInstructionForcedChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) outside == [s.e EXCEPT !.id=21,!.traversalId=0,!.forced=TRUE] outsideControl == SubControlFixture98(outside) loop == NewBarrierInstructionLoop98(outside,SubOwnerFixture98,<<101,102>>,0) p == NewBarrierInstructionBarrierInstruction98(8100,101,s.state.definitions[101],outside,SubOwnerFixture98,"Play") selected == [loop EXCEPT !.current=8100,!.usedInstances={8100}] liveChild == [outside EXCEPT !.traversalId=2] childControl == [outsideControl EXCEPT !.traversal=s.control.traversal,!.phaseEndedIds={20}] activity == SubActivityFixture98(outside,s.objects,s.definitions) IN /\ SelectNextBarrierInstruction98(loop,selected,p,outside,outsideControl,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,outside,<<101,102>>),8100,{},s.objects,DOMAIN s.definitions,activity,[player \in SetupPlayers |-> 0],<<>>) /\ SelectNextBarrierInstruction98(loop,selected,p,liveChild,childControl,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,liveChild,<<101,102>>),8100,{},s.objects,DOMAIN s.definitions,activity,[player \in SetupPlayers |-> 0],<<>>) /\ ~SelectNextBarrierInstruction98(loop,selected,p,outside,[outsideControl EXCEPT !.phaseEndedIds={21}],"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,outside,<<101,102>>),8100,{},s.objects,DOMAIN s.definitions,activity,[player \in SetupPlayers |-> 0],<<>>) SubWindowFixture98(p,id) == LET site == PrioritySite9("SchemaAtom138","ProcedureCodef1914978bb8e","Encounter",p.structure,"SideB",1,2,0,0,0,FALSE,TRUE,TRUE) opening == [OpeningFixture92(id,"Interrupt",site,Empty9,90,NoTimingRef9) EXCEPT !.instruction=BarrierInstructionWindowRef98(p)] window == NewPriorityWindow9(id,"Interrupt",site,Empty9,90,NoTimingRef9,BarrierInstructionWindowRef98(p),1) IN [site |-> site,opening |-> opening,window |-> window] BarrierInstructionPreventionChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) w == SubWindowFixture98(s.p,900) ready == ReadyFixture92(w.window) option == SyntheticOption92(1,"PaidInterrupt","SideB") busy == StartedFixture92(ready,option) parent == [OpenAbilityResolution9(8200,"Paid",option.source,"Play",<<750>>,900) EXCEPT !.phase="Resolving",!.detached=TRUE,!.firstImminent=TRUE] plan == [OpenInstruction93(750,"Ability",8200,option.source,"Play",1,"NoValue",<<"PreventBarrierInstruction">>,FALSE) EXCEPT !.phase="Resolving"] prevention == [tag |-> "BarrierInstructionPrevention",barrierInstruction |-> BarrierInstructionWindowRef98(s.p),instruction |-> InstructionWindowRef93(plan),authorized |-> TRUE] prevented == [s.p EXCEPT !.prevented=TRUE,!.revision=1] returned == CompletePriorityOptionFrame9(busy) ready2 == ReadyFixture92(returned) pass1 == PassPriorityFrame9(ready2) ready3 == ReadyFixture92(pass1) closed == PassPriorityFrame9(ready3) cleared == [prevented EXCEPT !.phase="FirstTargets"] handled == [s.selected EXCEPT !.current=0,!.handled={101},!.prevented={101},!.history= <<[barrierInstruction |-> 101,instance |-> 8000,disposition |-> "Prevented",source |-> ObjectAbilitySource9(2)]>>] nextOrder == SubCurrentOrderFixture98(handled,s.e,<<102>>) nextP == NewBarrierInstructionBarrierInstruction98(8001,102,s.state.definitions[102],s.e,SubOwnerFixture98,"Play") nextLoop == [handled EXCEPT !.current=8001,!.usedInstances=@ \cup {8001}] effect == [EffectFixture92(ready,{}, {100}) EXCEPT !.revision=1] revisedEffect == [effect EXCEPT !.revision=2] otherBarrierInstructionSuppressed == [s.e EXCEPT !.barrierInstructionSuppressed={102},!.barrierInstructionSuppressedBy[102]=10] oneLoop == NewBarrierInstructionLoop98(otherBarrierInstructionSuppressed,SubOwnerFixture98,<<101>>,0) oneSelected == [oneLoop EXCEPT !.current=8000,!.usedInstances={8000}] oneHandled == [oneSelected EXCEPT !.current=0,!.handled={101},!.prevented={101},!.history=handled.history] phaseEndControl == [s.control EXCEPT !.traversal.step="ProcedureCode687f72772ab1"] oneComplete == [otherBarrierInstructionSuppressed EXCEPT !.stage="Complete"] completeReceipt == [tag |-> "EncounterBarrierInstructionsReturn",encounter |-> 20,handled |-> {101},complete |-> TRUE,allNewerChainsComplete |-> TRUE] IN /\ SubStartValid98(s) /\ OpenBarrierInstructionInterrupt98(s.p,<<>>,<>,900,w.site,Empty9,w.opening,{}) /\ ~OpenInstructionInterrupt93(<<>>,<>,900,w.site,Empty9,w.opening,{},s.p,s.p.ability,"NoValue") /\ CheckpointPriority9(<>,<>,CheckpointFixture92(w.window)) /\ BeginPriorityOption9(<>,<>,option,s.objects,LegalityFixture92(ready,option),effect) /\ PreventImminentBarrierInstruction98(s.p,prevented,<>,plan,parent,prevention) /\ ~PreventImminentBarrierInstruction98(s.p,prevented,<>,plan,parent,prevention) /\ CompletePriorityOption9(<>,<>,ReturnFixture92(busy)) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(returned)) /\ PassPriority9(<>,<>,"SideB",revisedEffect) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(pass1)) /\ PassPriority9(<>,<>,"SideA",revisedEffect) /\ ReturnBarrierInstructionInterrupt98(prevented,cleared,<>,<<>>,SubClearanceFixture98(prevented,900,0)) /\ ~ReturnBarrierInstructionInterrupt98(prevented,cleared,<>,<<>>,[SubClearanceFixture98(prevented,900,0) EXCEPT !.openingRevision=1]) /\ HandlePreventedBarrierInstruction98(s.selected,handled,cleared,s.e,s.e,<<>>) /\ handled.resolved={} /\ s.e.resolved={} /\ ResolvedBarrierInstructionCount98(handled,Empty9,2,20)=0 /\ EnterBarrierInstructionLoop98(Empty9,[id \in {20} |-> oneLoop],otherBarrierInstructionSuppressed,s.control,"ProcedureCodef1914978bb8e",s.state,s.sources,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],SubOwnerFixture98,<<>>,SubDeclarationFixture98(otherBarrierInstructionSuppressed,<<101>>,0),CardFacts9) /\ SelectNextBarrierInstruction98(oneLoop,oneSelected,s.p,otherBarrierInstructionSuppressed,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(oneLoop,otherBarrierInstructionSuppressed,<<101>>),8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ HandlePreventedBarrierInstruction98(oneSelected,oneHandled,cleared,otherBarrierInstructionSuppressed,otherBarrierInstructionSuppressed,<<>>) /\ RemainingBarrierInstructions98(oneHandled,otherBarrierInstructionSuppressed)={} /\ NextEncounterSub6(otherBarrierInstructionSuppressed)=101 /\ ~CompleteEncounter6(otherBarrierInstructionSuppressed,oneComplete,TRUE) /\ CompleteBarrierInstructionEncounter98(oneHandled,otherBarrierInstructionSuppressed,oneComplete,phaseEndControl,"ProcedureCode687f72772ab1",<<>>,completeReceipt) /\ oneComplete.resolved={} /\ ResolvedBarrierInstructionCount98(oneHandled,Empty9,2,20)=0 /\ SelectNextBarrierInstruction98(handled,nextLoop,nextP,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,nextOrder,8001,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ~ReturnBarrierInstructionInterrupt98(prevented,cleared,<>,<<>>,[SubClearanceFixture98(prevented,900,0) EXCEPT !.barrierInstruction=[BarrierInstructionWindowRef98(prevented) EXCEPT !.origin="Ability"]]) /\ ~ReturnBarrierInstructionInterrupt98(prevented,cleared,<>,<<>>,SubClearanceFixture98(prevented,900,0)) /\ ~OpenBarrierInstructionInterrupt98([s.p EXCEPT !.phase="FirstTargets"],<<>>,<>,900,w.site,Empty9,w.opening,{}) ExampleFamily006ReplacementFixture98(p) == [tag |-> "ExampleFamily006BarrierInstructionReplacement",barrierInstruction |-> BarrierInstructionWindowRef98(p),source |-> ObjectAbilitySource9(4), card |-> "Specimen0252",sourceSHA |-> CardFacts9["Specimen0252"].sourceSHA,applies |-> TRUE, payload |-> [kind |-> "BarrierInstructionTemplate",instructions |-> <<2100>>]] ExampleFamily006ReplacedFixture98(p) == [p EXCEPT !.payload.instructions= <<2100>>,!.ability.instructions= <<2100>>,!.revision=@+1, !.replacements=Append(@,[source |-> ObjectAbilitySource9(4),original |-> p.barrierInstruction,encounter |-> p.encounter,revision |-> p.revision])] BarrierInstructionExampleFamily006Checks98 == LET s == SubStartFixture98("Specimen0034",<<"Core1","RetireTechnique","RetireTechnique">>,<<>>) p1 == ExampleFamily006ReplacedFixture98(s.p) f1 == SubSingleFixture98(s,p1,s.selected,"NetDamage1FromSpecimen0034",SubSeedFixture98(s.objects),1) p2 == NewBarrierInstructionBarrierInstruction98(8001,102,s.state.definitions[102],f1.afterEncounter,SubOwnerFixture98,"Play") l2 == [f1.afterLoop EXCEPT !.current=8001,!.usedInstances=@ \cup {8001}] s2 == [s EXCEPT !.e=f1.afterEncounter] f2 == SubSingleFixture98(s2,ExampleFamily006ReplacedFixture98(p2),l2,"NetDamage1FromSpecimen0034",f1.afterLedger,2) p3 == NewBarrierInstructionBarrierInstruction98(8002,103,s.state.definitions[103],f2.afterEncounter,SubOwnerFixture98,"Play") l3 == [f2.afterLoop EXCEPT !.current=8002,!.usedInstances=@ \cup {8002}] s3 == [s EXCEPT !.e=f2.afterEncounter] f3 == SubSingleFixture98(s3,ExampleFamily006ReplacedFixture98(p3),l3,"NetDamage1FromSpecimen0034",f2.afterLedger,3) stepReturn == [tag |-> "BarrierInstructionLoopStepReturn",encounter |-> 20,history |-> f3.afterLoop.history,complete |-> TRUE,normalCheckpointAndReactionsDrained |-> TRUE,attempt |-> 0] phaseEnd == [s.control EXCEPT !.traversal.step="ProcedureCode687f72772ab1"] completeEncounter == [f3.afterEncounter EXCEPT !.stage="Complete"] ended == [phaseEnd EXCEPT !.phaseEndedIds={20}] completion == [tag |-> "EncounterBarrierInstructionsReturn",encounter |-> 20,handled |-> {101,102,103},complete |-> TRUE,allNewerChainsComplete |-> TRUE] IN /\ SubStartValid98(s) /\ ReplaceBarrierInstructionPayload98(s.p,p1,4,ExampleFamily006ReplacementFixture98(s.p),CardFacts9) /\ SubSingleValid98(f1) /\ SelectNextBarrierInstruction98(f1.afterLoop,l2,p2,f1.afterEncounter,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(f1.afterLoop,f1.afterEncounter,<<102,103>>),8001,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ReplaceBarrierInstructionPayload98(p2,f2.p,4,ExampleFamily006ReplacementFixture98(p2),CardFacts9) /\ SubSingleValid98(f2) /\ SelectNextBarrierInstruction98(f2.afterLoop,l3,p3,f2.afterEncounter,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(f2.afterLoop,f2.afterEncounter,<<103>>),8002,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) /\ ReplaceBarrierInstructionPayload98(p3,f3.p,4,ExampleFamily006ReplacementFixture98(p3),CardFacts9) /\ SubSingleValid98(f3) /\ f3.afterEncounter.resolved={101,102,103} /\ ResolvedBarrierInstructionCount98(f3.afterLoop,Empty9,2,20)=3 /\ ResolvedBarrierInstructionCount98(f3.afterLoop,Empty9,4,20)=0 /\ CardFacts9["Specimen0179"].kind="Technique" /\ CardFacts9["Specimen0034"].kind="Barrier" /\ AdvanceBarrierInstructionStep98(f3.afterLoop,s.control,phaseEnd,f3.afterEncounter,"ProcedureCodef1914978bb8e","ProcedureCode687f72772ab1",stepReturn) /\ CompleteBarrierInstructionEncounter98(f3.afterLoop,f3.afterEncounter,completeEncounter,phaseEnd,"ProcedureCode687f72772ab1",<<>>,completion) /\ BeginNormalTraversalPhaseEnd6(phaseEnd,ended,LayoutFixture92,{2},completeEncounter,Empty9,Empty9,TRUE,{TraversalPhaseEndEvent6(phaseEnd.traversal)}) /\ ~CompleteBarrierInstructionEncounter98(f2.afterLoop,f2.afterEncounter,[f2.afterEncounter EXCEPT !.stage="Complete"],phaseEnd,"ProcedureCode687f72772ab1",<<>>,[completion EXCEPT !.handled=f2.afterLoop.handled]) /\ ~ReplaceBarrierInstructionPayload98(s.p,p1,4,[ExampleFamily006ReplacementFixture98(s.p) EXCEPT !.source=ObjectAbilitySource9(5)],CardFacts9) /\ ~ReplaceBarrierInstructionPayload98(s.p,p1,4,[ExampleFamily006ReplacementFixture98(s.p) EXCEPT !.barrierInstruction=[BarrierInstructionWindowRef98(s.p) EXCEPT !.barrierInstruction=102]],CardFacts9) /\ ~ReplaceBarrierInstructionPayload98(s.p,p1,4,[ExampleFamily006ReplacementFixture98(s.p) EXCEPT !.sourceSHA="foreign"],CardFacts9) /\ ~BarrierInstructionBarrierInstructionBound98([p1 EXCEPT !.payload.syntax.source=ObjectAbilitySource9(4)]) SubGenericFixture98 == LET b == SubStartFixture98("Specimen0245",<<"Damage1">>,<<>>) definition == [b.state.definitions[101] EXCEPT !.instructions= <<2200,2201>>] definitions == [id \in {101} |-> definition] state == [b.state EXCEPT !.definitions=definitions,!.printedText[1].definition=definition] objects == [b.objects EXCEPT ![2].card="synthetic_two_instruction_barrier"] activity == SubActivityFixture98(b.e,objects,definitions) p == NewBarrierInstructionBarrierInstruction98(8000,101,definition,b.e,SubOwnerFixture98,"Play") s == [b EXCEPT !.state=state,!.objects=objects,!.definitions=definitions,!.activity=activity,!.p=p] cleared == [p EXCEPT !.phase="FirstTargets"] plan1 == OpenInstruction93(2200,"Ability",8000,p.ability.source,"Play",1,"NoValue",<<"SchemaAtom070">>,FALSE) im1 == [plan1 EXCEPT !.announced=TRUE,!.phase="Imminent"] p1 == [cleared EXCEPT !.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE,!.phase="Imminent"] resolvingPlan1 == [im1 EXCEPT !.phase="Resolving"] r1 == [p1 EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] finishedPlan1 == [resolvingPlan1 EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"SchemaAtom070">>] done1 == [r1 EXCEPT !.ability.phase="Between",!.phase="InstructionCheckpoint"] ledger == SubSeedFixture98(objects) cp1 == PlayEmptyCheckpointFixture97(ledger,1,Empty9,objects,TRUE,0,BarrierInstructionInstructionCaller98(done1)) l1 == ConditionalCommittedFixture96(ledger,Empty9,cp1,Empty9,Empty9,Empty9) between == [done1 EXCEPT !.phase="Targets",!.checkpoint=1] plan2 == OpenInstruction93(2201,"Ability",8000,p.ability.source,"Play",2,"NoValue",<<"SchemaAtom140">>,TRUE) targets == [InstructionTargetsFixture93(plan2) EXCEPT !.targets={}] im2 == [plan2 EXCEPT !.announced=TRUE,!.phase="Imminent"] p2 == [between EXCEPT !.ability.cursor=2,!.ability.phase="Imminent",!.checkpoint=0,!.phase="Imminent"] entry2 == StaticNextEntryFixture96(plan2,1) resolvingPlan2 == [im2 EXCEPT !.phase="Resolving"] r2 == [p2 EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] finishedPlan2 == [resolvingPlan2 EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"SchemaAtom140">>] done2 == [r2 EXCEPT !.ability.phase="Complete",!.ability.complete=TRUE,!.ability.lastFinished=TRUE,!.phase="InstructionCheckpoint"] cp2 == PlayEmptyCheckpointFixture97(l1,2,Empty9,objects,TRUE,0,BarrierInstructionInstructionCaller98(done2)) l2 == ConditionalCommittedFixture96(l1,Empty9,cp2,Empty9,Empty9,Empty9) final == [done2 EXCEPT !.phase="AbilityComplete",!.checkpoint=2] IN [s |-> s,p |-> p,cleared |-> cleared,plan1 |-> plan1,im1 |-> im1,p1 |-> p1,resolvingPlan1 |-> resolvingPlan1,r1 |-> r1, finishedPlan1 |-> finishedPlan1,done1 |-> done1,ledger |-> ledger,cp1 |-> cp1,l1 |-> l1,between |-> between, plan2 |-> plan2,targets |-> targets,im2 |-> im2,p2 |-> p2,entry2 |-> entry2,resolvingPlan2 |-> resolvingPlan2,r2 |-> r2, finishedPlan2 |-> finishedPlan2,done2 |-> done2,cp2 |-> cp2,l2 |-> l2,final |-> final] BarrierInstructionContinuationChecks98 == LET g == SubGenericFixture98 IN /\ SubStartValid98(g.s) /\ NoBarrierInstructionInterrupt98(g.p,g.cleared,<<>>,SubNoModifiersFixture98(g.p),SubClearanceFixture98(g.p,0,0)) /\ EnterFirstBarrierInstructionInstruction98(g.cleared,g.p1,g.s.e,g.s.control,g.s.state,g.s.objects,DOMAIN g.s.definitions,g.s.activity,[player \in SetupPlayers |-> 0],<<>>,g.plan1,g.im1,[InstructionTargetsFixture93(g.plan1) EXCEPT !.targets={}],InstructionEntryFixture93(g.plan1)) /\ ResolveBarrierInstructionWithoutInterrupt98(g.p1,g.r1,<<>>,g.im1,g.resolvingPlan1,NoModifiersFixture95(g.im1),InstructionClearanceFixture93(g.im1,0,0)) /\ CarryBarrierInstructionInstruction98(g.r1,g.done1,<<>>,g.resolvingPlan1,g.finishedPlan1,[tag |-> "InstructionStepReturn",instruction |-> 2200,index |-> 1,step |-> "SchemaAtom070",complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(g.ledger,g.l1,<<>>,<<>>,Empty9,g.cp1,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ BarrierInstructionInstructionCheckpoint98(g.done1,g.between,<<>>,g.l1,SubCPReceiptFixture98(g.done1,1)) /\ AbilityIsResolving9(g.between.ability) /\ ~g.between.ability.complete /\ EnterNextBarrierInstructionInstruction98(g.between,g.p2,<<>>,g.plan2,g.im2,g.targets,g.entry2) /\ ResolveBarrierInstructionWithoutInterrupt98(g.p2,g.r2,<<>>,g.im2,g.resolvingPlan2,NoModifiersFixture95(g.im2),InstructionClearanceFixture93(g.im2,0,0)) /\ CarryBarrierInstructionInstruction98(g.r2,g.done2,<<>>,g.resolvingPlan2,g.finishedPlan2,[tag |-> "InstructionStepReturn",instruction |-> 2201,index |-> 1,step |-> "SchemaAtom140",complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(g.l1,g.l2,<<>>,<<>>,Empty9,g.cp2,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ BarrierInstructionInstructionCheckpoint98(g.done2,g.final,<<>>,g.l2,SubCPReceiptFixture98(g.done2,2)) /\ ~AbilityIsResolving9(g.final.ability) /\ \A bad \in {[g.targets EXCEPT !.valid=FALSE],[g.targets EXCEPT !.source=ObjectAbilitySource9(3)], [g.targets EXCEPT !.index=1],[g.targets EXCEPT !.instruction=2200],[g.targets EXCEPT !.abilityInstance=8001]} : ~EnterNextBarrierInstructionInstruction98(g.between,g.p2,<<>>,g.plan2,g.im2,bad,g.entry2) /\ ~EnterNextBarrierInstructionInstruction98(g.done1,g.p2,<<>>,g.plan2,g.im2,g.targets,g.entry2) /\ ~EnterNextBarrierInstructionInstruction98(g.between,g.p2,<<>>,g.plan2,g.im2,g.targets,[g.entry2 EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE]) BarrierInstructionNestedChecks98 == LET b == SubStartFixture98("Specimen0267",<<"ResolveDonor">>,<<>>) donorDefinitions == [id \in {401,402} |-> OrderPrintedSubFixture98(id,4,IF id=401 THEN "Damage1" ELSE "GainResourceUnit")] donorState == NewBarrierInstructionOrder98(4,<<401,402>>,donorDefinitions,[id \in {401,402} |-> IF id=401 THEN "Damage1" ELSE "GainResourceUnit"]) objects == [id \in DOMAIN b.objects \cup {4} |-> IF id=4 THEN CardObject9("Specimen0245","Play",TRUE,"Up") ELSE b.objects[id]] definitions == [id \in DOMAIN b.definitions \cup DOMAIN donorDefinitions |-> IF id \in DOMAIN donorDefinitions THEN donorDefinitions[id] ELSE b.definitions[id]] s == [b EXCEPT !.objects=objects,!.definitions=definitions,!.activity=SubActivityFixture98(b.e,objects,definitions)] seed == SubSeedFixture98(objects) parent == SubSingleFixture98(s,s.p,s.selected,"ResolveDonor",seed,2) parentRef == InstructionWindowRef93(parent.resolvingPlan) effect == [tag |-> "ExplicitResolveBarrierInstruction",id |-> 1,step |-> 1,instruction |-> parentRef,barrierCard |-> 4,barrierInstruction |-> 401, encounter |-> 20,structure |-> TimingRef9("TraversalPhase",20),authorized |-> TRUE, sourceCard |-> "Specimen0267",sourceSHA |-> CardFacts9["Specimen0267"].sourceSHA,selector |-> "AnotherItemActivatedBarrier",currentSubtypes |-> {}, origin |-> [tag |-> "FixedAbilitySourceObservation",source |-> ObjectAbilitySource9(2),card |-> "Specimen0267",sourceSHA |-> CardFacts9["Specimen0267"].sourceSHA]] base == NewBarrierInstructionBarrierInstruction98(8300,401,donorDefinitions[401],[id |-> 20,barrierCard |-> 4],SubOwnerFixture98,"Play") child == [base EXCEPT !.origin="Instruction",!.caller=parent.resolvingPlan.id,!.ability.caller=parent.resolvingPlan.id,!.invocation=effect] calls == [id \in {1} |-> [instruction |-> parentRef,instance |-> 8300,status |-> "Active",source |-> ObjectAbilitySource9(4),encounter |-> 20,barrierInstruction |-> 401,disposition |-> "NoValue"]] cleared == [child EXCEPT !.phase="FirstTargets"] plan == OpenInstruction93(2003,"Ability",8300,ObjectAbilitySource9(4),"Play",1,"NoValue",<<"Damage1FromSpecimen0245">>,FALSE) imPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] imminent == [cleared EXCEPT !.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE,!.phase="Imminent"] rPlan == [imPlan EXCEPT !.phase="Resolving"] resolving == [imminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] donePlan == [rPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"Damage1FromSpecimen0245">>] done == [resolving EXCEPT !.ability.phase="Complete",!.ability.complete=TRUE,!.ability.lastFinished=TRUE,!.phase="InstructionCheckpoint"] cp1 == PlayEmptyCheckpointFixture97(seed,1,Empty9,objects,TRUE,0,BarrierInstructionInstructionCaller98(done)) ledger1 == ConditionalCommittedFixture96(seed,Empty9,cp1,Empty9,Empty9,Empty9) finalChild == [done EXCEPT !.phase="AbilityComplete",!.checkpoint=1] returnedChild == [finalChild EXCEPT !.phase="Returned",!.ability.returned=TRUE] childReturn == [tag |-> "NestedBarrierInstructionReturn",instruction |-> parentRef,invocation |-> 1,instance |-> 8300,source |-> ObjectAbilitySource9(4),barrierInstruction |-> 401,complete |-> TRUE,disposition |-> "Resolved",finalCheckpoint |-> 1] afterCalls == [calls EXCEPT ![1].status="Returned",![1].disposition="Resolved"] parentStep == [tag |-> "InstructionStepReturn",instruction |-> parent.resolvingPlan.id,index |-> 1,step |-> "ResolveDonor",complete |-> TRUE,childReturn |-> childReturn] parentCP == PlayEmptyCheckpointFixture97(ledger1,2,Empty9,objects,TRUE,0,BarrierInstructionInstructionCaller98(parent.finished)) finalLedger == ConditionalCommittedFixture96(ledger1,Empty9,parentCP,Empty9,Empty9,Empty9) newEffect == [effect EXCEPT !.id=2] newChild == [child EXCEPT !.id=8301,!.ability.id=8301,!.invocation=newEffect] newCall == [calls[1] EXCEPT !.instance=8301] newCalls == [id \in {1,2} |-> IF id=2 THEN newCall ELSE calls[1]] replayChild == [child EXCEPT !.id=8301,!.ability.id=8301] replayCalls == [id \in {1} |-> newCall] badEffect == [effect EXCEPT !.sourceSHA="foreign",!.origin.sourceSHA="foreign"] badChild == [child EXCEPT !.invocation=badEffect] IN /\ SubStartValid98(s) /\ NoBarrierInstructionInterrupt98(s.p,parent.cleared,<<>>,SubNoModifiersFixture98(s.p),SubClearanceFixture98(s.p,0,0)) /\ EnterFirstBarrierInstructionInstruction98(parent.cleared,parent.imminent,s.e,s.control,s.state,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>,parent.plan,parent.imminentPlan,[InstructionTargetsFixture93(parent.plan) EXCEPT !.targets={}],InstructionEntryFixture93(parent.plan)) /\ ResolveBarrierInstructionWithoutInterrupt98(parent.imminent,parent.resolving,<<>>,parent.imminentPlan,parent.resolvingPlan,NoModifiersFixture95(parent.imminentPlan),InstructionClearanceFixture93(parent.imminentPlan,0,0)) /\ EnterInstructionBarrierInstruction98(Empty9,calls,child,parent.resolvingPlan,parent.resolving.ability,"NoValue",effect,donorState,8300,{8000},SubOwnerFixture98,<<>>,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],CardFacts9) /\ child.barrierCard=4 /\ child.ability.source=ObjectAbilitySource9(4) /\ child.encounter=20 /\ child.caller=parent.plan.id /\ ~EnterInstructionBarrierInstruction98(Empty9,calls,badChild,parent.resolvingPlan,parent.resolving.ability,"NoValue",badEffect,donorState,8300,{8000},SubOwnerFixture98,<<>>,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],CardFacts9) /\ ~EnterInstructionBarrierInstruction98(calls,newCalls,newChild,parent.resolvingPlan,parent.resolving.ability,"NoValue",newEffect,donorState,8301,{8000,8300},SubOwnerFixture98,<<>>,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],CardFacts9) /\ ~EnterInstructionBarrierInstruction98(afterCalls,replayCalls,replayChild,parent.resolvingPlan,parent.resolving.ability,"NoValue",effect,donorState,8301,{8000,8300},SubOwnerFixture98,<<>>,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],CardFacts9) /\ NoBarrierInstructionInterrupt98(child,cleared,<<>>,SubNoModifiersFixture98(child),SubClearanceFixture98(child,0,0)) /\ EnterFirstInstructionBarrierInstruction98(cleared,imminent,parent.resolvingPlan,parent.resolving.ability,"NoValue",donorState,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>,plan,imPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan)) /\ ~EnterFirstBarrierInstructionInstruction98(cleared,imminent,s.e,s.control,donorState,objects,DOMAIN definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>,plan,imPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan)) /\ ResolveBarrierInstructionWithoutInterrupt98(imminent,resolving,<<>>,imPlan,rPlan,NoModifiersFixture95(imPlan),InstructionClearanceFixture93(imPlan,0,0)) /\ CarryBarrierInstructionInstruction98(resolving,done,<<>>,rPlan,donePlan,[tag |-> "InstructionStepReturn",instruction |-> 2003,index |-> 1,step |-> "Damage1FromSpecimen0245",complete |-> TRUE]) /\ ProcessConditionalCheckpoint96(seed,ledger1,<<>>,<<>>,Empty9,cp1,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ BarrierInstructionInstructionCheckpoint98(done,finalChild,<<>>,ledger1,SubCPReceiptFixture98(done,1)) /\ CarryBarrierInstructionChildReturn98(calls,afterCalls,parent.resolving,parent.finished,<<>>,parent.resolvingPlan,parent.completePlan,parentStep,finalChild,returnedChild,childReturn) /\ ~ReturnInstructionBarrierInstruction98(calls,afterCalls,finalChild,returnedChild,parent.resolvingPlan,parent.resolving.ability,"NoValue",<<>>,[childReturn EXCEPT !.source=ObjectAbilitySource9(2)]) /\ ~ReturnInstructionBarrierInstruction98(calls,afterCalls,finalChild,returnedChild,parent.resolvingPlan,parent.resolving.ability,"NoValue",<<>>,[childReturn EXCEPT !.instance=8301]) /\ ~ReturnInstructionBarrierInstruction98(calls,afterCalls,finalChild,returnedChild,parent.completePlan,parent.finished.ability,"NoValue",<<>>,childReturn) /\ ProcessConditionalCheckpoint96(ledger1,finalLedger,<<>>,<<>>,Empty9,parentCP,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ BarrierInstructionInstructionCheckpoint98(parent.finished,parent.afterCP,<<>>,finalLedger,SubCPReceiptFixture98(parent.finished,2)) /\ FinishBarrierInstruction98(s.selected,parent.afterLoop,parent.afterCP,parent.returned,s.e,parent.afterEncounter,<<>>) /\ parent.afterEncounter.resolved={101} /\ 401 \notin parent.afterEncounter.usedSubIds /\ s.selected.current=8000 /\ parent.afterLoop.handled={101} /\ donorState.order= <<401,402>> /\ ResolvedBarrierInstructionCount98(parent.afterLoop,afterCalls,4,20)=1 /\ ResolvedBarrierInstructionCount98(parent.afterLoop,afterCalls,2,20)=1 BarrierInstructionConditionalInterruptChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) base == ConditionalDefinitionFixture96(660,"Specimen0110","Trigger","BarrierInstructionImminent","SchemaAtom016","SchemaAtom016","SchemaAtom016") source == RuleAbilitySource9("SyntheticBarrierInstructionModifier") d == [base EXCEPT !.syntax.source=source,!.syntax.controller="SideB",!.activity.source=source,!.instructionHasWould=TRUE,!.effectChoices={{},{1}}] key == ConditionalKey96(d) definitions == [k \in {key} |-> d] snapshot == [ConditionalSnapshotFixture96(1,0,"Preparation",definitions,s.objects) EXCEPT !.activity.activeRules={source.rule}] seed == NewConditionalLedger96(snapshot) prepared == [tag |-> "ConditionalInterruptMatch",instruction |-> BarrierInstructionWindowRef98(s.p),ability |-> 660,source |-> source,snapshotId |-> 1,matches |-> TRUE,occurrence |-> 9001] member == ConditionalMember96(8400,d,920,92) instance == [member |-> member,definition |-> key,definitionCopy |-> d,status |-> "Pending",primaryKind |-> "Trigger",activationEpoch |-> 0, checkpointId |-> 0,occurrence |-> 9001,hadSnapshot |-> snapshot,expected |-> Empty9,used |-> FALSE] created == [seed EXCEPT !.interruptRecognitions={[definition |-> key,occurrence |-> 9001]},!.instances=[id \in {8400} |-> instance]] wf == SubWindowFixture98(s.p,920) members == [id \in {8400} |-> member] opening == [wf.opening EXCEPT !.members={8400},!.instances=members,!.group=92] window == NewPriorityWindow9(920,"Interrupt",wf.site,members,92,NoTimingRef9,BarrierInstructionWindowRef98(s.p),1) cp1 == [PlayEmptyCheckpointFixture97(created,1,definitions,s.objects,TRUE,0,ConditionalPriorityCaller96(window)) EXCEPT !.beginSnapshot.activity.activeRules={source.rule},!.processingSnapshot.activity.activeRules={source.rule}] l1 == ConditionalCommittedFixture96(created,definitions,cp1,Empty9,Empty9,Empty9) ready == [ReadyFixture92(window) EXCEPT !.checkpoint=1] passed == PassPriorityFrame9(ready) effect == EffectFixture92(ready,{8400},{}) cp2 == [PlayEmptyCheckpointFixture97(l1,2,definitions,s.objects,TRUE,0,ConditionalPriorityCaller96(passed)) EXCEPT !.beginSnapshot.activity.activeRules={source.rule},!.processingSnapshot.activity.activeRules={source.rule}] l2 == ConditionalCommittedFixture96(l1,definitions,cp2,Empty9,Empty9,Empty9) other == [ReadyFixture92(passed) EXCEPT !.checkpoint=2] closed == PassPriorityFrame9(other) lost == [l2 EXCEPT !.instances[8400].status="Lost"] b1 == SnapshotWithConditionalRegistry96(cp1.processingSnapshot,l1) a1 == [b1 EXCEPT !.id=14,!.point="AfterOptionalInterruptPass"] b2 == SnapshotWithConditionalRegistry96(cp2.processingSnapshot,l2) a2 == [SnapshotWithConditionalRegistry96(cp2.processingSnapshot,lost) EXCEPT !.id=24,!.point="AfterInterruptClose"] cleared == [s.p EXCEPT !.phase="FirstTargets"] IN /\ ConditionalDefinitionValid96(d) /\ ConditionalInterrupt96(d) /\ ConditionalOptional96(d) /\ CreateBarrierInstructionConditionalInterrupt98(seed,created,8400,d,s.p,snapshot,prepared,920,92,{}) /\ OpenPreparedBarrierInstructionInterrupt98(s.p,<<>>,<>,920,wf.site,created,opening,{}) /\ ProcessConditionalCheckpoint96(created,l1,<>,<>,definitions,cp1,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{920}) /\ CheckpointPriorityWithConditionals96(l1,<>,<>,[CheckpointFixture92(window) EXCEPT !.id=1]) /\ PassConditionalPriority96(l1,l1,l1,<>,<>,"SideB",effect,b1,a1) /\ passed.pending={8400} /\ passed.lostPending={} /\ l1.instances[8400].status="Pending" /\ ProcessConditionalCheckpoint96(l1,l2,<>,<>,definitions,cp2,ConditionalConditionsFixture96(definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{920}) /\ CheckpointPriorityWithConditionals96(l2,<>,<>,[CheckpointFixture92(passed) EXCEPT !.id=2]) /\ PassConditionalPriority96(l2,lost,lost,<>,<>,"SideA",effect,b2,a2) /\ closed.lostPending={8400} /\ lost.instances[8400].status="Lost" /\ ReturnBarrierInstructionInterrupt98(s.p,cleared,<>,<<>>,SubClearanceFixture98(s.p,920,0)) /\ ~CreateBarrierInstructionConditionalInterrupt98(seed,created,8400,d,s.p,snapshot,[prepared EXCEPT !.instruction=[BarrierInstructionWindowRef98(s.p) EXCEPT !.index=1]],920,92,{}) /\ ~CreateBarrierInstructionConditionalInterrupt98(seed,created,8400,d,s.p,snapshot,[prepared EXCEPT !.source=ObjectAbilitySource9(2)],920,92,{}) /\ ~CreateBarrierInstructionConditionalInterrupt98(seed,created,8400,d,s.p,snapshot,prepared,920,92,{920}) /\ ~CreateBarrierInstructionConditionalInterrupt98(created,created,8400,d,s.p,SnapshotWithConditionalRegistry96(snapshot,created),prepared,920,92,{}) BarrierInstructionInstructionWindowChecks98 == LET g == SubGenericFixture98 wf == SubWindowFixture98(g.p2,930) opening == [wf.opening EXCEPT !.instruction=InstructionWindowRef93(g.im2)] window == NewPriorityWindow9(930,"Interrupt",wf.site,Empty9,90,NoTimingRef9,InstructionWindowRef93(g.im2),1) ready == ReadyFixture92(window) pass1 == PassPriorityFrame9(ready) ready2 == ReadyFixture92(pass1) closed == PassPriorityFrame9(ready2) effect == EffectFixture92(ready,{}, {100}) clearance == InstructionClearanceFixture93(g.im2,930,0) IN /\ OpenBarrierInstructionInstructionInterrupt98(g.p2,<<>>,<>,g.im2,930,wf.site,Empty9,opening,{}) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(window)) /\ PassPriority9(<>,<>,"SideB",effect) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(pass1)) /\ PassPriority9(<>,<>,"SideA",effect) /\ ResolveBarrierInstructionAfterInterrupt98(g.p2,g.r2,<>,<<>>,g.im2,g.resolvingPlan2,clearance) /\ ~ResolveBarrierInstructionAfterInterrupt98(g.p2,g.r2,<>,<<>>,g.im2,g.resolvingPlan2,clearance) /\ \A bad \in {[clearance EXCEPT !.source=ObjectAbilitySource9(3)],[clearance EXCEPT !.abilityInstance=8001], [clearance EXCEPT !.index=1],[clearance EXCEPT !.windowId=931],[clearance EXCEPT !.revision=1]} : ~ResolveBarrierInstructionAfterInterrupt98(g.p2,g.r2,<>,<<>>,g.im2,g.resolvingPlan2,bad) BarrierInstructionOwnerChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) ready == PaidWindowFixture95(600,"NeutralValue00001","SideB") option == SyntheticOption92(60,"NeutralValue00001","SideB") busy == StartedFixture92(ready,option) owner == [windowId |-> 600,option |-> option,transaction |-> busy.busyTransaction] loop == NewBarrierInstructionLoop98(s.e,owner,<<101,102>>,0) p == NewBarrierInstructionBarrierInstruction98(8000,101,s.state.definitions[101],s.e,owner,"Play") selected == [loop EXCEPT !.current=8000,!.usedInstances={8000}] child == WindowFixture92(601,"Paid",TraversalSiteFixture92("ProcedureCode8b3260c0010f"),Empty9,0,NoTimingRef9) IN /\ BeginPriorityOption9(<>,<>,option,s.objects,LegalityFixture92(ready,option),Empty9) /\ SelectNextBarrierInstruction98(loop,selected,p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,s.e,<<101,102>>),8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<>) /\ ~SelectNextBarrierInstruction98(loop,selected,p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,s.e,<<101,102>>),8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<>) /\ ~SelectNextBarrierInstruction98(loop,selected,p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,s.e,<<101,102>>),8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<>) /\ ~SelectNextBarrierInstruction98(loop,selected,p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,SubCurrentOrderFixture98(loop,s.e,<<101,102>>),8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<[busy EXCEPT !.busyTransaction=@+1]>>) /\ ActionablePriority9(<>)={} BarrierInstructionOpeningProfileChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) wf == SubWindowFixture98(s.p,940) IN /\ SubStartValid98(s) /\ \A badRef \in {[BarrierInstructionWindowRef98(s.p) EXCEPT !.origin="Ability"],[BarrierInstructionWindowRef98(s.p) EXCEPT !.barrierInstruction=102], [BarrierInstructionWindowRef98(s.p) EXCEPT !.encounter=21],[BarrierInstructionWindowRef98(s.p) EXCEPT !.index=1]} : LET opening == [wf.opening EXCEPT !.instruction=badRef] output == NewPriorityWindow9(940,"Interrupt",wf.site,Empty9,90,NoTimingRef9,badRef,1) IN ~OpenBarrierInstructionInterrupt98(s.p,<<>>,<>,940,wf.site,Empty9,opening,{}) /\ LET site == [wf.site EXCEPT !.structure=TimingRef9("ItemInspection",20)] opening == [wf.opening EXCEPT !.site=site] output == [wf.window EXCEPT !.site=site] IN ~OpenBarrierInstructionInterrupt98(s.p,<<>>,<>,940,site,Empty9,opening,{}) /\ \A badDecl \in {[s.declaration EXCEPT !.order= <<102,101>>],[s.declaration EXCEPT !.step="ProcedureCode8b3260c0010f"]} : ~EnterBarrierInstructionLoop98(Empty9,[id \in {20} |-> NewBarrierInstructionLoop98(s.e,SubOwnerFixture98,badDecl.order,0)],s.e,s.control,"ProcedureCodef1914978bb8e",s.state,s.sources,s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],SubOwnerFixture98,<<>>,badDecl,CardFacts9) /\ LET exampleFamily062 == SubStartFixture98("Specimen0132",<<"EndTraversal","EndTraversal","SideBGain5">>,<<103,101,102>>) IN \A badDecl \in {[exampleFamily062.declaration EXCEPT !.controller="SideA"],[exampleFamily062.declaration EXCEPT !.source=ObjectAbilitySource9(4)]} : ~EnterBarrierInstructionLoop98(Empty9,[id \in {20} |-> exampleFamily062.loop],exampleFamily062.e,exampleFamily062.control,"ProcedureCodef1914978bb8e",exampleFamily062.state,exampleFamily062.sources,exampleFamily062.objects,DOMAIN exampleFamily062.definitions,exampleFamily062.activity,[player \in SetupPlayers |-> 0],SubOwnerFixture98,<<>>,badDecl,CardFacts9) BarrierInstructionResolutionChecks98 == /\ BarrierInstructionNormalChecks98 /\ BarrierInstructionExampleFamily062Checks98 /\ BarrierInstructionProfileChecks98 /\ BarrierInstructionForcedChecks98 /\ BarrierInstructionPreventionChecks98 /\ BarrierInstructionExampleFamily006Checks98 /\ BarrierInstructionContinuationChecks98 /\ BarrierInstructionNestedChecks98 /\ BarrierInstructionConditionalInterruptChecks98 /\ BarrierInstructionInstructionWindowChecks98 /\ BarrierInstructionOwnerChecks98 /\ BarrierInstructionOpeningProfileChecks98 SuppressInstructionControlFixture98(e) == [traversal |-> IF e.traversalId=0 THEN NoTraversal6 ELSE TraversalFixture92("ProcedureCode8b3260c0010f"),encounter |-> e.id,redirect |-> NoTraversalRedirect6, phaseStepsSkipped |-> FALSE,redirectCheckpointDue |-> FALSE,phaseEndedIds |-> {},paidOpen |-> TRUE,redirectStage |-> "NoValue"] SuppressInstructionDefinitionFixture98(id,card,source) == LET d == PaidDefinitionFixture95(id,card,IF card="Specimen0065" THEN <<"Interface">> ELSE <<>>, IF card="Specimen0065" THEN <<[kind |-> "ResourceUnits",amount |-> 2]>> ELSE <<[kind |-> "RetireSource",amount |-> 1]>>) IN [d EXCEPT !.syntax.source=ObjectAbilitySource9(source),!.activity.source=ObjectAbilitySource9(source), !.canSuppressBarrierInstructions=TRUE,!.refersEncounteredBarrier=TRUE,!.otherRestrictionIds=IF card="Specimen0065" THEN {1} ELSE {}] SuppressInstructionClassificationFixture98(d,card,mode,selector) == [tag |-> "NormalizedSuppressInstructionInstruction",ability |-> d.syntax.id,source |-> d.syntax.source,card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA, instruction |-> 700,mode |-> mode,selector |-> selector,minimumTargets |-> IF mode="All" THEN 0 ELSE 1,maximumTargets |-> IF mode="All" THEN 0 ELSE 1] SuppressInstructionContextFixture98(d,objects,e) == LET c == PaidContextFixture95(d,objects,TurnFixture92("SideB")) control == SuppressInstructionControlFixture98(e) IN [c EXCEPT !.traversal=control.traversal,!.traversalControl=control,!.encounter=e, !.references["Encounter"].structure=TimingRef9("TraversalPhase",e.id),!.references["Encounter"].barrierCard=e.barrierCard,!.references["Encounter"].traversalId=e.traversalId, !.subtypes=[id \in DOMAIN objects |-> IF id=d.syntax.source.object THEN {"SchemaAtom086","SchemaAtom006"} ELSE {"SchemaSymbol001","SchemaAtom024"}], !.strengths=[id \in DOMAIN objects |-> [exists |-> TRUE,amount |-> 6]], !.otherRestrictions.results=[id \in d.otherRestrictionIds |-> TRUE]] SuppressInstructionAttemptAtWindowFixture98(card,source,abilityId,instance,e,objects,targets,mode,selector,providedWindow) == LET d == SuppressInstructionDefinitionFixture98(abilityId,card,source) c == SuppressInstructionContextFixture98(d,objects,e) w == IF providedWindow=Empty9 THEN ReadyFixture92(WindowFixture92(950+source,"Paid",EncounterPaidSite95(c.turn,e,c.traversalControl),Empty9,0,NoTimingRef9)) ELSE providedWindow option == PaidOptionFixture95(d,w) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(instance,d,option,w,LegalityFixture92(w,option).transactionId,"Play") classification == SuppressInstructionClassificationFixture98(d,card,mode,selector) intent == NewSuppressInstructionIntent98(p,e,classification) paid == PaidCommittedFixture95(p,Empty9,FALSE) afterObjects == IF card="Specimen0065" THEN objects ELSE [id \in (DOMAIN objects \ {source}) \cup {source+10} |-> IF id=source+10 THEN CardObject9(card,"SideBDiscard",FALSE,"Up") ELSE objects[id]] payment == PaidPaymentFixture95(p,objects,afterObjects,IF card="Specimen0065" THEN source ELSE source+10,card # "Specimen0065",FALSE) planning == PaidTargetsFrame95(paid,1000) plan == OpenInstruction93(700,"Ability",instance,d.syntax.source,"Play",1,"NoValue",<<"SuppressChosenBarrierInstructions">>,mode # "All") imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets=targets,!.phase="Imminent"] imminent == PaidImminentFrame95(planning) selection == NewSuppressInstructionSelection98(intent,imminentPlan,targets) atomic == PaidResolvingFrame95(imminent) atomicPlan == [imminentPlan EXCEPT !.phase="Resolving"] effect == [tag |-> "NormalizedSuppressInstructionResolution",instruction |-> InstructionWindowRef93(atomicPlan),abilityInstance |-> instance, source |-> d.syntax.source,encounter |-> intent.encounter,classification |-> classification,operation |-> "SuppressInstruction"] IN [definition |-> d,context |-> c,window |-> w,option |-> option,busy |-> busy,procedure |-> p,classification |-> classification,intent |-> intent, paid |-> paid,payment |-> payment,afterObjects |-> afterObjects,planning |-> planning,plan |-> plan,imminent |-> imminent,imminentPlan |-> imminentPlan, selection |-> selection,atomic |-> atomic,atomicPlan |-> atomicPlan,effect |-> effect,encounter |-> e,objects |-> objects] SuppressInstructionAttemptFixture98(card,source,abilityId,instance,e,objects,targets,mode,selector) == SuppressInstructionAttemptAtWindowFixture98(card,source,abilityId,instance,e,objects,targets,mode,selector,Empty9) SuppressInstructionAttemptValid98(s) == /\ ReserveSuppressInstructionAbility98(<>,<>,s.procedure,s.procedure.id,s.definition,s.context,s.option,LegalityFixture92(s.window,s.option),{},s.classification,s.intent,CardFacts9) /\ PayPaidTrigger95(<>,s.procedure,s.paid,s.objects,s.afterObjects,Empty9,Empty9,Empty9,DOMAIN s.objects,s.payment, Empty9,PaidUsesFixture95(s.procedure),Empty9,PaidTurnUsesFixture95(s.procedure),1,{PaidUseFixture95(s.procedure)}) /\ PaidCheckpoint95(<>,s.paid,s.planning,s.afterObjects,Empty9,PaidCheckpointFixture95(s.paid,1000)) /\ EnterSuppressInstructionInstruction98(<>,s.planning,s.imminent,s.plan,s.imminentPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets=s.selection.targets], PaidEntryFixture95(s.plan,1000),s.intent,s.encounter,s.context.traversalControl,s.selection) /\ ResolvePaidWithoutInterrupt95(<>,s.imminent,s.atomic,s.imminentPlan,s.atomicPlan,NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0)) BarrierInstructionSuppressedEncounterFixture98(e,subs,source) == WithFullySuppressInstruction6([e EXCEPT !.barrierInstructionSuppressed=@ \cup subs,!.barrierInstructionSuppressedBy=[id \in DOMAIN @ |-> IF id \in subs THEN source ELSE @[id]]]) SuppressInstructionHookExampleChecks98 == LET initial == OpenEncounter6(20,2,2,FALSE,"traversal",<<301,302,303>>) begun == [initial EXCEPT !.stage="BeginReactions"] e == [begun EXCEPT !.stage="Paid",!.paidReached=TRUE] objects == [id \in {1,2,3} |-> IF id=2 THEN [CardObject9("Specimen0107","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE CardObject9("Specimen0103","Play",TRUE,"Up")] first == SuppressInstructionAttemptFixture98("Specimen0103",1,980,9001,e,objects,{301},"Hook","SchemaAtom016") barrierInstructionSuppressedEnds == BarrierInstructionSuppressedEncounterFixture98(e,{302,303},1) firstFinished == PaidFinishedFrame95(first.atomic) firstCompletePlan == [first.atomicPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=first.atomicPlan.steps] firstFinal == [firstFinished EXCEPT !.phase="Complete",!.checkpoint=1001] firstReturnedP == [firstFinal EXCEPT !.phase="Returned",!.ability.returned=TRUE] firstReturned == CompletePriorityOptionFrame9(first.busy) nextWindow == ReadyFixture92(firstReturned) SchemaAtom187 == SuppressInstructionAttemptAtWindowFixture98("Specimen0103",3,981,9002,barrierInstructionSuppressedEnds,first.afterObjects,{302},"Hook","SchemaAtom016",nextWindow) allBarrierInstructionSuppressed == BarrierInstructionSuppressedEncounterFixture98(barrierInstructionSuppressedEnds,{301},3) IN /\ CardFacts9["Specimen0107"].kind="Barrier" /\ CardFacts9["Specimen0103"].kind="Technique" /\ BeginEncounter6(initial,begun,TRUE,{[tag |-> "EncounterBarrier",encounterId |-> 20,barrierCard |-> 2,traversalId |-> 2]}) /\ BeginEncounterPaid6(begun,e,TRUE,{}) /\ SuppressInstructionAttemptValid98(first) /\ ResolvePaidSuppressInstructionInstruction98(e,barrierInstructionSuppressedEnds,first.context.traversalControl,<>,first.atomic,first.atomicPlan,first.intent,first.selection,first.effect,{}) /\ barrierInstructionSuppressedEnds.barrierInstructionSuppressed={302,303} /\ EncounterSubStatus98(barrierInstructionSuppressedEnds,301)="UnsuppressedBarrierInstructions" /\ CarryPaidInstruction95(<>,first.atomic,firstFinished,first.atomicPlan,firstCompletePlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> first.atomicPlan.steps[1],complete |-> TRUE]) /\ PaidCheckpoint95(<>,firstFinished,firstFinal,first.afterObjects,Empty9,PaidCheckpointFixture95(firstFinished,1001)) /\ FinishPaidProcedure95(<>,<>,firstFinal,firstReturnedP,PaidReturnFixture95(first.busy,1001)) /\ ActionablePriority9(<>)={} /\ firstReturned.stage="NeedCheckpoint" /\ CheckpointPriority9(<>,<>,CheckpointFixture92(firstReturned)) /\ SuppressInstructionAttemptValid98(SchemaAtom187) /\ SchemaAtom187.window.reception=first.window.reception+1 /\ SchemaAtom187.window.id=first.window.id /\ first.procedure.id # SchemaAtom187.procedure.id /\ 302 \in SchemaAtom187.selection.targets /\ EncounterSubStatus98(barrierInstructionSuppressedEnds,302)="BarrierInstructionSuppressed" /\ ResolvePaidSuppressInstructionInstruction98(barrierInstructionSuppressedEnds,allBarrierInstructionSuppressed,SchemaAtom187.context.traversalControl,<>,SchemaAtom187.atomic,SchemaAtom187.atomicPlan,SchemaAtom187.intent,SchemaAtom187.selection,SchemaAtom187.effect,NewFullySuppressInstructionEvents6(barrierInstructionSuppressedEnds,allBarrierInstructionSuppressed)) /\ allBarrierInstructionSuppressed.barrierInstructionSuppressed={301,302,303} /\ allBarrierInstructionSuppressed.fullyBarrierInstructionSuppressed /\ allBarrierInstructionSuppressed.fullyBy={} /\ allBarrierInstructionSuppressed.barrierInstructionSuppressedBy[301]=3 /\ allBarrierInstructionSuppressed.barrierInstructionSuppressedBy[302]=1 /\ allBarrierInstructionSuppressed.barrierInstructionSuppressedBy[303]=1 /\ Cardinality(NewFullySuppressInstructionEvents6(barrierInstructionSuppressedEnds,allBarrierInstructionSuppressed))=1 /\ \A excluded \in {{},{301,302},{999}} : LET plan == [first.imminentPlan EXCEPT !.targets=excluded] selection == NewSuppressInstructionSelection98(first.intent,plan,excluded) IN ~EnterSuppressInstructionInstruction98(<>,first.planning,first.imminent,first.plan,plan,[InstructionTargetsFixture93(first.plan) EXCEPT !.targets=excluded], PaidEntryFixture95(first.plan,1000),first.intent,e,first.context.traversalControl,selection) /\ LET retargeted == [first.atomicPlan EXCEPT !.targets={302}] changedEffect == [first.effect EXCEPT !.instruction=InstructionWindowRef93(retargeted)] changedResult == BarrierInstructionSuppressedEncounterFixture98(e,{301,303},1) IN ~ResolvePaidSuppressInstructionInstruction98(e,barrierInstructionSuppressedEnds,first.context.traversalControl,<>,first.atomic,retargeted,first.intent,first.selection,changedEffect,{}) /\ LET future == [first.selection EXCEPT !.instruction.revision=1] IN ~ResolvePaidSuppressInstructionInstruction98(e,barrierInstructionSuppressedEnds,first.context.traversalControl,<>,first.atomic,first.atomicPlan,first.intent,future,first.effect,{}) /\ LET badIntent == [first.intent EXCEPT !.encounter.kind="ItemInspection"] badSelection == [first.selection EXCEPT !.NeutralValue00003=badIntent] badEffect == [first.effect EXCEPT !.encounter=badIntent.encounter] IN ~ResolvePaidSuppressInstructionInstruction98(e,barrierInstructionSuppressedEnds,first.context.traversalControl,<>,first.atomic,first.atomicPlan,badIntent,badSelection,badEffect,{}) /\ LET badClass == [first.classification EXCEPT !.sourceSHA="ForeignRecord"] IN ~ReserveSuppressInstructionAbility98(<>,<>,first.procedure,9001,first.definition,first.context,first.option,LegalityFixture92(first.window,first.option),{},badClass,NewSuppressInstructionIntent98(first.procedure,e,badClass),CardFacts9) /\ ~ResolvePaidSuppressInstructionInstruction98(e,barrierInstructionSuppressedEnds,first.context.traversalControl,<>,first.atomic,first.atomicPlan,first.intent,first.selection,[first.effect EXCEPT !.source=ObjectAbilitySource9(3)],{}) /\ ~ResolvePaidSuppressInstructionInstruction98(e,barrierInstructionSuppressedEnds,first.context.traversalControl,<>,first.atomic,first.atomicPlan,first.intent,first.selection,[first.effect EXCEPT !.abilityInstance=9002],{}) SuppressInstructionAllAndOrdinaryChecks98 == LET e == [OpenEncounter6(20,2,2,FALSE,"traversal",<<301,302,303>>) EXCEPT !.stage="Paid",!.paidReached=TRUE] objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0065","Play",TRUE,"Up") ELSE [CardObject9("Specimen0107","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] barrierInstructionSuppressedFirst == BarrierInstructionSuppressedEncounterFixture98(e,{301},9) all == SuppressInstructionAttemptFixture98("Specimen0065",1,982,9003,barrierInstructionSuppressedFirst,objects,{},"All","SchemaAtom016") fully == BarrierInstructionSuppressedEncounterFixture98(barrierInstructionSuppressedFirst,{302,303},1) noUnsuppressedBarrierInstructions == SuppressInstructionAttemptFixture98("Specimen0065",1,982,9004,fully,objects,{},"All","SchemaAtom016") gbObjects == [objects EXCEPT ![1]=CardObject9("Specimen0099","Play",TRUE,"Up")] ordinary == SuppressInstructionAttemptFixture98("Specimen0099",1,983,9005,barrierInstructionSuppressedFirst,gbObjects,{303},"Ordinary","Last") lastBarrierInstructionSuppressed == BarrierInstructionSuppressedEncounterFixture98(barrierInstructionSuppressedFirst,{303},1) IN /\ SuppressInstructionAttemptValid98(all) /\ ResolvePaidSuppressInstructionInstruction98(barrierInstructionSuppressedFirst,fully,all.context.traversalControl,<>,all.atomic,all.atomicPlan,all.intent,all.selection,all.effect,NewFullySuppressInstructionEvents6(barrierInstructionSuppressedFirst,fully)) /\ fully.barrierInstructionSuppressedBy[301]=9 /\ fully.barrierInstructionSuppressedBy[302]=1 /\ fully.barrierInstructionSuppressedBy[303]=1 /\ ~ReserveSuppressInstructionAbility98(<>,<>,noUnsuppressedBarrierInstructions.procedure,9004,noUnsuppressedBarrierInstructions.definition,noUnsuppressedBarrierInstructions.context, noUnsuppressedBarrierInstructions.option,LegalityFixture92(noUnsuppressedBarrierInstructions.window,noUnsuppressedBarrierInstructions.option),{},noUnsuppressedBarrierInstructions.classification,noUnsuppressedBarrierInstructions.intent,CardFacts9) /\ LET plan == [all.imminentPlan EXCEPT !.targets={302}] IN ~EnterSuppressInstructionInstruction98(<>,all.planning,all.imminent,all.plan,plan,[InstructionTargetsFixture93(all.plan) EXCEPT !.targets={302}], PaidEntryFixture95(all.plan,1000),all.intent,barrierInstructionSuppressedFirst,all.context.traversalControl,NewSuppressInstructionSelection98(all.intent,plan,{302})) /\ SuppressInstructionAttemptValid98(ordinary) /\ ResolvePaidSuppressInstructionInstruction98(barrierInstructionSuppressedFirst,lastBarrierInstructionSuppressed,ordinary.context.traversalControl,<>,ordinary.atomic,ordinary.atomicPlan,ordinary.intent,ordinary.selection,ordinary.effect,{}) /\ \A targets \in {{301},{302},{999}} : LET plan == [ordinary.imminentPlan EXCEPT !.targets=targets] IN ~EnterSuppressInstructionInstruction98(<>,ordinary.planning,ordinary.imminent,ordinary.plan,plan,[InstructionTargetsFixture93(ordinary.plan) EXCEPT !.targets=targets], PaidEntryFixture95(ordinary.plan,1000),ordinary.intent,barrierInstructionSuppressedFirst,ordinary.context.traversalControl,NewSuppressInstructionSelection98(ordinary.intent,plan,targets)) /\ ~EnterSuppressInstructionInstruction98(<>,ordinary.planning,ordinary.imminent,ordinary.plan,ordinary.imminentPlan, [InstructionTargetsFixture93(ordinary.plan) EXCEPT !.targets={303}],PaidEntryFixture95(ordinary.plan,1000),ordinary.intent,lastBarrierInstructionSuppressed,ordinary.context.traversalControl,ordinary.selection) /\ LET gained == [barrierInstructionSuppressedFirst EXCEPT !.order= <<301,302,303,304>>,!.usedSubIds=@ \cup {304},!.barrierInstructionSuppressedBy=[id \in DOMAIN @ \cup {304} |-> IF id=304 THEN 0 ELSE @[id]]] nowAll == BarrierInstructionSuppressedEncounterFixture98(gained,{302,303,304},1) IN /\ UpdateEncounterSubs6(barrierInstructionSuppressedFirst,gained,gained.order,TRUE,{}) /\ ResolvePaidSuppressInstructionInstruction98(gained,gained,ordinary.context.traversalControl,<>,ordinary.atomic,ordinary.atomicPlan,ordinary.intent,ordinary.selection,ordinary.effect,{}) /\ ResolvePaidSuppressInstructionInstruction98(gained,nowAll,all.context.traversalControl,<>,all.atomic,all.atomicPlan,all.intent,all.selection,all.effect,NewFullySuppressInstructionEvents6(gained,nowAll)) /\ ResolvePaidSuppressInstructionInstruction98(lastBarrierInstructionSuppressed,lastBarrierInstructionSuppressed,ordinary.context.traversalControl,<>,ordinary.atomic,ordinary.atomicPlan,ordinary.intent,ordinary.selection,ordinary.effect,{}) /\ ResolvePaidSuppressInstructionInstruction98(barrierInstructionSuppressedFirst,barrierInstructionSuppressedFirst,all.context.traversalControl,<>,all.atomic,all.atomicPlan,all.intent,all.selection,[all.effect EXCEPT !.operation="NoEffects"],{}) SuppressInstructionEndedAndProfileChecks98 == LET e == [OpenEncounter6(20,2,2,FALSE,"traversal",<<301,302,303>>) EXCEPT !.stage="Paid",!.paidReached=TRUE] objects == [id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0103","Play",TRUE,"Up") ELSE [CardObject9("Specimen0107","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] s == SuppressInstructionAttemptFixture98("Specimen0103",1,980,9001,e,objects,{301},"Hook","SchemaAtom016") ended == [e EXCEPT !.stage="Complete",!.aborted=TRUE,!.bypassed=TRUE] endedControl == [s.context.traversalControl EXCEPT !.encounter=0,!.phaseEndedIds={20}] emptyPlan == [s.imminentPlan EXCEPT !.targets={}] emptySelection == NewSuppressInstructionSelection98(s.intent,emptyPlan,{}) lateAtomicPlan == [emptyPlan EXCEPT !.phase="Resolving"] lateEffect == [s.effect EXCEPT !.instruction=InstructionWindowRef93(lateAtomicPlan)] retained == [s.context.traversalControl EXCEPT !.encounter=21] IN /\ SuppressInstructionAttemptValid98(s) /\ BypassEncounter6(e,ended,TRUE,{[tag |-> "Bypass",encounterId |-> 20,barrierCard |-> 2,traversalId |-> 2]}) /\ ResolvePaidSuppressInstructionInstruction98(ended,ended,endedControl,<>,s.atomic,s.atomicPlan,s.intent,s.selection,s.effect,{}) /\ ~ResolvePaidSuppressInstructionInstruction98(ended,BarrierInstructionSuppressedEncounterFixture98(ended,{302,303},1),endedControl,<>,s.atomic,s.atomicPlan,s.intent,s.selection,s.effect,{}) /\ EnterSuppressInstructionInstruction98(<>,s.planning,s.imminent,s.plan,emptyPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}], PaidEntryFixture95(s.plan,1000),s.intent,ended,endedControl,emptySelection) /\ ResolvePaidSuppressInstructionInstruction98(ended,ended,endedControl,<>,s.atomic,lateAtomicPlan,s.intent,emptySelection,lateEffect,{}) /\ ~ReserveSuppressInstructionAbility98(<>,<>,s.procedure,9001,s.definition,[s.context EXCEPT !.traversalControl=endedControl],s.option, LegalityFixture92(s.window,s.option),{},s.classification,s.intent,CardFacts9) /\ ~EnterSuppressInstructionInstruction98(<>,s.planning,s.imminent,s.plan,s.imminentPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets={301}], PaidEntryFixture95(s.plan,1000),s.intent,e,retained,s.selection) /\ ~ResolvePaidSuppressInstructionInstruction98(e,e,retained,<>,s.atomic,s.atomicPlan,s.intent,s.selection,[s.effect EXCEPT !.operation="NoEffects"],{}) /\ ~ReserveSuppressInstructionAbility98(<>,<>,s.procedure,9001,s.definition,[s.context EXCEPT !.traversalControl=retained],s.option, LegalityFixture92(s.window,s.option),{},s.classification,s.intent,CardFacts9) /\ ~ResolvePaidSuppressInstructionInstruction98([e EXCEPT !.id=21],e,s.context.traversalControl,<>,s.atomic,s.atomicPlan,s.intent,s.selection,s.effect,{}) /\ ~ResolvePaidSuppressInstructionInstruction98(e,e,s.context.traversalControl,<>,[s.atomic EXCEPT !.costPaid=FALSE],s.atomicPlan,s.intent,s.selection,[s.effect EXCEPT !.operation="NoEffects"],{}) /\ LET bad == [s.intent EXCEPT !.encounter.kind="ItemInspection"] IN ~EnterSuppressInstructionInstruction98(<>,s.planning,s.imminent,s.plan,s.imminentPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets={301}], PaidEntryFixture95(s.plan,1000),bad,e,s.context.traversalControl,NewSuppressInstructionSelection98(bad,s.imminentPlan,{301})) SuppressInstructionSpecimen0020StatusChecks98 == LET e == [OpenEncounter6(20,2,2,FALSE,"traversal",<<301,302,303>>) EXCEPT !.stage="Paid",!.paidReached=TRUE] allBarrierInstructionSuppressed == BarrierInstructionSuppressedEncounterFixture98(e,{301,302,303},50) grown == [allBarrierInstructionSuppressed EXCEPT !.order= <<301,302,303,304>>,!.usedSubIds=@ \cup {304},!.barrierInstructionSuppressedBy=[id \in DOMAIN @ \cup {304} |-> IF id=304 THEN 0 ELSE @[id]]] objects == [id \in {1,2,4,5,6,7,8,9} |-> CASE id=1 -> CardObject9("Specimen0099","Play",TRUE,"Up") [] id=2 -> [CardObject9("Specimen0020","Play",TRUE,"Up") EXCEPT !.activated=TRUE] [] id \in {4,5,6} -> CardObject9("Specimen0221","SideAHand",FALSE,"Down") [] id=7 -> CardObject9("Specimen0221","SideADeck",FALSE,"Down") [] id=8 -> [CardObject9("Specimen0172","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.targetSite="SchemaAtom082"] [] OTHER -> CardObject9("Specimen0256","Play",TRUE,"Up")] drawnObjects == [id \in (DOMAIN objects \ {7}) \cup {17} |-> IF id=17 THEN [CardObject9("Specimen0221","SideAHand",FALSE,"Down") EXCEPT !.loc="Hand"] ELSE objects[id]] discardedObjects == [id \in (DOMAIN objects \ {5,6}) \cup {15,16} |-> IF id \in {15,16} THEN [CardObject9("Specimen0221","SideADiscard",FALSE,"Up") EXCEPT !.loc="Discard"] ELSE objects[id]] Specimen0099 == SuppressInstructionAttemptFixture98("Specimen0099",1,983,9005,grown,drawnObjects,{304},"Ordinary","Last") barrierInstructionSuppressedFourth == BarrierInstructionSuppressedEncounterFixture98(grown,{304},1) firstBarrierInstructionSuppressed == BarrierInstructionSuppressedEncounterFixture98(e,{301},50) shrunk == WithFullySuppressInstruction6([firstBarrierInstructionSuppressed EXCEPT !.order= <<301>>]) subStage == [shrunk EXCEPT !.stage="BarrierInstructions"] completed == [subStage EXCEPT !.stage="Complete"] fresh == OpenEncounter6(21,2,2,FALSE,"next-encounter",<<301>>) IN /\ CardFacts9["Specimen0172"].kind="Attachment" /\ CardFacts9["Specimen0256"].kind="Support" /\ CardBatchTransfer8(objects,drawnObjects,{7},[id \in {7} |-> 17],DOMAIN objects,"SideAHand","Down",[id \in {7} |-> "Hand"]) /\ Cardinality({id \in DOMAIN drawnObjects : drawnObjects[id].zone="SideAHand"})=4 /\ UpdateEncounterSubs6(allBarrierInstructionSuppressed,grown,<<301,302,303,304>>,TRUE,{}) /\ EncounterSubStatus98(grown,304)="UnsuppressedBarrierInstructions" /\ grown.barrierInstructionSuppressedBy[304]=0 /\ \A id \in {301,302,303} : EncounterSubStatus98(grown,id)="BarrierInstructionSuppressed" /\ SuppressInstructionAttemptValid98(Specimen0099) /\ ResolvePaidSuppressInstructionInstruction98(grown,barrierInstructionSuppressedFourth,Specimen0099.context.traversalControl,<>,Specimen0099.atomic,Specimen0099.atomicPlan,Specimen0099.intent,Specimen0099.selection,Specimen0099.effect,{}) /\ barrierInstructionSuppressedFourth.barrierInstructionSuppressed={301,302,303,304} /\ barrierInstructionSuppressedFourth.barrierInstructionSuppressedBy[304]=1 /\ barrierInstructionSuppressedFourth.fullyBarrierInstructionSuppressed /\ barrierInstructionSuppressedFourth.fullyBy={50} /\ CardBatchTransfer8(objects,discardedObjects,{5,6},[id \in {5,6} |-> id+10],DOMAIN objects,"SideADiscard","Up",[id \in {5,6} |-> "Discard"]) /\ Cardinality({id \in DOMAIN discardedObjects : discardedObjects[id].zone="SideAHand"})=1 /\ UpdateEncounterSubs6(firstBarrierInstructionSuppressed,shrunk,<<301>>,TRUE,NewFullySuppressInstructionEvents6(firstBarrierInstructionSuppressed,shrunk)) /\ shrunk.order= <<301>> /\ shrunk.barrierInstructionSuppressed={301} /\ shrunk.usedSubIds={301,302,303} /\ CompleteEncounter6(subStage,completed,TRUE) /\ EncounterSubStatus98(completed,301)="BarrierInstructionSuppressed" /\ EncounterSubStatus98(completed,302)="UnsuppressedBarrierInstructions" /\ EncounterSubStatus98(completed,303)="UnsuppressedBarrierInstructions" /\ EncounterSubStatus98(completed,999)="Absent" /\ fresh.barrierInstructionSuppressed={} /\ fresh.barrierInstructionSuppressedBy[301]=0 /\ EncounterSubStatus98(fresh,301)="UnsuppressedBarrierInstructions" /\ EncounterSubStatus98(fresh,302)="Absent" /\ completed.barrierInstructionSuppressedBy[301]=50 SuppressInstructionGenericClassificationFixture98(plan) == [tag |-> "NormalizedInstructionSuppressInstruction",instruction |-> InstructionWindowRef93(plan),mode |-> "Ordinary",selector |-> "SchemaAtom016",minimumTargets |-> 1,maximumTargets |-> 1] SuppressInstructionNonPaidTargetChecks98 == LET e == BarrierInstructionSuppressedEncounterFixture98([OpenEncounter6(20,2,0,TRUE,"forced",<<301,302>>) EXCEPT !.stage="Paid",!.paidReached=TRUE],{301},50) control == SuppressInstructionControlFixture98(e) ruleStep == "StructuralSuppressInstructionRule98" rule == OpenInstruction93(8800,"Rule",0,RuleAbilitySource9(ruleStep),"NoValue",0,ruleStep,<<"SuppressInstructionOne">>,TRUE) classification == SuppressInstructionGenericClassificationFixture98(rule) intent == NewInstructionSuppressInstructionIntent98(rule,e,classification) imminent == [rule EXCEPT !.announced=TRUE,!.targets={302},!.phase="Imminent"] targets == [InstructionTargetsFixture93(rule) EXCEPT !.targets={302}] selection == NewSuppressInstructionSelection98(intent,imminent,{302}) barrierInstructionSuppressedImminent == [imminent EXCEPT !.targets={301}] IN /\ EnterRuleSuppressInstructionInstruction98(rule,imminent,ruleStep,e,control,classification,intent,targets,selection) /\ ~EnterRuleSuppressInstructionInstruction98(rule,barrierInstructionSuppressedImminent,ruleStep,e,control,classification,intent,[targets EXCEPT !.targets={301}],NewSuppressInstructionSelection98(intent,barrierInstructionSuppressedImminent,{301})) /\ ~EnterRuleSuppressInstructionInstruction98(rule,imminent,"ForeignRule98",e,control,classification,intent,targets,selection) /\ LET badClass == [classification EXCEPT !.instruction.source=RuleAbilitySource9("ForeignRule98")] badIntent == NewInstructionSuppressInstructionIntent98(rule,e,badClass) IN ~EnterRuleSuppressInstructionInstruction98(rule,imminent,ruleStep,e,control,badClass,badIntent,targets,NewSuppressInstructionSelection98(badIntent,imminent,{302})) /\ \A kind \in {"Conditional","BarrierInstruction","Play"} : LET parent == OpenAbilityResolution9(8810,kind,ObjectAbilitySource9(1),"Play",<<8801,8802>>,42) plan == OpenInstruction93(8801,"Ability",8810,parent.source,"Play",1,"NoValue",<<"SuppressInstructionOne">>,TRUE) c == SuppressInstructionGenericClassificationFixture98(plan) i == NewInstructionSuppressInstructionIntent98(plan,e,c) p == [plan EXCEPT !.announced=TRUE,!.targets={302},!.phase="Imminent"] a == [parent EXCEPT !.phase="Imminent",!.firstImminent=TRUE,!.detached=kind \in {"Conditional","BarrierInstruction"}] atomicP == [p EXCEPT !.phase="Resolving"] atomicA == [a EXCEPT !.phase="Resolving"] completeP == [atomicP EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"SuppressInstructionOne">>] between == [atomicA EXCEPT !.phase="Between"] next == OpenInstruction93(8802,"Ability",8810,parent.source,"Play",2,"NoValue",<<"SuppressInstructionOne">>,TRUE) nc == SuppressInstructionGenericClassificationFixture98(next) ni == NewInstructionSuppressInstructionIntent98(next,e,nc) np == [next EXCEPT !.announced=TRUE,!.targets={302},!.phase="Imminent"] na == [between EXCEPT !.cursor=2,!.phase="Imminent"] IN /\ EnterFirstSuppressInstructionInstruction98(parent,a,plan,p,e,control,c,i,[InstructionTargetsFixture93(plan) EXCEPT !.targets={302}],InstructionEntryFixture93(plan),NewSuppressInstructionSelection98(i,p,{302})) /\ ~EnterFirstSuppressInstructionInstruction98(parent,a,plan,[p EXCEPT !.targets={301}],e,control,c,i,[InstructionTargetsFixture93(plan) EXCEPT !.targets={301}],InstructionEntryFixture93(plan),NewSuppressInstructionSelection98(i,p,{301})) /\ NoInstructionInterrupt93(p,a,"NoValue",NoModifiersFixture95(p),InstructionClearanceFixture93(p,0,0)) /\ BeginAbilityInstructionAtomic93(a,atomicA,p,atomicP,InstructionClearanceFixture93(p,0,0)) /\ CarryAbilityInstructionStep93(atomicA,between,atomicP,completeP,[tag |-> "InstructionStepReturn",instruction |-> 8801,index |-> 1,step |-> "SuppressInstructionOne",complete |-> TRUE]) /\ EnterNextSuppressInstructionInstruction98(between,na,next,np,e,control,nc,ni,[InstructionTargetsFixture93(next) EXCEPT !.targets={302}],InstructionEntryFixture93(next),NewSuppressInstructionSelection98(ni,np,{302})) /\ ~EnterNextSuppressInstructionInstruction98(between,na,next,np,e,control,nc,ni,[InstructionTargetsFixture93(next) EXCEPT !.targets={302}], [InstructionEntryFixture93(next) EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE],NewSuppressInstructionSelection98(ni,np,{302})) BarrierInstructionReactionCheckpointChecks98 == LET g == SubGenericFixture98 objects == [id \in {2,5,6} |-> CASE id=2 -> [g.s.objects[2] EXCEPT !.activated=TRUE] [] id=5 -> [CardObject9("Specimen0110","Play",TRUE,"Up") EXCEPT !.activated=TRUE] [] OTHER -> CardObject9("Specimen0221","Play",TRUE,"Down")] definition == [ConditionalDefinitionFixture96(890,"Specimen0110","Trigger","Retireed","SchemaAtom016","SideB","SideA") EXCEPT !.syntax.source=ObjectAbilitySource9(5),!.activity.source=ObjectAbilitySource9(5)] subDefinitions == [id \in DOMAIN g.s.definitions \cup {890} |-> IF id=890 THEN definition ELSE g.s.definitions[id]] subActivity == SubActivityFixture98(g.s.e,objects,subDefinitions) s == [g.s EXCEPT !.objects=objects,!.definitions=subDefinitions,!.activity=subActivity] key == ConditionalKey96(definition) definitions == [k \in {key} |-> definition] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) EXCEPT !.present=@ \cup {101}] ledger == NewConditionalLedger96(initial) afterObjects == [id \in {2,5,16} |-> IF id=16 THEN [CardObject9("Specimen0221","SideADiscard",FALSE,"Up") EXCEPT !.loc="Discard"] ELSE objects[id]] afterMove == [ConditionalSnapshotFixture96(2,0,"AfterRetireSideAFacility",definitions,afterObjects) EXCEPT !.usedObjects=DOMAIN objects \cup DOMAIN afterObjects,!.present=@ \cup {101}] plan == [g.plan1 EXCEPT !.steps= <<"SideBRetireSideAFacility">>] imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"SideBRetireSideAFacility">>] event == [ConditionalEventFixture96(1005,"Retireed",6,"SideB","SideA",initial,2200) EXCEPT !.movement=[tag |-> "SourceZoneChange",oldObject |-> 6,newObject |-> 16,beforeSnapshot |-> initial]] events == [id \in {1005} |-> event] begin == [afterMove EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp == [ConditionalCheckpointFixture96(ledger,1,begin,current,events) EXCEPT !.caller=BarrierInstructionInstructionCaller98(g.done1)] occurrence == [definition |-> key,occurrence |-> 1005] allocation == [k \in {occurrence} |-> 9900] bindings == ConditionalBindingsFixture96({occurrence},1,990,99) pending == ConditionalCommittedFixture96(ledger,definitions,cp,allocation,bindings,Empty9) receipt == SubCPReceiptFixture98(g.done1,1) IN /\ objects[2].card="synthetic_two_instruction_barrier" /\ CardFacts9["Specimen0110"].kind="Facility" /\ SubStartValid98(s) /\ NoBarrierInstructionInterrupt98(g.p,g.cleared,<<>>,SubNoModifiersFixture98(g.p),SubClearanceFixture98(g.p,0,0)) /\ EnterFirstBarrierInstructionInstruction98(g.cleared,g.p1,s.e,s.control,s.state,objects,DOMAIN s.definitions,subActivity,[player \in SetupPlayers |-> 0],<<>>, plan,imminentPlan,[InstructionTargetsFixture93(plan) EXCEPT !.targets={}],InstructionEntryFixture93(plan)) /\ ResolveBarrierInstructionWithoutInterrupt98(g.p1,g.r1,<<>>,imminentPlan,resolvingPlan,NoModifiersFixture95(imminentPlan),InstructionClearanceFixture93(imminentPlan,0,0)) /\ CardBatchTransfer8(objects,afterObjects,{6},[id \in {6} |-> 16],DOMAIN objects,"SideADiscard","Up",[id \in {6} |-> "Discard"]) /\ CarryBarrierInstructionInstruction98(g.r1,g.done1,<<>>,resolvingPlan,completePlan, [tag |-> "InstructionStepReturn",instruction |-> 2200,index |-> 1,step |-> "SideBRetireSideAFacility",complete |-> TRUE]) /\ ConditionalActive96(definition,initial) /\ ConditionalActive96(definition,current) /\ ObserveConditionalActivity96(ledger,ledger,ledger,<<>>,<<>>,initial,afterMove) /\ ProcessConditionalCheckpoint96(ledger,pending,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ DOMAIN pending.instances={9900} /\ pending.instances[9900].status="Pending" /\ pending.instances[9900].member.mandatory /\ pending.instances[9900].member.windowId=990 /\ pending.instances[9900].member.source=ObjectAbilitySource9(5) /\ pending.instances[9900].occurrence=1005 /\ pending.lastSnapshot.objects=afterObjects /\ 6 \notin DOMAIN pending.lastSnapshot.objects /\ pending.lastSnapshot.objects[16].card="Specimen0221" /\ pending.lastSnapshot.objects[5]=objects[5] /\ receipt.id \in DOMAIN pending.checkpoints /\ receipt.complete /\ receipt.allNewerChainsComplete /\ receipt.caller=BarrierInstructionInstructionCaller98(g.done1) /\ pending.checkpoints[1].caller=receipt.caller /\ BarrierInstructionBarrierInstructionBound98(g.done1) /\ BarrierInstructionOwnerAtTop98(g.done1.owner,<<>>) /\ g.between=[g.done1 EXCEPT !.checkpoint=1,!.phase="Targets"] /\ ~ConditionalCheckpointDrained96(pending,<<>>,1) /\ ~BarrierInstructionInstructionCheckpoint98(g.done1,g.between,<<>>,pending,receipt) PublicationSpecimen0020Fixture98 == LET objects == [id \in 1..4 |-> IF id=1 THEN [CardObject9("Specimen0020","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE CardObject9(IF id=2 THEN "Specimen0221" ELSE IF id=3 THEN "Specimen0160" ELSE "Specimen0196","SideAHand",FALSE,"Down")] initial == NewBarrierInstructionOrder98(1,<<>>,Empty9,Empty9) grant == OrderGrantFixture98(10,"Specimen0020",1,1,"Static","Unspecified","Default",<>,TRUE,CardFacts9) rows == OrderRowsFixture98(<<8,1,5>>,grant,[id \in {8,1,5} |-> 1]) first == OrderGainFixture98(initial,1,grant,rows,<<8,1,5>>,<<8,1,5>>) growRows == OrderRowsFixture98(<<3>>,grant,[id \in {3} |-> 1]) grow == OrderResizeFixture98(first.after,2,10,4,growRows,<<8,1,5,3>>,<<3>>) shrink == OrderResizeFixture98(first.after,3,10,1,Empty9,first.after.spine,<<>>) freshRows == OrderRowsFixture98(<<40,41>>,grant,[id \in {40,41} |-> 1]) regain == OrderResizeFixture98(shrink.after,4,10,3,freshRows,<<8,1,5,40,41>>,<<40,41>>) IN [objects |-> objects,initial |-> initial,grant |-> grant,rows |-> rows,first |-> first,growRows |-> growRows,grow |-> grow,shrink |-> shrink,regain |-> regain] PublicationFixtureValid98(s) == /\ Cardinality({id \in DOMAIN s.objects : s.objects[id].zone="SideAHand"})=3 /\ OrderGainValidFixture98(s.first,s.objects,CardFacts9) /\ OrderResizeValidFixture98(s.grow) /\ OrderResizeValidFixture98(s.shrink) /\ OrderResizeValidFixture98(s.regain) PublicationGrowthChecks98 == LET s == PublicationSpecimen0020Fixture98 before == [OpenEncounter6(50,1,2,FALSE,"traversal",s.first.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE, !.barrierInstructionSuppressed={8,1,5},!.barrierInstructionSuppressedBy=[id \in {8,1,5} |-> 999],!.fullyBarrierInstructionSuppressed=TRUE,!.fullyBy={999}] after == [before EXCEPT !.order=s.grow.after.order,!.usedSubIds=@ \cup {3},!.barrierInstructionSuppressedBy=[id \in {8,1,5,3} |-> IF id=3 THEN 0 ELSE 999]] receipt == NewEncounterBarrierInstructionOrderPublication98(before,s.first.after,s.grow.after) IN /\ PublicationFixtureValid98(s) /\ BarrierInstructionOrderPublicationStep98(s.first.after,s.grow.after) /\ PublishEncounterBarrierInstructionOrder98(before,after,s.first.after,s.grow.after,receipt,{}) /\ ~PublishEncounterBarrierInstructionOrder98(before,[after EXCEPT !.order= <<3,8,1,5>>],s.first.after,s.grow.after,receipt,{}) /\ after.order= <<8,1,5,3>> /\ after.barrierInstructionSuppressed={8,1,5} /\ after.barrierInstructionSuppressedBy[3]=0 /\ 3 \notin after.barrierInstructionSuppressed /\ after.resolved=before.resolved /\ after.fullyBarrierInstructionSuppressed /\ after.fullyBy={999} /\ receipt.appliedStep.clock=2 /\ receipt.appliedStep.kind="SelfStaticResize" /\ receipt.beforeOrderState.history= <> PublicationShrinkAndNewEncounterChecks98 == LET s == PublicationSpecimen0020Fixture98 before == [OpenEncounter6(51,1,2,FALSE,"traversal",s.first.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE, !.barrierInstructionSuppressed={8},!.barrierInstructionSuppressedBy=[id \in {8,1,5} |-> IF id=8 THEN 999 ELSE 0]] after == WithFullySuppressInstruction6([before EXCEPT !.order=s.shrink.after.order]) receipt == NewEncounterBarrierInstructionOrderPublication98(before,s.first.after,s.shrink.after) newer == [OpenEncounter6(52,1,2,FALSE,"traversal",s.shrink.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE] newAfter == [newer EXCEPT !.order=s.regain.after.order,!.usedSubIds=@ \cup {40,41},!.barrierInstructionSuppressedBy=[id \in {8,40,41} |-> 0]] newReceipt == NewEncounterBarrierInstructionOrderPublication98(newer,s.shrink.after,s.regain.after) IN /\ PublicationFixtureValid98(s) /\ PublishEncounterBarrierInstructionOrder98(before,after,s.first.after,s.shrink.after,receipt,NewFullySuppressInstructionEvents6(before,after)) /\ after.order= <<8>> /\ after.barrierInstructionSuppressed={8} /\ after.usedSubIds={8,1,5} /\ s.shrink.after.present={8} /\ s.shrink.after.usedIds={8,1,5} /\ newer.usedSubIds={8} /\ newer.usedSubIds # s.shrink.after.usedIds /\ PublishEncounterBarrierInstructionOrder98(newer,newAfter,s.shrink.after,s.regain.after,newReceipt,{}) /\ newAfter.usedSubIds={8,40,41} /\ newAfter.barrierInstructionSuppressed={} /\ {1,5} \cap newAfter.usedSubIds={} /\ {1,5} \subseteq s.regain.after.usedIds /\ newAfter.order= <<8,40,41>> PublicationForeignReceiptChecks98 == LET s == PublicationSpecimen0020Fixture98 before == [OpenEncounter6(50,1,2,FALSE,"traversal",s.first.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE] after == [before EXCEPT !.order=s.grow.after.order,!.usedSubIds=@ \cup {3},!.barrierInstructionSuppressedBy=[id \in {8,1,5,3} |-> 0]] receipt == NewEncounterBarrierInstructionOrderPublication98(before,s.first.after,s.grow.after) foreignFirst == OrderGainFixture98(s.initial,7,s.grant,s.rows,<<8,1,5>>,<<8,1,5>>) foreignGrow == OrderResizeFixture98(foreignFirst.after,2,10,4,s.growRows,<<8,1,5,3>>,<<3>>) foreignPriorReceipt == NewEncounterBarrierInstructionOrderPublication98(before,foreignFirst.after,foreignGrow.after) otherRows == OrderRowsFixture98(<<4>>,s.grant,[id \in {4} |-> 1]) otherGrow == OrderResizeFixture98(s.first.after,8,10,4,otherRows,<<8,1,5,4>>,<<4>>) foreignAfterReceipt == NewEncounterBarrierInstructionOrderPublication98(before,s.first.after,otherGrow.after) foreignEncounter == [OpenEncounter6(99,1,2,FALSE,"traversal",s.first.after.order) EXCEPT !.stage="Paid",!.paidReached=TRUE] foreignEncounterReceipt == NewEncounterBarrierInstructionOrderPublication98(foreignEncounter,s.first.after,s.grow.after) IN /\ PublicationFixtureValid98(s) /\ PublishEncounterBarrierInstructionOrder98(before,after,s.first.after,s.grow.after,receipt,{}) /\ OrderGainValidFixture98(foreignFirst,s.objects,CardFacts9) /\ OrderResizeValidFixture98(foreignGrow) /\ BarrierInstructionOrderPublicationStep98(foreignFirst.after,foreignGrow.after) /\ OrderResizeValidFixture98(otherGrow) /\ BarrierInstructionOrderPublicationStep98(s.first.after,otherGrow.after) /\ foreignFirst.after.order=s.first.after.order /\ foreignFirst.after.clock=s.first.after.clock /\ foreignFirst.after.history # s.first.after.history /\ otherGrow.after.order # s.grow.after.order /\ ~PublishEncounterBarrierInstructionOrder98(before,after,s.first.after,s.grow.after,foreignPriorReceipt,{}) /\ ~PublishEncounterBarrierInstructionOrder98(before,after,s.first.after,s.grow.after,foreignAfterReceipt,{}) /\ ~PublishEncounterBarrierInstructionOrder98(before,after,s.first.after,s.grow.after,foreignEncounterReceipt,{}) BarrierInstructionNormalOrderBoundaryChecks98 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) reversed == SubCurrentOrderFixture98(s.loop,s.e,<<102,101>>) p == NewBarrierInstructionBarrierInstruction98(8000,102,s.state.definitions[102],s.e,SubOwnerFixture98,"Play") IN /\ SubStartValid98(s) /\ s.loop.exampleFamily062=0 /\ p.barrierInstruction=102 /\ p.definition=s.state.definitions[102] /\ s.selected=[s.loop EXCEPT !.current=8000,!.usedInstances={8000}] /\ ~SelectNextBarrierInstruction98(s.loop,s.selected,p,s.e,s.control,"ProcedureCodef1914978bb8e",s.state,reversed,8000,{},s.objects,DOMAIN s.definitions,s.activity,[player \in SetupPlayers |-> 0],<<>>) BarrierInstructionChecks9 == BarrierInstructionNormalOrderBoundaryChecks98 /\ OrderSpecimen0134Checks98 /\ OrderSubtypeClass080ManualChecks98 /\ OrderSpecimen0139Specimen0037Checks98 /\ OrderSpecimen0020ProfileChecks98 /\ OrderSpecimen0108TLDRChecks98 /\ OrderLaterManualCopyChecks98 /\ OrderSelfBeforeSchemaChecks98 /\ OrderMixedStaticCopyChecks98 /\ OrderOriginBindingChecks98 /\ BarrierInstructionResolutionChecks98 /\ SuppressInstructionHookExampleChecks98 /\ SuppressInstructionAllAndOrdinaryChecks98 /\ SuppressInstructionEndedAndProfileChecks98 /\ SuppressInstructionSpecimen0020StatusChecks98 /\ SuppressInstructionNonPaidTargetChecks98 /\ BarrierInstructionReactionCheckpointChecks98 /\ PublicationGrowthChecks98 /\ PublicationShrinkAndNewEncounterChecks98 /\ PublicationForeignReceiptChecks98 WouldAfterFixture99(before,contextId,imminence,ref,worldId,effects,groups,periods,order,receipt) == LET keys == {groups[id] : id \in DOMAIN effects} owner == [imminenceId |-> imminence,context |-> WouldContextKey99(ref)] observations == [i \in 1..Len(order) |-> [group |-> groups[order[i]],descriptor |-> WouldDescriptor99(effects[order[i]]), periods |-> periods,serial |-> before.serial+i,reference |-> ref,snapshotId |-> worldId]] IN [before EXCEPT !.groups=ReplacementOverlay99(@,[key \in keys |-> owner]),!.evidence=@ \o observations, !.serial=@+Len(order),!.observationIds=@ \cup {receipt.id},!.observations=ReplacementOverlay99(@,[key \in {receipt.id} |-> receipt]), !.latest=ReplacementOverlay99(@,[key \in {contextId} |-> receipt])] InitialCaptureAfterFixture99(before,context,receipt) == WouldAfterFixture99(before,context.id,context.imminenceId,context.initialRef,context.initialWorld,context.initialEffects, context.initialWouldGroups,context.initialPeriods,InitialWouldOrder99(context),receipt) InitialHistoryFixture99(context) == InitialCaptureAfterFixture99(NewWouldAccounting99,context,InitialWouldObservation99(context,context.id)) ValueEffectFixture99(id,kind,value,damageType,preventable,source) == [id |-> id,kind |-> kind,value |-> value,damageType |-> damageType,preventable |-> preventable,unpreventable |-> ~preventable, source |-> ObjectAbilitySource9(source),actor |-> "SideA",target |-> "SideB", specifications |-> [timing |-> "ImminentInstruction",targetRestriction |-> "OriginalTarget",cannotPrevent |-> ~preventable], restrictions |-> IF preventable THEN {"RetainOriginalSpecifications"} ELSE {"CannotBePrevented","RetainOriginalSpecifications"}, lineage |-> [root |-> id,parent |-> 0,ancestors |-> {},opaqueParentField |-> "MustSurvive"], opaqueField |-> [a |-> <<1,2>>,b |-> {3,4}]] ValueMapFixture99(effect) == [id \in {effect.id} |-> effect] ResolvedValueFixture99(id,source,kind,operation,before,after) == [tag |-> "ResolvedInterruptEffectModification",status |-> "Resolved",classification |-> "Interrupt",abilityKind |-> kind, id |-> id,abilityInstance |-> 8000+id,source |-> ObjectAbilitySource9(source),operation |-> operation, beforeEffects |-> before,afterEffects |-> after,revisionBefore |-> 0,revisionAfter |-> 1, instruction |-> InstructionWindowRef93(OpenInstruction93(700,"Ability",800,ObjectAbilitySource9(50),"Play",1,"NoValue",<<"ValueFixture">>,FALSE))] ValueSpecimen0147Checks99 == LET initial == ValueMapFixture99(ValueEffectFixture99(1,"Damage",1,"HarmClassB",TRUE,1)) spoofed == [initial EXCEPT ![1].value=-1] firstExampleFamily010 == [spoofed EXCEPT ![1].value=0] secondExampleFamily010 == [firstExampleFamily010 EXCEPT ![1].value=1] IN /\ CardFacts9["Specimen0147"].kind="Facility" /\ CardFacts9["Specimen0032"].kind="Support" /\ CardFacts9["Specimen0238"].kind="Objective" /\ PreventExpectedAmount99(initial,spoofed,1,2) /\ ModifyExpectedEffectValue99(spoofed,firstExampleFamily010,1,1) /\ ModifyExpectedEffectValue99(firstExampleFamily010,secondExampleFamily010,1,1) /\ \A effects \in {initial,spoofed,firstExampleFamily010,secondExampleFamily010} : DOMAIN effects={1} /\ ExpectedValuePresent99(effects,1) /\ <>= <<1,-1,0,1>> /\ ActualExpectedEffects99(spoofed)=Empty9 /\ ActualExpectedEffects99(firstExampleFamily010)=Empty9 /\ ActualExpectedEffects99(secondExampleFamily010)=secondExampleFamily010 /\ \A kind \in {"Damage","ExposureMarkers"} : \A value \in -2..3 : \A amount \in 0..3 : LET before == ValueMapFixture99(ValueEffectFixture99(1,kind,value,IF kind="Damage" THEN "HarmClassB" ELSE "NoValue",TRUE,1)) after == [before EXCEPT ![1].value=value-amount] IN /\ PreventExpectedAmount99(before,after,1,amount) /\ 1 \in DOMAIN after /\ after[1].value=value-amount /\ (1 \in DOMAIN ActualExpectedEffects99(after))=(value-amount>0) ValueWholePreventionChecks99 == LET exampleFamily015 == ValueMapFixture99(ValueEffectFixture99(1,"Damage",2,"HarmClassB",TRUE,1)) exampleFamily008 == Empty9 trash == ValueMapFixture99(ValueEffectFixture99(2,"RetireCard",0,"NoValue",TRUE,2)) cost == ValueMapFixture99(ValueEffectFixture99(3,"Cost",2,"NoValue",TRUE,2)) reducedCost == [cost EXCEPT ![3].value=1] IN /\ CardFacts9["Specimen0155"].kind="Equipment" /\ CardFacts9["Specimen0050"].kind="Support" /\ PreventExpectedAllDamageOrExposureMarkers99(exampleFamily015,exampleFamily008,1) /\ DOMAIN exampleFamily008={} /\ ~ExpectedValuePresent99(exampleFamily008,1) /\ ~SetExpectedEffectValue99(exampleFamily008,exampleFamily008,1,3) /\ PreventExpectedWhole99(trash,Empty9,2) /\ ~ExpectedValuePresent99(trash,2) /\ ~PreventExpectedAmount99(cost,reducedCost,3,1) /\ \A kind \in {"Damage","ExposureMarkers"} : \A value \in -2..2 : LET before == ValueMapFixture99(ValueEffectFixture99(1,kind,value,IF kind="Damage" THEN "HarmClassA" ELSE "NoValue",TRUE,1)) IN PreventExpectedAllDamageOrExposureMarkers99(before,Empty9,1) ValueSpecimen0039AndSpecimen0091Checks99 == LET exampleFamily014Damage == ValueEffectFixture99(1,"Damage",1,"HarmClassB",TRUE,1) stackRetire == [ValueEffectFixture99(2,"RetireTopDrawPile",0,"NoValue",TRUE,1) EXCEPT !.target="TopOfSideBDrawPile"] exampleFamily014 == [id \in {1,2} |-> IF id=1 THEN exampleFamily014Damage ELSE stackRetire] reduced == [exampleFamily014 EXCEPT ![1].value=-1] actual == [id \in {2} |-> stackRetire] exampleFamily020Damage == ValueEffectFixture99(1,"Damage",2,"HarmClassB",FALSE,20) NeutralValue00008 == [id \in {1,2,3} |-> CASE id=1 -> exampleFamily020Damage [] id=2 -> ValueEffectFixture99(2,"RetireEquipment",0,"NoValue",TRUE,20) [] OTHER -> ValueEffectFixture99(3,"EndTraversal",0,"NoValue",TRUE,20)] moreSpecimen0091 == [NeutralValue00008 EXCEPT ![1].value=3] illegalPrevent == [NeutralValue00008 EXCEPT ![1].value=0] illegalRemove == [id \in {2,3} |-> NeutralValue00008[id]] changedSpecifications == [moreSpecimen0091 EXCEPT ![1].preventable=TRUE,![1].unpreventable=FALSE,![1].specifications.cannotPrevent=FALSE, ![1].restrictions={},![1].source=ObjectAbilitySource9(7),![1].lineage.opaqueParentField="Changed"] changedOtherEffect == [moreSpecimen0091 EXCEPT ![2].kind="RetireTechnique"] IN /\ CardFacts9["Specimen0039"].kind="Facility" /\ CardFacts9["NeutralValue00008"].kind="Barrier" /\ PreventExpectedAmount99(exampleFamily014,reduced,1,2) /\ ActualExpectedEffects99(reduced)=actual /\ actual[2]=exampleFamily014[2] /\ actual[2].kind="RetireTopDrawPile" /\ ModifyExpectedEffectValue99(NeutralValue00008,moreSpecimen0091,1,1) /\ moreSpecimen0091[1].value=3 /\ ~moreSpecimen0091[1].preventable /\ moreSpecimen0091[1].unpreventable /\ moreSpecimen0091[1].specifications=exampleFamily020Damage.specifications /\ moreSpecimen0091[1].restrictions=exampleFamily020Damage.restrictions /\ moreSpecimen0091[1].source=ObjectAbilitySource9(20) /\ moreSpecimen0091[1].lineage=exampleFamily020Damage.lineage /\ moreSpecimen0091[1].opaqueField=exampleFamily020Damage.opaqueField /\ moreSpecimen0091[2]=NeutralValue00008[2] /\ moreSpecimen0091[3]=NeutralValue00008[3] /\ ExpectedEffectsValid99(changedSpecifications) /\ ~ModifyExpectedEffectValue99(NeutralValue00008,changedSpecifications,1,1) /\ ExpectedEffectsValid99(changedOtherEffect) /\ ~ModifyExpectedEffectValue99(NeutralValue00008,changedOtherEffect,1,1) /\ ~PreventExpectedAmount99(NeutralValue00008,illegalPrevent,1,2) /\ ~PreventExpectedWhole99(NeutralValue00008,illegalRemove,1) ValueExampleFamily091Checks99 == LET initial == ValueMapFixture99(ValueEffectFixture99(1,"Damage",3,"HarmClassA",TRUE,50)) earlierIncrease == [initial EXCEPT ![1].value=7] earlierPrevention == [earlierIncrease EXCEPT ![1].value=5] reset == [earlierPrevention EXCEPT ![1].value=1] later == [reset EXCEPT ![1].value=3] wrongAdditiveReset == [earlierPrevention EXCEPT ![1].value=6] operation == ExpectedValueOperationReceipt99(5,"ExampleFamily091HarmClassAToOne",ObjectAbilitySource9(7),1,earlierPrevention,reset) IN /\ CardFacts9["Specimen0031"].kind="Support" /\ ModifyExpectedEffectValue99(initial,earlierIncrease,1,4) /\ PreventExpectedAmount99(earlierIncrease,earlierPrevention,1,2) /\ ExampleFamily091Relevant99(earlierPrevention,1) /\ ExampleFamily091HarmClassAToOne99(earlierPrevention,reset,1) /\ reset[1].value=1 /\ reset[1].source=initial[1].source /\ reset[1].specifications=initial[1].specifications /\ ~ExampleFamily091HarmClassAToOne99(earlierPrevention,wrongAdditiveReset,1) /\ ModifyExpectedEffectValue99(reset,later,1,2) /\ later[1].value=3 /\ operation.operation="ExampleFamily091HarmClassAToOne" /\ operation.beforeEffects[1].value=5 /\ operation.afterEffects[1].value=1 /\ \A damageType \in {"HarmClassA","HarmClassB","PersistentCapacityHarm"} : \A value \in -1..3 : \A preventable \in BOOLEAN : LET before == ValueMapFixture99(ValueEffectFixture99(1,"Damage",value,damageType,preventable,50)) after == [before EXCEPT ![1].value=1] IN /\ ExampleFamily091Relevant99(before,1)=(damageType="HarmClassA" /\ value>=2 /\ preventable) /\ ExampleFamily091HarmClassAToOne99(before,after,1)=ExampleFamily091Relevant99(before,1) ValueExampleFamily025AndPositiveObservationChecks99 == LET initial == ValueMapFixture99(ValueEffectFixture99(1,"Damage",2,"HarmClassB",TRUE,50)) one == [initial EXCEPT ![1].value=1] zero == [one EXCEPT ![1].value=0] removed == Empty9 exampleFamily042First == ResolvedValueFixture99(1,8,"Paid","PreventAmount",initial,one) exampleFamily042Second == ResolvedValueFixture99(2,8,"Paid","PreventAmount",one,zero) exampleFamily025Zero == ResolvedValueFixture99(3,7,"Conditional","PreventWhole",zero,removed) exampleFamily025Positive == ResolvedValueFixture99(4,7,"Conditional","PreventWhole",initial,removed) foreignExampleFamily025 == [exampleFamily025Positive EXCEPT !.source=ObjectAbilitySource9(9)] exampleFamily025Objects == [id \in {7,9} |-> CardObject9("Specimen0104","Play",TRUE,"Up")] exposureMarkers == ValueMapFixture99(ValueEffectFixture99(2,"ExposureMarkers",2,"NoValue",TRUE,50)) oneExposureMarker == [exposureMarkers EXCEPT ![2].value=1] Specimen0070 == ResolvedValueFixture99(5,10,"Paid","PreventAmount",exposureMarkers,oneExposureMarker) exposureMarkerObservations == PositivePreventionObservations99(exposureMarkers,oneExposureMarker,Specimen0070) IN /\ CardFacts9["Specimen0011"].kind="Attachment" /\ CardFacts9["Specimen0181"].kind="Equipment" /\ CardFacts9["Specimen0104"].kind="Support" /\ PreventExpectedAmount99(initial,one,1,1) /\ PreventExpectedAmount99(one,zero,1,1) /\ PreventExpectedWhole99(zero,removed,1) /\ ~ExampleFamily025PreventionObserved99(zero,removed,ObjectAbilitySource9(7),exampleFamily025Zero) /\ PositivePreventionObservations99(zero,removed,exampleFamily025Zero)={} /\ ~ExpectedValuePresent99(removed,1) /\ ~SetExpectedEffectValue99(removed,removed,1,1) /\ ~ExampleFamily025PreventionObserved99(initial,one,ObjectAbilitySource9(7),exampleFamily042First) /\ ~ExampleFamily025PreventionObserved99(one,zero,ObjectAbilitySource9(7),exampleFamily042Second) /\ PreventExpectedWhole99(initial,removed,1) /\ ExampleFamily025PreventionObserved99(initial,removed,ObjectAbilitySource9(7),exampleFamily025Positive) /\ exampleFamily025Objects[7].card=exampleFamily025Objects[9].card /\ ~ExampleFamily025PreventionObserved99(initial,removed,ObjectAbilitySource9(7),foreignExampleFamily025) /\ ~ExampleFamily025PreventionObserved99(initial,removed,ObjectAbilitySource9(7),[exampleFamily025Positive EXCEPT !.status="Imminent"]) /\ ~ExampleFamily025PreventionObserved99(initial,removed,ObjectAbilitySource9(7),[exampleFamily025Positive EXCEPT !.classification="OrdinaryAbility"]) /\ ~ExampleFamily025PreventionObserved99(initial,removed,ObjectAbilitySource9(7),[exampleFamily025Positive EXCEPT !.beforeEffects=zero]) /\ PreventExpectedAmount99(exposureMarkers,oneExposureMarker,2,1) /\ Cardinality(exposureMarkerObservations)=1 /\ \A event \in exposureMarkerObservations : event.kind="AvoidExposureMarker" /\ event.amount=1 /\ event.source=ObjectAbilitySource9(10) /\ \A value \in -2..0 : LET before == ValueMapFixture99(ValueEffectFixture99(1,"Damage",value,"HarmClassB",TRUE,50)) after == [before EXCEPT ![1].value=value-1] numeric == ResolvedValueFixture99(10,7,"Conditional","PreventAmount",before,after) whole == ResolvedValueFixture99(11,7,"Conditional","PreventWhole",before,removed) IN /\ PreventExpectedAmount99(before,after,1,1) /\ PreventExpectedWhole99(before,removed,1) /\ PreventedPositiveAmount99(before,after,1)=0 /\ PreventedPositiveAmount99(before,removed,1)=0 /\ PositivePreventionObservations99(before,after,numeric)={} /\ PositivePreventionObservations99(before,removed,whole)={} /\ ~ExampleFamily025PreventionObserved99(before,after,ObjectAbilitySource9(7),numeric) /\ ~ExampleFamily025PreventionObserved99(before,removed,ObjectAbilitySource9(7),whole) ValueCostEscalatingResourceContestAndOpaqueChecks99 == \A value \in -3..3 : LET damage == ValueEffectFixture99(1,"Damage",value,"HarmClassA",TRUE,1) exposureMarkers == ValueEffectFixture99(2,"ExposureMarkers",value,"NoValue",TRUE,1) cost == ValueEffectFixture99(3,"Cost",value,"NoValue",TRUE,1) trace == ValueEffectFixture99(4,"EscalatingResourceContest",value,"NoValue",TRUE,1) other == ValueEffectFixture99(5,"RetireTopDrawPile",0,"NoValue",TRUE,1) effects == [id \in 1..5 |-> CASE id=1 -> damage [] id=2 -> exposureMarkers [] id=3 -> cost [] id=4 -> trace [] OTHER -> other] actual == ActualExpectedEffects99(effects) changed == [effects EXCEPT ![1].value=value+2] IN /\ ExpectedEffectsValid99(effects) /\ ModifyExpectedEffectValue99(effects,changed,1,2) /\ changed[1]=[damage EXCEPT !.value=value+2] /\ \A id \in 2..5 : changed[id]=effects[id] /\ (1 \in DOMAIN actual)=(value>0) /\ (2 \in DOMAIN actual)=(value>0) /\ {3,4,5} \subseteq DOMAIN actual /\ actual[3].value=ModifiedCost(value,<<>>,<<>>) /\ actual[4]=trace /\ actual[4].value=value /\ actual[5]=other /\ \A kind \in {"Damage","ExposureMarkers"} : \A nonpositive \in -2..0 : LET before == ValueMapFixture99(ValueEffectFixture99(1,kind,nonpositive,IF kind="Damage" THEN "HarmClassA" ELSE "NoValue",TRUE,1)) after == [before EXCEPT ![1].value=nonpositive-1] numeric == ResolvedValueFixture99(20,10,"Paid","PreventAmount",before,after) whole == ResolvedValueFixture99(21,10,"Paid","PreventWhole",before,Empty9) IN /\ PositivePreventionObservations99(before,after,numeric)={} /\ PositivePreventionObservations99(before,Empty9,whole)={} ReplacementAtomFixture99(id,lineage,kind,targeted,target) == [id |-> id,lineage |-> lineage,kind |-> kind,targeted |-> targeted,targetCard |-> target, baseController |-> "SideB",baseOrigin |-> RuleAbilitySource9("ProcedureCoded75d879e00ff"),actor |-> "SideB"] ReplacementBlueprintFixture99(id,source,card,pattern,behavior) == [id |-> id,source |-> ObjectAbilitySource9(source),card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA, pattern |-> pattern,behavior |-> behavior] ReplacementWorldFixture99(id,controller) == [id |-> id,controllers |-> [card \in {4,5,6,7,8} |-> IF card=4 THEN controller ELSE IF card=8 THEN "SideA" ELSE "SideB"]] ReplacementStepFixture99(before,effect,replacements,world,chosen,resultIds) == LET decision == ReplacementDecision99(before,effect,replacements,world,chosen,resultIds) IN [decision |-> decision,after |-> ReplacementNextState99(before,effect,replacements,chosen,resultIds,decision)] ReplacementOneTraceFixture99(effect,decision) == <<[effectId |-> effect,decision |-> decision]>> ReplacementExampleFamily073Checks99 == LET world == ReplacementWorldFixture99(1,"SideA") effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"AddToObjectiveArea",FALSE,0), [affectedCard |-> 4,actor |-> "SideB",objectiveCounters |-> 0,objectiveArea |-> "SideB",fromZone |-> "SchemaAtom082",claimObjective |-> TRUE]) replacement == ReplacementBlueprintFixture99(10,4,"Specimen0187",[kind |-> "AddToObjectiveArea",affectedCard |-> 4], [mode |-> "Patch",fields |-> [objectiveCounters |-> 4]]) replacements == [id \in {10} |-> replacement] before == NewReplacementState99([id \in {1} |-> effect]) first == ReplacementStepFixture99(before,1,replacements,world,10,<<1>>) repeat == ReplacementStepFixture99(first.after,1,replacements,world,10,<<1>>) numeric == [first.after EXCEPT !.effects[1].objectiveCounters=3] IN /\ ~effect.targeted /\ effect.affectedCard=4 /\ CardFacts9["Specimen0187"].kind="Objective" /\ ApplyReplacementStep99(before,first.after,1,replacements,world,first.decision) /\ first.after.effects[1].kind="AddToObjectiveArea" /\ first.after.effects[1].objectiveCounters=4 /\ first.after.effects[1].claimObjective /\ first.after.effects[1].baseOrigin=effect.baseOrigin /\ first.after.effects[1].baseController="SideB" /\ first.decision.controller="SideB" /\ first.decision.controller=effect.baseController /\ first.decision.eligible={10} /\ first.after.appliedPairs={<<10,1>>} /\ ReplacementStateValid99(numeric) /\ EligibleReplacements99(numeric,1,replacements)={} /\ ~ApplyReplacementStep99(first.after,repeat.after,1,replacements,world,repeat.decision) /\ PrepareReplacementEffects99(before,first.after,replacements,world,<>,ReplacementOneTraceFixture99(1,first.decision)) /\ ~PrepareReplacementEffects99(before,before,replacements,world,<>,<<>>) /\ LET wrong == [first.decision EXCEPT !.controller="SideA"] after == ReplacementNextState99(before,1,replacements,10,<<1>>,wrong) IN ~ApplyReplacementStep99(before,after,1,replacements,world,wrong) /\ LET wrong == [first.decision EXCEPT !.eligible={10,11}] after == ReplacementNextState99(before,1,replacements,10,<<1>>,wrong) IN ~ApplyReplacementStep99(before,after,1,replacements,world,wrong) /\ LET changedWorld == ReplacementWorldFixture99(2,"SideB") SchemaAtom187 == ReplacementStepFixture99(before,1,replacements,changedWorld,10,<<1>>) stale == [SchemaAtom187.decision EXCEPT !.worldSnapshotId=1] staleAfter == ReplacementNextState99(before,1,replacements,10,<<1>>,stale) IN /\ ApplyReplacementStep99(before,SchemaAtom187.after,1,replacements,changedWorld,SchemaAtom187.decision) /\ SchemaAtom187.decision.controller="SideB" /\ ~ApplyReplacementStep99(before,staleAfter,1,replacements,changedWorld,stale) ReplacementExampleFamily068Checks99 == LET world == [ReplacementWorldFixture99(1,"SideA") EXCEPT !.controllers[5]="SideA"] effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"Damage",FALSE,0), [baseController |-> "SideA",baseOrigin |-> ObjectAbilitySource9(8),origin |-> ObjectAbilitySource9(8), damageType |-> "HarmClassA",value |-> 3,actor |-> "SideA",targetSite |-> "SchemaAtom082",preventable |-> TRUE]) core == [kind |-> "Damage",targeted |-> FALSE,targetCard |-> 0,damageType |-> "PersistentCapacityHarm",value |-> 1, actor |-> "SideA",targetSite |-> "SchemaAtom082",preventable |-> TRUE,origin |-> ObjectAbilitySource9(8)] replacement == ReplacementBlueprintFixture99(10,5,"Specimen0249",[kind |-> "Damage",damageType |-> "HarmClassA",actor |-> "SideA",targetSite |-> "SchemaAtom082",minValue |-> 1], [mode |-> "Replace",results |-> <>]) replacements == [id \in {10} |-> replacement] before == NewReplacementState99([id \in {1} |-> effect]) first == ReplacementStepFixture99(before,1,replacements,world,10,<<2>>) noNet == [before EXCEPT !.effects[1].damageType="HarmClassB"] noMatch == ReplacementStepFixture99(noNet,1,replacements,world,10,<<2>>) zero == [before EXCEPT !.effects[1].value=0] zeroStep == ReplacementStepFixture99(zero,1,replacements,world,10,<<2>>) IN /\ CardFacts9["Specimen0249"].kind="Attachment" /\ ApplyCreatedReplacementImmediately99(before,first.after,replacements,10,world,<>,ReplacementOneTraceFixture99(1,first.decision)) /\ ~ApplyCreatedReplacementImmediately99(before,before,replacements,10,world,<>,<<>>) /\ DOMAIN first.after.effects={2} /\ first.after.effects[2].damageType="PersistentCapacityHarm" /\ first.after.effects[2].value=1 /\ first.after.effects[2].lineage=100 /\ first.after.effects[2].baseOrigin=effect.baseOrigin /\ first.after.effects[2].origin=effect.origin /\ first.decision.controller="SideA" /\ ReplacementPreparationComplete99(first.after,replacements) /\ ~ApplyReplacementStep99(noNet,noMatch.after,1,replacements,world,noMatch.decision) /\ ~ApplyReplacementStep99(zero,zeroStep.after,1,replacements,world,zeroStep.decision) /\ ApplyCreatedReplacementImmediately99(noNet,noNet,replacements,10,world,<>,<<>>) /\ LET another == [replacement EXCEPT !.id=20,!.pattern.damageType="PersistentCapacityHarm",!.behavior.results[1].damageType="HarmClassB"] rs == [id \in {20} |-> another] reused == ReplacementStepFixture99(first.after,2,rs,world,20,<<1>>) IN /\ 1 \notin DOMAIN first.after.effects /\ 1 \in first.after.usedEffectIds /\ ~ApplyReplacementStep99(first.after,reused.after,2,rs,world,reused.decision) /\ \A field \in {"kind","damageType","actor","targetSite"} : LET wrongValue == CASE field="kind" -> "ExposureMarkers" [] field="damageType" -> "HarmClassB" [] field="actor" -> "SideB" [] OTHER -> "SchemaAtom129" changed == [before EXCEPT !.effects[1][field]=wrongValue] step == ReplacementStepFixture99(changed,1,replacements,world,10,<<2>>) IN ~ApplyReplacementStep99(changed,step.after,1,replacements,world,step.decision) ReplacementInspectionFixture99(targetSite) == LET effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"Inspection",FALSE,0),[targetSite |-> targetSite,itemInspectionDirection |-> "SchemaAtom163"]) gain == [kind |-> "GainResourceUnits",targeted |-> FALSE,targetCard |-> 0,actor |-> "SideB",value |-> 2] ExampleFamily055Case == ReplacementBlueprintFixture99(10,5,"Specimen0214",[kind |-> "Inspection",targetSite |-> targetSite], [mode |-> "Replace",results |-> <>]) technique == [tag |-> "CompositeEffectTechnique",steps |-> << [tag |-> "EffectTechniqueStep",operation |-> "OptionalForceSideALoseResourceUnits",controller |-> "SideB",actor |-> "SideA",reads |-> {},maximum |-> 5,result |-> "ActualResourceUnitsLost"], [tag |-> "EffectTechniqueStep",operation |-> "SideBGainResourceUnitsPerActualLoss",reads |-> {1},multiplier |-> 2], [tag |-> "EffectTechniqueStep",operation |-> "SideBTakeExposureMarkers",reads |-> {},amount |-> 2]>>] exampleFamily059 == ReplacementBlueprintFixture99(11,6,"NeutralValue00002",[kind |-> "Inspection",targetSite |-> "SchemaAtom082"], [mode |-> "Replace",results |-> <<[kind |-> "CompositeTechnique",targeted |-> FALSE,targetCard |-> 0,actor |-> "SideB",technique |-> technique]>>]) exampleFamily058 == ReplacementBlueprintFixture99(12,7,"Specimen0218",[kind |-> "Inspection",targetSite |-> "SchemaAtom129"], [mode |-> "Patch",fields |-> [itemInspectionDirection |-> "Bottom"]]) IN [before |-> NewReplacementState99([id \in {1} |-> effect]),ExampleFamily055Case |-> ExampleFamily055Case,exampleFamily059 |-> exampleFamily059,exampleFamily058 |-> exampleFamily058] ReplacementInspectionChecks99 == LET world == ReplacementWorldFixture99(1,"SideA") s == ReplacementInspectionFixture99("SchemaAtom082") replacements == [id \in {10,11} |-> IF id=10 THEN s.ExampleFamily055Case ELSE s.exampleFamily059] ExampleFamily055Case == ReplacementStepFixture99(s.before,1,replacements,world,10,<<2>>) exampleFamily059 == ReplacementStepFixture99(s.before,1,replacements,world,11,<<2>>) r == ReplacementInspectionFixture99("SchemaAtom129") aDrawPile == [id \in {10,12} |-> IF id=10 THEN r.ExampleFamily055Case ELSE r.exampleFamily058] bottom == ReplacementStepFixture99(r.before,1,aDrawPile,world,12,<<1>>) gain == ReplacementStepFixture99(bottom.after,1,aDrawPile,world,10,<<2>>) direct == ReplacementStepFixture99(r.before,1,aDrawPile,world,10,<<2>>) IN /\ CardFacts9["Specimen0214"].kind="Support" /\ CardFacts9["NeutralValue00002"].kind="Action" /\ CardFacts9["Specimen0218"].kind="Action" /\ ExampleFamily055Case.decision.eligible={10,11} /\ ExampleFamily055Case.decision.controller="SideB" /\ PrepareReplacementEffects99(s.before,ExampleFamily055Case.after,replacements,world,<>,ReplacementOneTraceFixture99(1,ExampleFamily055Case.decision)) /\ PrepareReplacementEffects99(s.before,exampleFamily059.after,replacements,world,<>,ReplacementOneTraceFixture99(1,exampleFamily059.decision)) /\ ExampleFamily055Case.after.effects[2].kind="GainResourceUnits" /\ ExampleFamily055Case.after.effects[2].value=2 /\ exampleFamily059.after.effects[2].kind="CompositeTechnique" /\ exampleFamily059.after.effects[2].technique.steps[1].maximum=5 /\ ~ReplacementTechniqueValid99([exampleFamily059.after.effects[2].technique EXCEPT !.steps[1].reads={2}]) /\ exampleFamily059.after.effects[2].technique.steps[2].reads={1} /\ exampleFamily059.after.effects[2].technique.steps[2].multiplier=2 /\ ReplacementPreparationComplete99(ExampleFamily055Case.after,replacements) /\ ReplacementPreparationComplete99(exampleFamily059.after,replacements) /\ bottom.after.effects[1].kind="Inspection" /\ bottom.after.effects[1].itemInspectionDirection="Bottom" /\ EligibleReplacements99(bottom.after,1,aDrawPile)={10} /\ ~PrepareReplacementEffects99(r.before,bottom.after,aDrawPile,world,<>,ReplacementOneTraceFixture99(1,bottom.decision)) /\ PrepareReplacementEffects99(r.before,gain.after,aDrawPile,world,<>, <<[effectId |-> 1,decision |-> bottom.decision],[effectId |-> 1,decision |-> gain.decision]>>) /\ PrepareReplacementEffects99(r.before,direct.after,aDrawPile,world,<>,ReplacementOneTraceFixture99(1,direct.decision)) /\ direct.after.effects[2]=gain.after.effects[2] /\ gain.after.effects[2].kind="GainResourceUnits" /\ LET missing == ReplacementStepFixture99(ExampleFamily055Case.after,2,replacements,world,11,<<3>>) IN ~ApplyReplacementStep99(ExampleFamily055Case.after,missing.after,2,replacements,world,missing.decision) ReplacementLineageChecks99 == LET world == ReplacementWorldFixture99(1,"SideA") effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"AddToObjectiveArea",TRUE,4),[objectiveCounters |-> 0]) other == [effect EXCEPT !.id=2,!.lineage=200] before == NewReplacementState99([id \in {1,2} |-> IF id=1 THEN effect ELSE other]) exampleFamily073 == ReplacementBlueprintFixture99(10,4,"Specimen0187",[kind |-> "AddToObjectiveArea",targetCard |-> 4], [mode |-> "Patch",fields |-> [objectiveCounters |-> 4]]) split == [id |-> 20,source |-> RuleAbilitySource9("StructuralSplit99"),sourceSHA |-> "SyntheticStructuralControl", pattern |-> [kind |-> "AddToObjectiveArea"],behavior |-> [mode |-> "Replace",results |-> << [kind |-> "AddToObjectiveArea",targeted |-> TRUE,targetCard |-> 4,objectiveCounters |-> 4], [kind |-> "AddToObjectiveArea",targeted |-> TRUE,targetCard |-> 4,objectiveCounters |-> 4]>>]] firstRs == [id \in {10} |-> exampleFamily073] rs == [id \in {10,20} |-> IF id=10 THEN exampleFamily073 ELSE split] first == ReplacementStepFixture99(before,1,firstRs,world,10,<<1>>) independent == ReplacementStepFixture99(first.after,2,firstRs,world,10,<<2>>) divided == ReplacementStepFixture99(first.after,1,rs,world,20,<<3,4>>) repeat == ReplacementStepFixture99(divided.after,3,rs,world,10,<<3>>) collision == ReplacementStepFixture99(first.after,1,rs,world,20,<<2,4>>) IN /\ ApplyReplacementStep99(before,first.after,1,firstRs,world,first.decision) /\ first.after.effects[2]=other /\ first.after.usedEffectIds={1,2} /\ ApplyReplacementStep99(first.after,independent.after,2,firstRs,world,independent.decision) /\ independent.after.appliedPairs={<<10,1>>,<<10,2>>} /\ ApplyReplacementStep99(first.after,divided.after,1,rs,world,divided.decision) /\ DOMAIN divided.after.effects={2,3,4} /\ divided.after.effects[2]=other /\ divided.after.effects[3].lineage=100 /\ divided.after.effects[4].lineage=100 /\ divided.after.effects[3].baseOrigin=effect.baseOrigin /\ divided.after.effects[4].baseController="SideB" /\ EligibleReplacements99(divided.after,3,rs)={} /\ EligibleReplacements99(divided.after,4,rs)={} /\ EligibleReplacements99(divided.after,2,rs)={10,20} /\ ~ApplyReplacementStep99(divided.after,repeat.after,3,rs,world,repeat.decision) /\ ~ApplyReplacementStep99(first.after,collision.after,1,rs,world,collision.decision) /\ LET stale == [first.decision EXCEPT !.inputEffect.objectiveCounters=9] after == ReplacementNextState99(before,1,firstRs,10,<<1>>,stale) IN ~ApplyReplacementStep99(before,after,1,firstRs,world,stale) /\ LET foreign == [first.decision EXCEPT !.replacements[10].source=ObjectAbilitySource9(44)] after == ReplacementNextState99(before,1,firstRs,10,<<1>>,foreign) IN ~ApplyReplacementStep99(before,after,1,firstRs,world,foreign) ReplacementControllerChecks99 == LET world == [id |-> 7,activePlayer |-> "SideB",controllers |-> [card \in {4,5,6} |-> IF card=4 THEN "SideA" ELSE "SideB"]] effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"AddToObjectiveArea",TRUE,4),[objectiveCounters |-> 0]) r == [id |-> 10,source |-> ObjectAbilitySource9(5),sourceSHA |-> "SyntheticStructuralControl", pattern |-> [kind |-> "AddToObjectiveArea",targetCard |-> 4],behavior |-> [mode |-> "Patch",fields |-> [objectiveCounters |-> 4]]] r2 == [r EXCEPT !.id=11,!.source=ObjectAbilitySource9(6),!.behavior.fields.objectiveCounters=2] rs == [id \in {10,11} |-> IF id=10 THEN r ELSE r2] before == NewReplacementState99([id \in {1} |-> effect]) step == ReplacementStepFixture99(before,1,rs,world,10,<<1>>) wrongTarget == [before EXCEPT !.effects[1].targetCard=5] wrongStep == ReplacementStepFixture99(wrongTarget,1,rs,world,10,<<1>>) nonTarget == [before EXCEPT !.effects[1].targeted=FALSE] nonStep == ReplacementStepFixture99(nonTarget,1,rs,[world EXCEPT !.activePlayer="SideA"],10,<<1>>) IN /\ ApplyReplacementStep99(before,step.after,1,rs,world,step.decision) /\ step.decision.controller="SideA" /\ step.decision.eligible={10,11} /\ step.decision.controller # world.activePlayer /\ step.decision.controller # world.controllers[r.source.object] /\ ~ApplyReplacementStep99(wrongTarget,wrongStep.after,1,rs,world,wrongStep.decision) /\ ApplyReplacementStep99(nonTarget,nonStep.after,1,rs,[world EXCEPT !.activePlayer="SideA"],nonStep.decision) /\ nonStep.decision.controller="SideB" ReplacementSiblingAncestryChecks99 == LET world == ReplacementWorldFixture99(1,"SideA") effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"Specimen0139",FALSE,0),[stage |-> "Original"]) before == NewReplacementState99([id \in {1} |-> effect]) split == [id |-> 20,source |-> RuleAbilitySource9("StructuralSplit99"),sourceSHA |-> "SyntheticStructuralControl", pattern |-> [kind |-> "Specimen0139"],behavior |-> [mode |-> "Replace",results |-> << [kind |-> "Specimen0139",targeted |-> FALSE,targetCard |-> 0,stage |-> "Left"], [kind |-> "Specimen0139",targeted |-> FALSE,targetCard |-> 0,stage |-> "Right"]>>]] patch == [id |-> 30,source |-> RuleAbilitySource9("StructuralPatch99"),sourceSHA |-> "SyntheticStructuralControl", pattern |-> [kind |-> "Specimen0139"],behavior |-> [mode |-> "Patch",fields |-> [stage |-> "Changed"]]] rs == [id \in {20,30} |-> IF id=20 THEN split ELSE patch] divided == ReplacementStepFixture99(before,1,rs,world,20,<<2,3>>) left == ReplacementStepFixture99(divided.after,2,rs,world,30,<<2>>) right == ReplacementStepFixture99(left.after,3,rs,world,30,<<3>>) repeat == ReplacementStepFixture99(right.after,2,rs,world,30,<<2>>) prior == ReplacementStepFixture99(before,1,rs,world,30,<<1>>) laterSplit == ReplacementStepFixture99(prior.after,1,rs,world,20,<<2,3>>) priorRepeat == ReplacementStepFixture99(laterSplit.after,2,rs,world,30,<<2>>) IN /\ ApplyReplacementStep99(before,divided.after,1,rs,world,divided.decision) /\ divided.after.effects[2].lineage=100 /\ divided.after.effects[3].lineage=100 /\ divided.after.ancestry=[id \in {2,3} |-> {20}] /\ ApplyReplacementStep99(divided.after,left.after,2,rs,world,left.decision) /\ left.after.ancestry[2]={20,30} /\ left.after.ancestry[3]={20} /\ EligibleReplacements99(left.after,2,rs)={} /\ EligibleReplacements99(left.after,3,rs)={30} /\ ApplyReplacementStep99(left.after,right.after,3,rs,world,right.decision) /\ right.after.effects[2].stage="Changed" /\ right.after.effects[3].stage="Changed" /\ right.after.appliedPairs={<<20,1>>,<<30,2>>,<<30,3>>} /\ ~ApplyReplacementStep99(right.after,repeat.after,2,rs,world,repeat.decision) /\ ApplyReplacementStep99(before,prior.after,1,rs,world,prior.decision) /\ ApplyReplacementStep99(prior.after,laterSplit.after,1,rs,world,laterSplit.decision) /\ laterSplit.after.ancestry=[id \in {2,3} |-> {20,30}] /\ EligibleReplacements99(laterSplit.after,2,rs)={} /\ EligibleReplacements99(laterSplit.after,3,rs)={} /\ ~ApplyReplacementStep99(laterSplit.after,priorRepeat.after,2,rs,world,priorRepeat.decision) ReplacementEmptyResultChecks99 == LET world == ReplacementWorldFixture99(1,"SideA") effect == ReplacementOverlay99(ReplacementAtomFixture99(1,100,"Specimen0139",FALSE,0),[stage |-> "Original"]) before == NewReplacementState99([id \in {1} |-> effect]) emptyReplacement == [id |-> 20,source |-> RuleAbilitySource9("StructuralEmptyReplacement99"),sourceSHA |-> "SyntheticStructuralControl", pattern |-> [kind |-> "Specimen0139"],behavior |-> [mode |-> "Replace",results |-> <<>>]] rs == [id \in {20} |-> emptyReplacement] empty == ReplacementStepFixture99(before,1,rs,world,20,<<>>) oneReplacement == [emptyReplacement EXCEPT !.behavior.results= <<[kind |-> "Specimen0139",targeted |-> FALSE,targetCard |-> 0,stage |-> "Replaced"]>>] oneRs == [id \in {20} |-> oneReplacement] omitted == ReplacementStepFixture99(before,1,oneRs,world,20,<<>>) extra == [effect EXCEPT !.id=2,!.lineage=200,!.kind="OtherSpecimen0139"] withOther == NewReplacementState99([id \in {1,2} |-> IF id=1 THEN effect ELSE extra]) keepOther == ReplacementStepFixture99(withOther,1,rs,world,20,<<>>) IN /\ ReplacementBlueprintValid99(20,emptyReplacement) /\ ReplacementOutputIdsValid99(before,effect,emptyReplacement,<<>>) /\ ~ReplacementOutputIdsValid99(before,effect,emptyReplacement,<<2>>) /\ ApplyReplacementStep99(before,empty.after,1,rs,world,empty.decision) /\ DOMAIN before.effects={1} /\ DOMAIN empty.after.effects={} /\ DOMAIN empty.after.ancestry={} /\ ReplacementStateValid99(empty.after) /\ empty.after.usedEffectIds={1} /\ empty.after.appliedPairs={<<20,1>>} /\ empty.after.transformations= <> /\ ReplacementPreparationComplete99(empty.after,rs) /\ PrepareReplacementEffects99(before,empty.after,rs,world,<>,ReplacementOneTraceFixture99(1,empty.decision)) /\ ApplyCreatedReplacementImmediately99(before,empty.after,rs,20,world,<>,ReplacementOneTraceFixture99(1,empty.decision)) /\ ~PrepareReplacementEffects99(before,before,rs,world,<>,<<>>) /\ DOMAIN omitted.after.effects={} /\ ReplacementStateValid99(omitted.after) /\ ~ApplyReplacementStep99(before,omitted.after,1,oneRs,world,omitted.decision) /\ ApplyReplacementStep99(withOther,keepOther.after,1,rs,world,keepOther.decision) /\ DOMAIN keepOther.after.effects={2} /\ keepOther.after.effects[2]=extra /\ keepOther.after.ancestry=[id \in {2} |-> {}] /\ keepOther.after.usedEffectIds={1,2} /\ ReplacementPreparationComplete99(keepOther.after,rs) ContinuousGebrFixture99 == LET syntax == [SyntaxFixture93(990,"Static","SideB","Equipment",<>) EXCEPT !.source=ObjectAbilitySource9(3)] definition == AbilityDefinition9(990,"Static",syntax.source,"Printed") replacement == [id |-> 900,kind |-> "Specimen0100Duration",definition |-> definition,syntax |-> syntax,sourceSHA |-> CardFacts9["Specimen0100"].sourceSHA] objects == [id \in {1,2,3} |-> IF id=3 THEN [CardObject9("Specimen0100","Play",TRUE,"Up") EXCEPT !.host=1] ELSE CardObject9("Specimen0189","Play",TRUE,"Up")] base == [mode |-> "Timed",originKind |-> "Paid",property |-> "Strength",boost |-> BarrierResponseCardBoost(1,1,20,FALSE,NoTimingRef9)] original == [id |-> 800,source |-> ObjectAbilitySource9(1),abilityInstance |-> 8100,base |-> base] current == [id |-> 1,turnId |-> 1,objects |-> objects,present |-> {990},ordinaryActivity |-> [key \in {ContinuousStaticKey99(definition,syntax)} |-> TRUE], activity |-> ActivityContext9,points |-> [player \in SetupPlayers |-> 0],maintainedEffects |-> [id \in {800} |-> original], activeOriginals |-> {800},liveEncounters |-> {20},liveDurations |-> {TimingRef9("Turn",1)}] comparison == [tag |-> "CurrentBoostDurationComparison",original |-> original,snapshotId |-> 1,turn |-> TimingRef9("Turn",1),shorterThanTurn |-> TRUE] extended == [base EXCEPT !.boost.hasExplicit=TRUE,!.boost.explicit=TimingRef9("Turn",1)] IN [replacement |-> replacement,objects |-> objects,base |-> base,original |-> original,current |-> current,comparison |-> comparison,extended |-> extended] DurationProjectionFixture99(original,replacement,current,effective,due) == [tag |-> "ContinuousDurationProjection",originalId |-> original.id,replacementId |-> replacement.id,snapshotId |-> current.id, base |-> original.base,effective |-> effective,replacementApplies |-> ContinuousOriginalActive99(original,current) /\ effective # original.base, cleanupDue |-> due,cleanupAt |-> IF due THEN "NextCheckpoint" ELSE "NoValue"] Specimen0100ContinuousChecks99 == LET s == ContinuousGebrFixture99 expiredBase == [s.current EXCEPT !.id=2,!.liveEncounters={}] stillExtended == DurationProjectionFixture99(s.original,s.replacement,expiredBase,s.extended,FALSE) movedHost == [expiredBase EXCEPT !.id=3,!.objects[3].host=2] reverted == DurationProjectionFixture99(s.original,s.replacement,movedHost,s.base,TRUE) uninstalledObjects == [id \in {1,2,13} |-> IF id=13 THEN CardObject9("Specimen0100","SideBDiscard",FALSE,"Up") ELSE s.objects[id]] uninstalled == [expiredBase EXCEPT !.id=4,!.objects=uninstalledObjects] inactiveReplacement == [expiredBase EXCEPT !.id=5,!.present={}] inactiveOriginal == [expiredBase EXCEPT !.id=6,!.activeOriginals={}] removedOriginal == [expiredBase EXCEPT !.id=9,!.maintainedEffects=Empty9,!.activeOriginals={}] turnEnded == [expiredBase EXCEPT !.id=7,!.liveDurations={}] IN /\ CardFacts9["Specimen0189"].kind="Technique" /\ CardFacts9["Specimen0100"].kind="Equipment" /\ ObserveSpecimen0100Duration99(s.original,s.replacement,s.current,s.comparison,DurationProjectionFixture99(s.original,s.replacement,s.current,s.extended,FALSE),CardFacts9) /\ ObserveSpecimen0100Duration99(s.original,s.replacement,expiredBase,[s.comparison EXCEPT !.snapshotId=2],stillExtended,CardFacts9) /\ stillExtended.effective.boost.explicit=TimingRef9("Turn",1) /\ stillExtended.base=s.base /\ ObserveSpecimen0100Duration99(s.original,s.replacement,movedHost,[s.comparison EXCEPT !.snapshotId=3],reverted,CardFacts9) /\ reverted.effective=s.base /\ reverted.cleanupDue /\ reverted.cleanupAt="NextCheckpoint" /\ movedHost.maintainedEffects[800]=s.original /\ s.original.base=s.base /\ ~s.original.base.boost.hasExplicit /\ ObserveSpecimen0100Duration99(s.original,s.replacement,uninstalled,[s.comparison EXCEPT !.snapshotId=4],DurationProjectionFixture99(s.original,s.replacement,uninstalled,s.base,TRUE),CardFacts9) /\ 3 \notin DOMAIN uninstalled.objects /\ uninstalled.objects[13].card="Specimen0100" /\ ObserveSpecimen0100Duration99(s.original,s.replacement,inactiveReplacement,[s.comparison EXCEPT !.snapshotId=5],DurationProjectionFixture99(s.original,s.replacement,inactiveReplacement,s.base,TRUE),CardFacts9) /\ ObserveSpecimen0100Duration99(s.original,s.replacement,inactiveOriginal,[s.comparison EXCEPT !.snapshotId=6],DurationProjectionFixture99(s.original,s.replacement,inactiveOriginal,s.base,TRUE),CardFacts9) /\ inactiveOriginal.maintainedEffects[800]=s.original /\ ObserveSpecimen0100Duration99(s.original,s.replacement,removedOriginal,[s.comparison EXCEPT !.snapshotId=9],DurationProjectionFixture99(s.original,s.replacement,removedOriginal,s.base,FALSE),CardFacts9) /\ ObserveSpecimen0100Duration99(s.original,s.replacement,turnEnded,[s.comparison EXCEPT !.snapshotId=7],DurationProjectionFixture99(s.original,s.replacement,turnEnded,s.extended,TRUE),CardFacts9) /\ ~ObserveSpecimen0100Duration99(s.original,s.replacement,movedHost,[s.comparison EXCEPT !.snapshotId=3],DurationProjectionFixture99(s.original,s.replacement,movedHost,s.extended,FALSE),CardFacts9) /\ ~ObserveSpecimen0100Duration99(s.original,s.replacement,movedHost,s.comparison,reverted,CardFacts9) /\ LET stale == [s.original EXCEPT !.base.boost.amount=2] comparison == [s.comparison EXCEPT !.original=stale] IN ~ObserveSpecimen0100Duration99(stale,s.replacement,s.current,comparison,DurationProjectionFixture99(stale,s.replacement,s.current,stale.base,FALSE),CardFacts9) /\ ~ObserveSpecimen0100Duration99(s.original,[s.replacement EXCEPT !.sourceSHA="ForeignRecord"],movedHost,[s.comparison EXCEPT !.snapshotId=3],reverted,CardFacts9) /\ LET notShorter == [s.comparison EXCEPT !.shorterThanTurn=FALSE] IN ObserveSpecimen0100Duration99(s.original,s.replacement,s.current,notShorter,DurationProjectionFixture99(s.original,s.replacement,s.current,s.base,FALSE),CardFacts9) /\ LET staticBase == [s.base EXCEPT !.mode="Continuous",!.originKind="Static"] staticOriginal == [s.original EXCEPT !.base=staticBase] current == [s.current EXCEPT !.id=8,!.maintainedEffects=[id \in {800} |-> staticOriginal]] comparison == [s.comparison EXCEPT !.original=staticOriginal,!.snapshotId=8] IN ObserveSpecimen0100Duration99(staticOriginal,s.replacement,current,comparison,DurationProjectionFixture99(staticOriginal,s.replacement,current,staticBase,FALSE),CardFacts9) ContinuousStaticChecks99 == LET syntax == SyntaxFixture93(991,"Static","SideB","Technique",<>) definition == AbilityDefinition9(991,"Static",syntax.source,"Printed") rule == "StructuralStaticReplacement99" replacementSyntax == [SyntaxFixture93(992,"Static","SideB","Equipment",<>) EXCEPT !.source=RuleAbilitySource9(rule)] replacement == [definition |-> AbilityDefinition9(992,"Static",replacementSyntax.source,"Printed"),syntax |-> replacementSyntax] objects == [id \in {1,5} |-> IF id=1 THEN CardObject9("Specimen0189","Play",TRUE,"Up") ELSE [form |-> "Counter",kind |-> "Power",host |-> 1]] parts == [id \in {10} |-> StaticPartFixture94(id,991,1,"Strength",{})] values == [id \in {10} |-> Specimen0189Values94(objects,1)[id]] original == [definition |-> definition,syntax |-> syntax,parts |-> parts,conditions |-> StaticSnapshotFixture94(syntax,Empty9),values |-> values] current == [id |-> 10,objects |-> objects,present |-> {991,992},ordinaryActivity |-> [key \in {ContinuousStaticKey99(definition,syntax),ContinuousStaticKey99(replacement.definition,replacementSyntax)} |-> TRUE], activity |-> [ActivityContext9 EXCEPT !.activeRules={rule}],points |-> [player \in SetupPlayers |-> 0]] base == [id \in {10} |-> StaticProjection94(syntax,parts[id],3)] changed == [base EXCEPT ![10].value=9] actual == [tag |-> "CurrentStaticReplacement",original |-> original,replacement |-> replacement,snapshotId |-> 10,base |-> base,values |-> [id \in {10} |-> 9]] off == [current EXCEPT !.id=11,!.activity.activeRules={}] originalOff == [current EXCEPT !.id=12,!.present={992}] IN /\ ObserveContinuousStaticReplacement99(original,replacement,current,actual,changed) /\ changed[10].ability=base[10].ability /\ changed[10].target=base[10].target /\ changed[10].property=base[10].property /\ ObserveContinuousStaticReplacement99(original,replacement,off,[actual EXCEPT !.snapshotId=11],base) /\ ObserveContinuousStaticReplacement99(original,replacement,originalOff,[actual EXCEPT !.snapshotId=12,!.base=Empty9,!.values=Empty9],Empty9) /\ ~ObserveContinuousStaticReplacement99(original,replacement,off,[actual EXCEPT !.snapshotId=11],changed) /\ ~ObserveContinuousStaticReplacement99(original,replacement,current,[actual EXCEPT !.original.syntax.source=ObjectAbilitySource9(2)],changed) /\ ~ObserveContinuousStaticReplacement99(original,replacement,current,[actual EXCEPT !.snapshotId=99],changed) /\ original.values[10]=3 /\ base[10].value=3 WouldOpeningFixture99(id,imminenceId,context,order) == [tag |-> "WouldEffectOpening",point |-> "BecameImminent",id |-> id,imminenceId |-> imminenceId,context |-> context, snapshotId |-> 100+id,order |-> order,imminence |-> [tag |-> "ActualInstructionImminence",id |-> imminenceId,context |-> WouldContextKey99(context),snapshotId |-> 100+id]] WouldPeriodFixture99(opening,period) == [tag |-> "WouldPeriodMembership",openingId |-> opening.id,context |-> WouldContextKey99(opening.context),period |-> period,procedureId |-> period.id, frame |-> CASE period.kind="Turn" -> [TurnFixture92("SideB") EXCEPT !.id=period.id] [] period.kind="SchemaAtom138" -> [TraversalFixture92("ProcedureCodef1914978bb8e") EXCEPT !.id=period.id] [] OTHER -> [tag |-> "TimingPeriodInstance",period |-> period,procedureId |-> period.id]] WouldEffectFixture99(kind,subtype,actor,amount,targetSite) == [kind |-> kind,subtype |-> subtype,actor |-> actor,amount |-> amount,targetSite |-> targetSite] WouldRowFixture99(id,root,opening,effect) == [tag |-> "EffectWouldImminence",id |-> id,root |-> root,context |-> WouldContextKey99(opening.context),snapshotId |-> opening.snapshotId,effect |-> effect] WouldCommittedFixture99(before,opening,periods,rows) == LET key == opening.imminenceId record == [id |-> opening.id,imminenceId |-> key,context |-> opening.context,snapshotId |-> opening.snapshotId,periods |-> periods,roots |-> {rows[id].root : id \in DOMAIN rows}] IN [before EXCEPT !.openings=[k \in DOMAIN @ \cup {key} |-> IF k=key THEN record ELSE @[k]], !.occurrences=[id \in DOMAIN @ \cup DOMAIN rows |-> IF id \in DOMAIN rows THEN NewWouldOccurrence99(rows[id],opening,periods,before.serial+OrderPosition99(opening.order,id)) ELSE @[id]], !.usedOccurrenceIds=@ \cup DOMAIN rows,!.usedOpeningIds=@ \cup {opening.id},!.usedImminenceIds=@ \cup {opening.imminenceId},!.serial=@+Len(opening.order)] ExampleFamily068CriterionFixture99 == [kind |-> "Damage",subtype |-> "HarmClassA",actor |-> "SideA",minimumPresent |-> TRUE,minimum |-> 1,targetSitePresent |-> TRUE,targetSite |-> "SchemaAtom082"] WouldExampleFamily068HistoryChecks99 == LET plan == [OpenInstruction93(8800,"Ability",8100,ObjectAbilitySource9(2),"Play",1,"NoValue",<<"SideANetDamage">>,FALSE) EXCEPT !.phase="Imminent"] first == WouldOpeningFixture99(10,1000,InstructionWindowRef93(plan),<<101>>) traversal == TimingRef9("SchemaAtom138",2) turn == TimingRef9("Turn",1) periods1 == [period \in {traversal,turn} |-> WouldPeriodFixture99(first,period)] net == WouldEffectFixture99("Damage","HarmClassA","SideA",1,"SchemaAtom082") rows1 == [id \in {101} |-> WouldRowFixture99(id,11,first,net)] h1 == WouldCommittedFixture99(NewWouldHistory99,first,periods1,rows1) revisionContext == [first.context EXCEPT !.revision=1] revision == [tag |-> "WouldExpectedEffectsRevision",imminenceId |-> 1000,openingId |-> 10,openingSnapshotId |-> first.snapshotId,context |-> revisionContext] exampleFamily017 == [PaidDefinitionFixture95(997,"Specimen0087",<<"Interrupt">>,<<[kind |-> "ResourceUnits",amount |-> 3]>>) EXCEPT !.syntax.source=ObjectAbilitySource9(6),!.activity.source=ObjectAbilitySource9(6)] prevented == [tag |-> "WouldEffectOutcome",imminenceId |-> 1000,openingId |-> 10,context |-> revisionContext,roots |-> {11},disposition |-> "Prevented", interruptSource |-> exampleFamily017.syntax.source,interruptAbility |-> 997,sourceSHA |-> CardFacts9["Specimen0087"].sourceSHA,beforeEffect |-> net,afterEffect |-> [net EXCEPT !.amount=0]] laterPlan == [plan EXCEPT !.abilityInstance=8101,!.source=ObjectAbilitySource9(7)] SchemaAtom187 == WouldOpeningFixture99(11,1001,InstructionWindowRef93(laterPlan),<<102>>) periods2 == [period \in {traversal,turn} |-> WouldPeriodFixture99(SchemaAtom187,period)] rows2 == [id \in {102} |-> WouldRowFixture99(id,12,SchemaAtom187,net)] h2 == WouldCommittedFixture99(h1,SchemaAtom187,periods2,rows2) attemptedRecount == WouldOpeningFixture99(12,1000,revisionContext,<<103>>) recountPeriods == [period \in {traversal,turn} |-> WouldPeriodFixture99(attemptedRecount,period)] recountRows == [id \in {103} |-> WouldRowFixture99(id,11,attemptedRecount,net)] recountOutput == WouldCommittedFixture99(h1,attemptedRecount,recountPeriods,recountRows) IN /\ CardFacts9["Specimen0249"].kind="Attachment" /\ CardFacts9["Specimen0087"].kind="Equipment" /\ CardFacts9["Specimen0265"].kind="Profile" /\ ObserveWouldImminence99(NewWouldHistory99,h1,first,periods1,rows1) /\ WouldOrdinalAt99(h1,101,traversal,ExampleFamily068CriterionFixture99)=1 /\ AbilityTextValid93(exampleFamily017.syntax) /\ PaidIsInterrupt95(exampleFamily017) /\ exampleFamily017.triggerCost= <<[kind |-> "ResourceUnits",amount |-> 3]>> /\ prevented.interruptSource=ObjectAbilitySource9(6) /\ ModifyValuePreservingSpecifications94(prevented.beforeEffect,prevented.afterEffect,prevented.beforeEffect.amount-1) /\ ObserveWouldRevision99(h1,h1,revision) /\ ObserveWouldOutcome99(h1,h1,prevented) /\ ObserveWouldOutcome99(h1,h1,[prevented EXCEPT !.disposition="Replaced"]) /\ ObserveWouldOutcome99(h1,h1,[prevented EXCEPT !.disposition="Resolved"]) /\ h1.occurrences[101].effect=net /\ WouldOrdinalCount99(h1,traversal,ExampleFamily068CriterionFixture99)=1 /\ ObserveWouldImminence99(h1,h2,SchemaAtom187,periods2,rows2) /\ WouldOrdinalAt99(h2,102,traversal,ExampleFamily068CriterionFixture99)=2 /\ WouldOrdinalAt99(h2,101,traversal,ExampleFamily068CriterionFixture99)=1 /\ WouldOrdinalCount99(h2,traversal,ExampleFamily068CriterionFixture99)=2 /\ WouldOrdinalCount99(h2,turn,ExampleFamily068CriterionFixture99)=2 /\ ~ObserveWouldImminence99(h1,recountOutput,attemptedRecount,recountPeriods,recountRows) /\ ~ObserveWouldRevision99(h1,h1,[revision EXCEPT !.context.source=ObjectAbilitySource9(3)]) /\ ~ObserveWouldRevision99(h1,h1,[revision EXCEPT !.openingSnapshotId=999]) /\ ~ObserveWouldOutcome99(h1,h1,[prevented EXCEPT !.roots={12}]) /\ \A amount \in -1..2 : LET rows == [rows1 EXCEPT ![101].effect.amount=amount] h == WouldCommittedFixture99(NewWouldHistory99,first,periods1,rows) IN /\ ObserveWouldImminence99(NewWouldHistory99,h,first,periods1,rows) /\ WouldOrdinalCount99(h,traversal,ExampleFamily068CriterionFixture99)=IF amount>=1 THEN 1 ELSE 0 WouldProfilePeriodChecks99 == LET plan == [OpenInstruction93(8800,"Rule",0,RuleAbilitySource9("StructuralDamageRule99"),"NoValue",0,"StructuralDamageRule99",<<"Damage">>,FALSE) EXCEPT !.phase="Imminent"] first == WouldOpeningFixture99(20,2000,InstructionWindowRef93(plan),<<201>>) traversal == TimingRef9("SchemaAtom138",2) periods == [period \in {traversal} |-> WouldPeriodFixture99(first,period)] net == WouldEffectFixture99("Damage","HarmClassA","SideA",1,"SchemaAtom082") rows == [id \in {201} |-> WouldRowFixture99(id,21,first,net)] h1 == WouldCommittedFixture99(NewWouldHistory99,first,periods,rows) repeated == WouldOpeningFixture99(21,2001,InstructionWindowRef93(plan),<<202>>) repeatedPeriods == [period \in {traversal} |-> WouldPeriodFixture99(repeated,period)] repeatedRows == [id \in {202} |-> WouldRowFixture99(id,22,repeated,net)] h2 == WouldCommittedFixture99(h1,repeated,repeatedPeriods,repeatedRows) nextTraversal == WouldOpeningFixture99(22,2002,InstructionWindowRef93(plan),<<203>>) traversal3 == TimingRef9("SchemaAtom138",3) nextPeriods == [period \in {traversal3} |-> WouldPeriodFixture99(nextTraversal,period)] nextRows == [id \in {203} |-> WouldRowFixture99(id,23,nextTraversal,net)] h3 == WouldCommittedFixture99(h2,nextTraversal,nextPeriods,nextRows) sameNumberItemInspection == TimingRef9("ItemInspection",2) newTurn == WouldOpeningFixture99(23,2003,InstructionWindowRef93(plan),<<204>>) turn2 == TimingRef9("Turn",2) turnPeriods == [period \in {turn2} |-> WouldPeriodFixture99(newTurn,period)] turnRows == [id \in {204} |-> WouldRowFixture99(id,24,newTurn,net)] h4 == WouldCommittedFixture99(h3,newTurn,turnPeriods,turnRows) IN /\ EnterRuleInstruction93([plan EXCEPT !.phase="Planning"],plan,"StructuralDamageRule99") /\ ObserveWouldImminence99(NewWouldHistory99,h1,first,periods,rows) /\ ObserveWouldImminence99(h1,h2,repeated,repeatedPeriods,repeatedRows) /\ WouldOrdinalAt99(h2,202,traversal,ExampleFamily068CriterionFixture99)=2 /\ ObserveWouldImminence99(h2,h3,nextTraversal,nextPeriods,nextRows) /\ WouldOrdinalAt99(h3,203,traversal3,ExampleFamily068CriterionFixture99)=1 /\ WouldOrdinalCount99(h3,traversal,ExampleFamily068CriterionFixture99)=2 /\ WouldOrdinalCount99(h3,sameNumberItemInspection,ExampleFamily068CriterionFixture99)=0 /\ ObserveWouldImminence99(h3,h4,newTurn,turnPeriods,turnRows) /\ WouldOrdinalCount99(h4,turn2,ExampleFamily068CriterionFixture99)=1 /\ WouldOrdinalCount99(h4,traversal,ExampleFamily068CriterionFixture99)=2 /\ \A field \in {"Actor","Subtype","TargetSite"} : LET criterion == CASE field="Actor" -> [ExampleFamily068CriterionFixture99 EXCEPT !.actor="SideB"] [] field="Subtype" -> [ExampleFamily068CriterionFixture99 EXCEPT !.subtype="PersistentCapacityHarm"] [] OTHER -> [ExampleFamily068CriterionFixture99 EXCEPT !.targetSite="SchemaAtom129"] IN WouldOrdinalCount99(h1,traversal,criterion)=0 /\ LET badPeriods == [periods EXCEPT ![traversal].period=sameNumberItemInspection] IN ~ObserveWouldImminence99(NewWouldHistory99,WouldCommittedFixture99(NewWouldHistory99,first,badPeriods,rows),first,badPeriods,rows) /\ LET badToken == [first EXCEPT !.imminence.context.source=ObjectAbilitySource9(99)] IN ~ObserveWouldImminence99(NewWouldHistory99,h1,badToken,periods,rows) /\ LET reusedRows == [id \in {201} |-> WouldRowFixture99(id,22,repeated,net)] reusedOpening == [repeated EXCEPT !.order= <<201>>] IN ~ObserveWouldImminence99(h1,WouldCommittedFixture99(h1,reusedOpening,repeatedPeriods,reusedRows),reusedOpening,repeatedPeriods,reusedRows) /\ LET reusedOpening == [repeated EXCEPT !.id=20] memberships == [period \in {traversal} |-> WouldPeriodFixture99(reusedOpening,period)] IN ~ObserveWouldImminence99(h1,WouldCommittedFixture99(h1,reusedOpening,memberships,repeatedRows),reusedOpening,memberships,repeatedRows) /\ LET simultaneous == [first EXCEPT !.order= <<201,202>>] duplicatedRoot == [id \in {201,202} |-> WouldRowFixture99(id,21,simultaneous,net)] IN ~ObserveWouldImminence99(NewWouldHistory99,WouldCommittedFixture99(NewWouldHistory99,simultaneous,periods,duplicatedRoot),simultaneous,periods,duplicatedRoot) /\ LET trace == WouldEffectFixture99("EscalatingResourceContest","Base","SideA",0,"SchemaAtom082") escalatingResourceContestRows == [rows EXCEPT ![201].effect=trace] history == WouldCommittedFixture99(NewWouldHistory99,first,periods,escalatingResourceContestRows) criterion == [ExampleFamily068CriterionFixture99 EXCEPT !.kind="EscalatingResourceContest",!.subtype="Base",!.minimumPresent=FALSE] IN /\ ObserveWouldImminence99(NewWouldHistory99,history,first,periods,escalatingResourceContestRows) /\ WouldOrdinalCount99(history,traversal,criterion)=1 LexicalSyntheticText99 == "SyntheticText197ed56fc493" LexicalSyntheticCard99 == "synthetic_keyword_resource_99" LexicalSyntheticSHA99 == "c05651f968b7212c9c8799fd96192867f01dd5bb98c339e71b57e43045c81278" LexicalCardFactsFixture99 == [card \in DOMAIN CardFacts9 \cup {LexicalSyntheticCard99} |-> IF card=LexicalSyntheticCard99 THEN [kind |-> "Support",side |-> "SideB",sourceSHA |-> LexicalSyntheticSHA99,hasRulesText |-> TRUE] ELSE CardFacts9[card]] LexicalSyntheticObject99 == [CardObject9("Specimen0070","Play",TRUE,"Up") EXCEPT !.card=LexicalSyntheticCard99] LexicalMentionFixture99(d,word,unit,role) == [word |-> word,unit |-> unit,owner |-> AbilityKey99(d),role |-> role] LexicalReceiptFixture99(d,card,mentions,facts) == [tag |-> "NormalizedAbilityLexemes",definition |-> d,source |-> d.syntax.source, card |-> card,sourceSHA |-> facts[card].sourceSHA,mentions |-> mentions, origin |-> [tag |-> "AbilityTextOrigin",recipientSource |-> d.syntax.source,provider |-> d.activity.provider, card |-> card,sourceSHA |-> facts[card].sourceSHA,rule |-> "NoValue"]] LexicalSingleFixture99(d,card,word,unit,role,facts) == LexicalReceiptFixture99(d,card,[id \in {1} |-> LexicalMentionFixture99(d,word,unit,role)],facts) LexicalConditionalFixture99(id,card,source,kind) == LET original == ConditionalDefinitionFixture96(id,card,"Trigger",kind,"SchemaAtom016","SideB","SchemaAtom016") IN [original EXCEPT !.syntax.source=ObjectAbilitySource9(source),!.activity.source=ObjectAbilitySource9(source)] LexicalSyntheticConditional99 == LET d == LexicalConditionalFixture99(9901,"Specimen0241",11,"StructuralEvent") IN [d EXCEPT !.effectChoices={{1}},!.optionalParts={}] LexicalSyntheticPaid99 == LET syntax == SyntaxFixture93(9902,"Paid","SideB","Support",BaseUnits93("Paid")) source == ObjectAbilitySource9(11) IN [syntax |-> [syntax EXCEPT !.source=source],activity |-> AbilityDefinition9(9902,"Paid",source,"Printed"), triggerCost |-> <<[kind |-> "ResourceUnits",amount |-> 1]>>,instructions |-> <<700>>,instructionHasWould |-> FALSE,ruleTiming |-> "NoValue", canSuppressBarrierInstructions |-> FALSE,refersApproachedBarrier |-> FALSE,refersEncounteredBarrier |-> FALSE, approachRequirements |-> [subtypes |-> {},activated |-> FALSE,otherIds |-> {}],encounterRequirements |-> [subtypes |-> {},activated |-> FALSE,otherIds |-> {}], interfaceSubtype |-> [present |-> FALSE,name |-> "NoValue"],otherRestrictionIds |-> {},refersHosted |-> FALSE] LexicalExposureMarkerFixture99 == [LexicalConditionalFixture99(9910,"Specimen0241",1,"AvoidExposureMarker") EXCEPT !.effectChoices={{},{1}},!.optionalParts={1},!.triggerRequirements={401}] LexicalExampleFamily025ObserverFixture99 == [LexicalConditionalFixture99(9911,"Specimen0104",2,"PreventDamage") EXCEPT !.trigger.subject="SchemaAtom149",!.triggerRequirements={403}] LexicalExampleFamily092Fixture99 == LET d == LexicalConditionalFixture99(9912,"Specimen0237",3,"WouldDraw") IN [d EXCEPT !.syntax.units= <> \o d.syntax.units,!.instructionHasWould=TRUE] LexicalExampleFamily055Fixture99 == [LexicalConditionalFixture99(9913,"Specimen0214",4,"TraversalSuccessful") EXCEPT !.triggerRequirements={402}] LexicalNamedObjects99 == [id \in 1..4 |-> CardObject9(CASE id=1 -> "Specimen0241" [] id=2 -> "Specimen0104" [] id=3 -> "Specimen0237" [] OTHER -> "Specimen0214","Play",TRUE,"Up")] LexicalNamedClassChecks99 == LET tag == LexicalExposureMarkerFixture99 exampleFamily025 == LexicalExampleFamily025ObserverFixture99 classAct == LexicalExampleFamily092Fixture99 exampleFamily055 == LexicalExampleFamily055Fixture99 exposureMarkerLex == LexicalSingleFixture99(tag,"Specimen0241","avoid",1,"ActualOccurrenceTrigger",CardFacts9) exampleFamily025Lex == LexicalSingleFixture99(exampleFamily025,"Specimen0104","prevents",1,"ActualOccurrenceTrigger",CardFacts9) classLex == LexicalSingleFixture99(classAct,"Specimen0237","would",2,"ImminentTrigger",CardFacts9) exampleFamily055Lex == LexicalSingleFixture99(exampleFamily055,"Specimen0214","instead",2,"EffectOperator",CardFacts9) IN /\ \A d \in {tag,exampleFamily025,classAct,exampleFamily055} : ConditionalDefinitionValid96(d) /\ AbilityLexemesValid99(tag,exposureMarkerLex,LexicalNamedObjects99,CardFacts9) /\ ~AbilityInterrupt99(tag,exposureMarkerLex) /\ AbilityOwnWords99(tag,exposureMarkerLex)={"avoid"} /\ OperativeInterruptWords99(tag,exposureMarkerLex)={} /\ AbilityLexemesValid99(exampleFamily025,exampleFamily025Lex,LexicalNamedObjects99,CardFacts9) /\ ~AbilityInterrupt99(exampleFamily025,exampleFamily025Lex) /\ exampleFamily025Lex.mentions[1].word="prevents" /\ ~FlagPresent93(exampleFamily025.syntax.units,"Interrupt") /\ AbilityLexemesValid99(classAct,classLex,LexicalNamedObjects99,CardFacts9) /\ AbilityInterrupt99(classAct,classLex) /\ classLex.mentions[1].unit=2 /\ classAct.syntax.units[2].category="SchemaAtom043" /\ AbilityLexemesValid99(exampleFamily055,exampleFamily055Lex,LexicalNamedObjects99,CardFacts9) /\ ReplacementText99(exampleFamily055,exampleFamily055Lex) /\ ~AbilityInterrupt99(exampleFamily055,exampleFamily055Lex) LexicalRoleAndBoundaryChecks99 == LET paid == LexicalSyntheticPaid99 conditional == LexicalSyntheticConditional99 facts == LexicalCardFactsFixture99 objects == [id \in {11} |-> LexicalSyntheticObject99] foreign == [ability |-> 9999,source |-> ObjectAbilitySource9(12)] IN /\ ~paid.instructionHasWould /\ ~conditional.instructionHasWould /\ ~FlagPresent93(paid.syntax.units,"Interrupt") /\ ~FlagPresent93(conditional.syntax.units,"Interrupt") /\ \A d \in {paid,conditional} : \A word \in {"prevent","avoid"} : LET lex == LexicalSingleFixture99(d,LexicalSyntheticCard99,word,2,"EffectOperator",facts) quoted == [lex EXCEPT !.mentions[1].owner=foreign,!.mentions[1].role="OtherAbility"] descriptive == [lex EXCEPT !.mentions[1].role="OtherOwnText"] IN /\ AbilityLexemesValid99(d,lex,objects,facts) /\ AbilityInterrupt99(d,lex) /\ AbilityLexemesValid99(d,quoted,objects,facts) /\ ~AbilityInterrupt99(d,quoted) /\ AbilityLexemesValid99(d,descriptive,objects,facts) /\ ~AbilityInterrupt99(d,descriptive) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.mentions[1].owner=foreign],objects,facts) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.mentions[1].role="OtherAbility"],objects,facts) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.mentions[1].unit=1],objects,facts) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.mentions[1].unit=0],objects,facts) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.mentions[1].unit=3],objects,facts) /\ LET lex == LexicalSingleFixture99(conditional,LexicalSyntheticCard99,"would",1,"ImminentTrigger",facts) wrongWord == [lex EXCEPT !.mentions[1].word="avoid"] IN /\ AbilityLexemesValid99(conditional,lex,objects,facts) /\ AbilityInterrupt99(conditional,lex) /\ ~AbilityLexemesValid99(conditional,wrongWord,objects,facts) /\ ~AbilityLexemesValid99(conditional,[lex EXCEPT !.mentions[1].unit=2],objects,facts) /\ ~AbilityLexemesValid99(conditional,[lex EXCEPT !.mentions[1].role="UnknownRole"],objects,facts) /\ LET lex == LexicalSingleFixture99(conditional,LexicalSyntheticCard99,"instead",2,"EffectOperator",facts) nested == [lex EXCEPT !.mentions[1].owner=foreign,!.mentions[1].role="OtherAbility"] IN ReplacementText99(conditional,lex) /\ ~ReplacementText99(conditional,nested) LexicalSourceBindingChecks99 == LET d == LexicalExposureMarkerFixture99 objects == LexicalNamedObjects99 lex == LexicalSingleFixture99(d,"Specimen0241","avoid",1,"ActualOccurrenceTrigger",CardFacts9) foreignDefinition == [d EXCEPT !.syntax.id=9990,!.activity.id=9990] foreignSource == ObjectAbilitySource9(2) rebound == [d EXCEPT !.syntax.source=foreignSource,!.activity.source=foreignSource] reboundLex == LexicalSingleFixture99(rebound,"Specimen0241","avoid",1,"ActualOccurrenceTrigger",CardFacts9) IN /\ AbilityLexemesValid99(d,lex,objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.tag="OtherReceipt"],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.definition=foreignDefinition],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.source=foreignSource],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.origin.tag="OtherOrigin"],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.origin.recipientSource=foreignSource],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.origin.provider="Granted"],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.sourceSHA=CardFacts9["Specimen0104"].sourceSHA,!.origin.sourceSHA=CardFacts9["Specimen0104"].sourceSHA],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.origin.sourceSHA="ForeignSHA"],objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.origin.card="Specimen0104"],objects,CardFacts9) /\ ~AbilityLexemesValid99(rebound,reboundLex,objects,CardFacts9) /\ ~AbilityLexemesValid99(d,[lex EXCEPT !.mentions=[id \in {0} |-> lex.mentions[1]]],objects,CardFacts9) LexicalCheckpointFixture99(d,lex,card,objectId,facts) == LET definitions == [key \in {ConditionalKey96(d)} |-> d] lexemes == [key \in DOMAIN definitions |-> lex] objects == [id \in {objectId} |-> IF card=LexicalSyntheticCard99 THEN LexicalSyntheticObject99 ELSE CardObject9(card,"Play",TRUE,"Up")] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) before == NewConditionalLedger96(initial) events == [id \in {101} |-> ConditionalEventFixture96(id,CHOOSE kind \in d.trigger.kinds : TRUE,objectId,"SideB","SideB",initial,700)] begin == [initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [initial EXCEPT !.id=11,!.checkpointId=1] cp == ConditionalCheckpointFixture96(before,1,begin,current,events) key == [definition |-> ConditionalKey96(d),occurrence |-> 101] allocation == [k \in {key} |-> 201] bindings == ConditionalBindingsFixture96({key},1,600,60) admitted == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) excluded == ConditionalCommittedFixture96(before,definitions,cp,Empty9,Empty9,Empty9) IN [d |-> d,lex |-> lex,definitions |-> definitions,lexemes |-> lexemes,objects |-> objects,before |-> before, events |-> events,cp |-> cp,conditions |-> ConditionalConditionsFixture96(definitions,events), allocation |-> allocation,bindings |-> bindings,admitted |-> admitted,excluded |-> excluded,facts |-> facts] LexicalProcessCheckpointFixture99(s,after,allocation,bindings,lexemes) == ProcessConditionalCheckpoint99(s.before,after,<<>>,<<>>,s.definitions,lexemes,s.cp,s.conditions,allocation,bindings,Empty9,Empty9,{},s.facts) LexicalActualOccurrenceDeliveryChecks99 == LET tag == LexicalExposureMarkerFixture99 exampleFamily025 == LexicalExampleFamily025ObserverFixture99 exampleFamily055 == LexicalExampleFamily055Fixture99 exposureMarkerS == LexicalCheckpointFixture99(tag,LexicalSingleFixture99(tag,"Specimen0241","avoid",1,"ActualOccurrenceTrigger",CardFacts9),"Specimen0241",1,CardFacts9) exampleFamily025S == LexicalCheckpointFixture99(exampleFamily025,LexicalSingleFixture99(exampleFamily025,"Specimen0104","prevents",1,"ActualOccurrenceTrigger",CardFacts9),"Specimen0104",2,CardFacts9) exampleFamily055S == LexicalCheckpointFixture99(exampleFamily055,LexicalSingleFixture99(exampleFamily055,"Specimen0214","instead",2,"EffectOperator",CardFacts9),"Specimen0214",4,CardFacts9) IN /\ \A s \in {exposureMarkerS,exampleFamily025S,exampleFamily055S} : /\ LexicalProcessCheckpointFixture99(s,s.admitted,s.allocation,s.bindings,s.lexemes) /\ DOMAIN s.admitted.instances={201} /\ ~s.admitted.instances[201].member.interrupt /\ s.admitted.instances[201].member.windowId=600 /\ s.admitted.instances[201].definitionCopy=s.d /\ LET members == ConditionalWindowMembers96(s.admitted.instances,600) site == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",3) opening == OpeningFixture92(600,"Reaction",site,members,60,NoTimingRef9) window == WindowFixture92(600,"Reaction",site,members,60,NoTimingRef9) IN OpenConditionalReaction96(<<>>,<>,s.admitted,600,site,opening,{}) /\ ~LexicalProcessCheckpointFixture99(s,s.excluded,Empty9,Empty9,s.lexemes) /\ ~LexicalProcessCheckpointFixture99(s,s.admitted,s.allocation,s.bindings, [key \in DOMAIN s.lexemes \cup {[ability |-> 9998,source |-> ObjectAbilitySource9(99)]} |-> s.lex]) /\ ~LexicalProcessCheckpointFixture99(exposureMarkerS,exposureMarkerS.admitted,exposureMarkerS.allocation,exposureMarkerS.bindings, [key \in DOMAIN exposureMarkerS.lexemes |-> [exposureMarkerS.lex EXCEPT !.source=ObjectAbilitySource9(2)]]) /\ LET foreignEvent == [exampleFamily025S.events[101] EXCEPT !.object=3] foreignCP == [exampleFamily025S.cp EXCEPT !.occurrences=[id \in {101} |-> foreignEvent]] foreignAfter == ConditionalCommittedFixture96(exampleFamily025S.before,exampleFamily025S.definitions,foreignCP,Empty9,Empty9,Empty9) IN ProcessConditionalCheckpoint99(exampleFamily025S.before,foreignAfter,<<>>,<<>>,exampleFamily025S.definitions,exampleFamily025S.lexemes,foreignCP, ConditionalConditionsFixture96(exampleFamily025S.definitions,foreignCP.occurrences),Empty9,Empty9,Empty9,Empty9,{},CardFacts9) /\ ConditionalOptional96(tag) /\ ~ConditionalOptional96(exampleFamily025) LexicalImplicitReactionExclusionChecks99 == LET d == LexicalSyntheticConditional99 lex == LexicalSingleFixture99(d,LexicalSyntheticCard99,"avoid",2,"EffectOperator",LexicalCardFactsFixture99) s == LexicalCheckpointFixture99(d,lex,LexicalSyntheticCard99,11,LexicalCardFactsFixture99) IN /\ ConditionalDefinitionValid96(d) /\ ~ConditionalInterrupt96(d) /\ AbilityInterrupt99(d,lex) /\ ProcessConditionalCheckpoint96(s.before,s.admitted,<<>>,<<>>,s.definitions,s.cp,s.conditions,s.allocation,s.bindings,Empty9,Empty9,{}) /\ LexicalProcessCheckpointFixture99(s,s.excluded,Empty9,Empty9,s.lexemes) /\ ~LexicalProcessCheckpointFixture99(s,s.admitted,s.allocation,s.bindings,s.lexemes) /\ CheckpointCandidates99(s.definitions,s.lexemes,s.before,s.cp,s.conditions)={} LexicalPaidEligibilityChecks99 == LET d == LexicalSyntheticPaid99 facts == LexicalCardFactsFixture99 lex == LexicalSingleFixture99(d,LexicalSyntheticCard99,"prevent",2,"EffectOperator",facts) objects == [id \in {11} |-> LexicalSyntheticObject99] w == PaidWindowFixture95(610,"Interrupt","SideB") c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.currentEffect=EffectFixture92(w,{}, {d.syntax.id}), !.paidRelevance=[tag |-> "PaidInterruptRelevance",windowId |-> w.id,instruction |-> w.instruction,revision |-> 1,eligible |-> {AbilityKey99(d)}]] paidWindow == PaidWindowFixture95(610,"Paid","SideB") paidContext == [c EXCEPT !.currentEffect=EffectFixture92(paidWindow,{}, {d.syntax.id}), !.paidRelevance.instruction=paidWindow.instruction] option == PaidOptionFixture95(d,w) legality == LegalityFixture92(w,option) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(900,d,option,w,legality.transactionId,"Play") IN /\ PaidEligibility99(d,lex,c,w,facts) /\ ReservePaidAbility99(<>,<>,p,900,d,lex,c,option,legality,{},facts) /\ ~PaidEligibility99(d,lex,paidContext,paidWindow,facts) /\ ~PaidEligibility99(d,lex,c,[w EXCEPT !.priority="SideA"],facts) /\ ~PaidEligibility99(d,lex,[c EXCEPT !.paidRelevance.eligible={}],w,facts) /\ ~PaidEligibility99(d,lex,[c EXCEPT !.paidRelevance.revision=0],w,facts) /\ ~ReservePaidAbility99(<>,<>,p,900,d,[lex EXCEPT !.source=ObjectAbilitySource9(12)],c,option,legality,{},facts) /\ \A action,itemInspection,interrupt \in BOOLEAN : LET cost == IF action THEN <<[kind |-> "SpendActionPoints",amount |-> 1]>> ELSE d.triggerCost variant == [d EXCEPT !.triggerCost=cost,!.syntax.units=IF itemInspection THEN <> \o BaseUnits93("Paid") ELSE BaseUnits93("Paid")] mentionUnit == IF itemInspection THEN 3 ELSE 2 meaning == LexicalSingleFixture99(variant,LexicalSyntheticCard99,IF interrupt THEN "prevent" ELSE "gain",mentionUnit,"EffectOperator",facts) required == (IF action THEN {"NeutralValue00001"} ELSE {}) \cup (IF itemInspection THEN {"MidItemInspection"} ELSE {}) \cup (IF interrupt THEN {"Interrupt"} ELSE {}) IN /\ AbilityLexemesValid99(variant,meaning,objects,facts) /\ PaidRequiredWindows99(variant,meaning)=required /\ PaidWindowKinds99(variant,meaning)=(IF required={} THEN {"Paid"} ELSE IF Cardinality(required)=1 THEN required ELSE {}) StaticAtomFixture99(id,kind,step) == [id |-> id,lineage |-> id,kind |-> kind,value |-> IF kind="Damage" THEN 2 ELSE 0, damageType |-> IF kind="Damage" THEN "HarmClassA" ELSE "NoValue",preventable |-> TRUE, targeted |-> FALSE,targetCard |-> 0,baseController |-> "SideA",baseOrigin |-> RuleAbilitySource9(step), actor |-> "SideA",targetSite |-> "SchemaAtom082",specifications |-> [original |-> TRUE],restrictions |-> {}] StaticProjectionFixture99 == LET step == "StructuralStaticProjection99" owner == [windowId |-> 0,option |-> NoPriorityOption9,transaction |-> 0] beforePlan == OpenInstruction93(4100,"Rule",0,RuleAbilitySource9(step),"NoValue",0,step,<<"StructuralDamageAndDraw">>,FALSE) afterPlan == [beforePlan EXCEPT !.announced=TRUE,!.phase="Imminent"] targets == [tag |-> "InstructionTargets",instruction |-> beforePlan.id,abilityInstance |-> 0, valid |-> TRUE,source |-> beforePlan.source,sourceZone |-> "NoValue",index |-> 0,targets |-> {}] structure == [tag |-> "StructuralRuleProcedure",id |-> 4200,step |-> step] entry == [tag |-> "ActualInstructionEntry",id |-> 4300,snapshotId |-> 501,kind |-> "Rule", beforePlan |-> beforePlan,afterPlan |-> afterPlan,stackBefore |-> <<>>,stackAfter |-> <<>>, ruleInvocation |-> 4400,ruleStep |-> step,sourceProcedure |-> structure,owner |-> owner,targets |-> targets] world == [tag |-> "CurrentInterruptWorld",id |-> 501,turn |-> OpenTurn5("SideA",901,[p \in SetupPlayers |-> 0]), traversalControl |-> [traversal |-> NoTraversal6],objects |-> Empty9,controllers |-> Empty9,activePeriods |-> Empty9, entries |-> [id \in {4300} |-> entry],ruleInvocations |-> [id \in {4400} |-> [tag |-> "ActualRuleInvocation",step |-> step,returned |-> FALSE,structure |-> structure,owner |-> owner]]] origin == [kind |-> "Instruction",plan |-> afterPlan,parent |-> Empty9,ruleStep |-> step] effects == [id \in {1,2} |-> StaticAtomFixture99(id,IF id=1 THEN "Damage" ELSE "Draw",step)] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> beforePlan.source, snapshotId |-> world.id,effects |-> effects,order |-> <<1,2>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world.id, forbiddenIds |-> {2},values |-> [id \in {1} |-> 3]] initial == [id \in {1} |-> [effects[1] EXCEPT !.value=3]] context == NewExpectedContext99(4500,entry.id,origin,world,description,initial,owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={4500},!.contexts=[id \in {4500} |-> context]] IN [entry |-> entry,origin |-> origin,world |-> world,description |-> description,projection |-> projection, initial |-> initial,context |-> context,registry |-> registry, capture |-> InitialWouldObservation99(context,context.id),history |-> InitialHistoryFixture99(context)] StaticRefreshReceiptFixture99(context,world,effects) == [tag |-> "ContinuousExpectedEffectsUpdate",context |-> context.currentRef,snapshotId |-> world.id, description |-> context.description,beforeEffects |-> context.state.effects, instructionReplacements |-> context.state.transformations,resolvedModifications |-> context.modifications,effects |-> effects] StaticRefreshAfterFixture99(before,origin,world,effects) == [before EXCEPT !.currentRef=OriginReference99(origin),!.currentWorld=world.id,!.state.effects=effects, !.state.ancestry=[id \in DOMAIN effects |-> IF id \in DOMAIN before.state.ancestry THEN before.state.ancestry[id] ELSE IF id \in DOMAIN before.ancestryArchive THEN before.ancestryArchive[id] ELSE {}], !.ancestryArchive=ReplacementOverlay99(@,before.state.ancestry), !.modifications=Append(@,[kind |-> "ContinuousProjection",snapshotId |-> world.id,from |-> before.currentRef, to |-> OriginReference99(origin),effects |-> effects])] StaticInitialProjectionChecks99 == LET s == StaticProjectionFixture99 wrongInitial == [id \in {1,2} |-> IF id=1 THEN s.initial[1] ELSE s.description.effects[2]] wrongAncestry == [s.context EXCEPT !.state.ancestry=[id \in {1,2} |-> {}]] IN /\ InitialExpectedProjection99(s.origin,s.world,s.description,s.projection,s.initial) /\ ActualImminenceEntry99(s.entry,s.origin,s.world,CardFacts9) /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,4500,s.origin,s.world,s.entry,s.description,s.projection,s.initial,s.entry.owner,CardFacts9,NewWouldAccounting99,s.history,s.capture) /\ s.context.initialRef.origin="Rule" /\ s.context.initialRef.abilityInstance=0 /\ s.context.initialRef.index=0 /\ DOMAIN s.context.state.effects={1} /\ DOMAIN s.context.state.ancestry={1} /\ s.context.state.ancestry[1]={} /\ DOMAIN s.context.ancestryArchive={1,2} /\ ReplacementStateValid99(s.context.state) /\ ~ReplacementStateValid99(wrongAncestry.state) /\ s.context.state.effects[1].value=3 /\ s.context.state.effects[1].specifications=s.description.effects[1].specifications /\ ~InitialExpectedProjection99(s.origin,s.world,s.description,s.projection,wrongInitial) /\ ~InitialExpectedProjection99(s.origin,s.world,s.description,[s.projection EXCEPT !.snapshotId=500],s.initial) /\ LET foreign == [s.description EXCEPT !.source=RuleAbilitySource9("ForeignRule")] IN ~InitialExpectedProjection99(s.origin,s.world,foreign,[s.projection EXCEPT !.description=foreign],s.initial) /\ LET bad == [s.entry EXCEPT !.owner.transaction=1] world == [s.world EXCEPT !.entries[bad.id]=bad] IN ~ActualImminenceEntry99(bad,s.origin,world,CardFacts9) /\ LET world == [s.world EXCEPT !.ruleInvocations[4400].returned=TRUE] IN ~BeginExpectedContext99(NewExpectedRegistry99,s.registry,4500,s.origin,world,s.entry,s.description,s.projection,s.initial,s.entry.owner,CardFacts9,NewWouldAccounting99,s.history,s.capture) /\ ~BeginExpectedContext99(s.registry,s.registry,4500,s.origin,s.world,s.entry,s.description,s.projection,s.initial,s.entry.owner,CardFacts9,s.history,InitialCaptureAfterFixture99(s.history,s.context,InitialWouldObservation99(s.context,4501)),InitialWouldObservation99(s.context,4501)) StaticRestoreProjectionChecks99 == LET s == StaticProjectionFixture99 world == [s.world EXCEPT !.id=502] origin == [s.origin EXCEPT !.plan.revision=1] restored == [id \in {1,2} |-> IF id=1 THEN s.initial[1] ELSE s.description.effects[2]] receipt == StaticRefreshReceiptFixture99(s.context,world,restored) after == StaticRefreshAfterFixture99(s.context,origin,world,restored) IN /\ RefreshExpectedWorld99(s.context,after,s.origin,origin,world,receipt,s.history) /\ DOMAIN after.state.effects={1,2} /\ DOMAIN after.state.ancestry={1,2} /\ after.state.effects[2]=s.description.effects[2] /\ after.state.ancestry[2]={} /\ ReplacementStateValid99(after.state) /\ after.initialEffects=s.initial /\ after.initialRef=s.context.initialRef /\ after.imminenceId=s.context.imminenceId /\ ~RefreshExpectedWorld99(s.context,after,s.origin,origin,world,[receipt EXCEPT !.beforeEffects=Empty9],s.history) /\ ~RefreshExpectedWorld99(s.context,after,s.origin,origin,world,[receipt EXCEPT !.snapshotId=s.world.id],s.history) /\ ~RefreshExpectedWorld99(s.context,after,s.origin,origin,world,[receipt EXCEPT !.instructionReplacements= <<[tag |-> "ForeignReplacementAudit"]>>],s.history) /\ ~RefreshExpectedWorld99(s.context,after,s.origin,origin,world,[receipt EXCEPT !.resolvedModifications= <<[kind |-> "ForeignModification"]>>],s.history) /\ LET changed == [restored EXCEPT ![1].actor="SideB"] bad == StaticRefreshAfterFixture99(s.context,origin,world,changed) IN ~RefreshExpectedWorld99(s.context,bad,s.origin,origin,world,StaticRefreshReceiptFixture99(s.context,world,changed),s.history) /\ LET unknown == [id \in {1,2,3} |-> IF id=3 THEN [s.description.effects[2] EXCEPT !.id=3,!.lineage=3] ELSE restored[id]] bad == StaticRefreshAfterFixture99(s.context,origin,world,unknown) IN ~RefreshExpectedWorld99(s.context,bad,s.origin,origin,world,StaticRefreshReceiptFixture99(s.context,world,unknown),s.history) /\ \A field \in {"removedEffects","retiredEffects"} : LET blocked == [s.context EXCEPT ![field]={2}] coherent == StaticRefreshAfterFixture99(blocked,origin,world,restored) IN ~RefreshExpectedWorld99(blocked,coherent,s.origin,origin,world,StaticRefreshReceiptFixture99(blocked,world,restored),s.history) StaticAncestryProjectionChecks99 == LET s == StaticProjectionFixture99 before == [s.context EXCEPT !.state.ancestry[1]={71},!.ancestryArchive[1]={},!.ancestryArchive[2]={72}] world1 == [s.world EXCEPT !.id=502] origin1 == [s.origin EXCEPT !.plan.revision=1] empty == StaticRefreshAfterFixture99(before,origin1,world1,Empty9) world2 == [s.world EXCEPT !.id=503] origin2 == [s.origin EXCEPT !.plan.revision=2] both == [id \in {1,2} |-> IF id=1 THEN s.initial[1] ELSE s.description.effects[2]] restored == StaticRefreshAfterFixture99(empty,origin2,world2,both) lessDamage == [before.state.effects EXCEPT ![1].value=2] numeric == [before EXCEPT !.state.effects=lessDamage] numericAfter == StaticRefreshAfterFixture99(numeric,origin1,world1,[both EXCEPT ![1].value=2]) IN /\ ReplacementStateValid99(before.state) /\ RefreshExpectedWorld99(before,empty,s.origin,origin1,world1,StaticRefreshReceiptFixture99(before,world1,Empty9),s.history) /\ DOMAIN empty.state.ancestry={} /\ empty.ancestryArchive[1]={71} /\ empty.ancestryArchive[2]={72} /\ RefreshExpectedWorld99(empty,restored,origin1,origin2,world2,StaticRefreshReceiptFixture99(empty,world2,both),s.history) /\ restored.state.ancestry[1]={71} /\ restored.state.ancestry[2]={72} /\ ReplacementStateValid99(restored.state) /\ ~RefreshExpectedWorld99(empty,[restored EXCEPT !.state.ancestry[1]={}],origin1,origin2,world2,StaticRefreshReceiptFixture99(empty,world2,both),s.history) /\ PreventExpectedAmount99(before.state.effects,lessDamage,1,1) /\ numeric.state.ancestry=before.state.ancestry /\ RefreshExpectedWorld99(numeric,numericAfter,s.origin,origin1,world1,StaticRefreshReceiptFixture99(numeric,world1,[both EXCEPT ![1].value=2]),s.history) /\ numericAfter.state.ancestry[1]={71} /\ numericAfter.state.ancestry[2]={72} /\ LET onlyDraw == [id \in {2} |-> both[2]] removed == [restored EXCEPT !.state.effects=onlyDraw,!.state.ancestry=[id \in {2} |-> {72}],!.removedEffects={1}] world3 == [s.world EXCEPT !.id=504] origin3 == [s.origin EXCEPT !.plan.revision=3] after == StaticRefreshAfterFixture99(removed,origin3,world3,onlyDraw) bad == StaticRefreshAfterFixture99(removed,origin3,world3,both) IN /\ PreventExpectedWhole99(restored.state.effects,onlyDraw,1) /\ ReplacementStateValid99(removed.state) /\ RefreshExpectedWorld99(removed,after,origin2,origin3,world3,StaticRefreshReceiptFixture99(removed,world3,onlyDraw),s.history) /\ after.state.ancestry[2]={72} /\ DOMAIN after.state.ancestry={2} /\ ~RefreshExpectedWorld99(removed,bad,origin2,origin3,world3,StaticRefreshReceiptFixture99(removed,world3,both),s.history) StaticProjectionChecks99 == /\ StaticInitialProjectionChecks99 /\ StaticRestoreProjectionChecks99 /\ StaticAncestryProjectionChecks99 RuleEmptyReplacementFixture99(context,world) == LET source == RuleAbilitySource9("StructuralEmptyReplacement99") d == [syntax |-> [id |-> 4700,source |-> source,kind |-> "Conditional",units |-> <<[category |-> "Instruction"]>>], activity |-> [provider |-> "Rule"]] lex == [tag |-> "NormalizedAbilityLexemes",definition |-> d,source |-> source,card |-> "NoValue", sourceSHA |-> "0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e", origin |-> [tag |-> "AbilityTextOrigin",recipientSource |-> source,provider |-> "Rule",rule |-> source.rule], mentions |-> [id \in {1} |-> [word |-> "instead",unit |-> 1,role |-> "EffectOperator",owner |-> AbilityKey99(d)]]] creator == OpenInstruction93(4710,"Rule",0,source,"NoValue",0,source.rule,<<"StructuralCreateReplacement">>,FALSE) blueprint == [id |-> 4720,source |-> source,sourceSHA |-> lex.sourceSHA,pattern |-> [kind |-> "Damage"], behavior |-> [mode |-> "Replace",results |-> <<>>],wouldGrouping |-> "Preserve"] IN [id |-> 4720,definition |-> d,lexemes |-> lex,blueprint |-> blueprint,bindingSnapshotId |-> world.id, provider |-> "Maintained",scope |-> [kind |-> "Instruction",context |-> WouldContextKey99(context.initialRef)], creation |-> [tag |-> "ResolvedReplacementCreation",replacement |-> 4720,instruction |-> InstructionWindowRef93(creator),abilityInstance |-> 0]] RuleWouldReceiptFixture99(id,context,world,order) == [tag |-> "CurrentExpectedWouldObservation",id |-> id,contextId |-> context.id,imminenceId |-> context.imminenceId, reference |-> context.currentRef,snapshotId |-> world.id,effects |-> context.state.effects, groups |-> [effect \in DOMAIN context.state.effects |-> context.wouldGroups[effect]],periods |-> ActualWouldPeriods99(world),order |-> order] RuleWouldAfterFixture99(before,context,world,order,receipt) == WouldAfterFixture99(before,context.id,context.imminenceId,context.currentRef,world.id,context.state.effects, [id \in DOMAIN context.state.effects |-> context.wouldGroups[id]],ActualWouldPeriods99(world),order,receipt) RuleEmptyRouteFixture99 == LET s == StaticProjectionFixture99 initialSnapshot == ConditionalSnapshotFixture96(s.world.id,0,"ProcedureCodee605a78f5d5e",Empty9,s.world.objects) ledger == NewConditionalLedger96(initialSnapshot) replacement == RuleEmptyReplacementFixture99(s.context,s.world) world == ReplacementOverlay99(s.world,[conditional |-> initialSnapshot,paidDefinitions |-> Empty9,lexemes |-> Empty9, capabilities |-> Empty9,paidContexts |-> Empty9,turnUses |-> Empty9, replacementDefinitions |-> [id \in {4720} |-> replacement],liveReplacementIds |-> {4720}]) before == NewExpectedContext99(4500,s.entry.id,s.origin,world,s.description,s.initial,s.entry.owner) beforeRegistry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {4500} |-> before],!.entryIds={s.entry.id},!.usedContextIds={4500}] receipt0 == RuleWouldReceiptFixture99(4800,before,world,<<1>>) history0 == RuleWouldAfterFixture99(NewWouldAccounting99,before,world,<<1>>,receipt0) blueprints == [id \in {4720} |-> replacement.blueprint] decision == ReplacementDecision99(before.state,1,blueprints,[id |-> world.id,controllers |-> world.controllers],4720,<<>>) nextState == ReplacementNextState99(before.state,1,blueprints,4720,<<>>,decision) steps == <<[effectId |-> 1,decision |-> decision]>> states == <> origin1 == [s.origin EXCEPT !.plan.revision=1] replaced == [before EXCEPT !.state=nextState,!.currentRef=OriginReference99(origin1),!.retiredEffects={1}, !.wouldGroups=[effect \in {2} |-> before.wouldGroups[effect]]] receipt1 == RuleWouldReceiptFixture99(4801,replaced,world,<<>>) history1 == RuleWouldAfterFixture99(history0,replaced,world,<<>>,receipt1) prepared == [replaced EXCEPT !.phase="Prepared",!.preparedEffects=Empty9,!.openingRef=replaced.currentRef,!.windowId=4900,!.group=49] site == [TurnSiteFixture92("SideA","ProcedureCode59141ee1a13b",0) EXCEPT !.turnId=world.turn.id] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomicPlan == [origin1.plan EXCEPT !.phase="Resolving"] atomicOrigin == [origin1 EXCEPT !.plan=atomicPlan] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=Empty9] actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> atomic.id,instruction |-> atomic.currentRef, snapshotId |-> world.id,effects |-> Empty9,complete |-> TRUE,childrenReturned |-> TRUE] step == [tag |-> "InstructionStepReturn",instruction |-> atomicPlan.id,index |-> 1,step |-> Head(atomicPlan.steps), complete |-> TRUE,expectedReturn |-> actualReturn] finishedPlan == [atomicPlan EXCEPT !.completedSteps=atomicPlan.steps,!.cursor=2,!.phase="Complete"] finishedOrigin == [atomicOrigin EXCEPT !.plan=finishedPlan] finished == [atomic EXCEPT !.phase="Returned"] IN [base |-> s,world |-> world,ledger |-> ledger,replacement |-> replacement,before |-> before,beforeRegistry |-> beforeRegistry, receipt0 |-> receipt0,history0 |-> history0,states |-> states,steps |-> steps,origin1 |-> origin1,replaced |-> replaced, receipt1 |-> receipt1,history1 |-> history1,prepared |-> prepared,site |-> site,noWindow |-> noWindow, clearance |-> clearance,cleared |-> cleared,atomicPlan |-> atomicPlan,atomicOrigin |-> atomicOrigin,atomic |-> atomic, actualReturn |-> actualReturn,step |-> step,finishedPlan |-> finishedPlan,finishedOrigin |-> finishedOrigin,finished |-> finished] RuleEmptyRouteValid99(s) == /\ BeginExpectedContext99(NewExpectedRegistry99,s.beforeRegistry,4500,s.base.origin,s.world,s.base.entry, s.base.description,s.base.projection,s.base.initial,s.base.entry.owner,CardFacts9,NewWouldAccounting99,s.history0,s.receipt0) /\ CurrentInterruptWorld99(s.world,s.ledger,CardFacts9) /\ ReplacementSourcesBound99(s.before,s.world,CardFacts9) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,s.history0,s.before,s.base.origin,s.world,<<1>>,s.receipt0) /\ ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,s.world,s.states,s.steps,CardFacts9,s.history0) /\ ObserveCurrentExpectedWould99(s.history0,s.history1,s.replaced,s.origin1,s.world,<<>>,s.receipt1) /\ PrepareOpeningInterrupts99(s.replaced,s.prepared,s.ledger,s.ledger,s.origin1,s.world,s.history1,4900,49,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(s.prepared,s.noWindow,s.origin1,s.world,s.history1,s.ledger,<<>>,s.site,CardFacts9) /\ ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin1,s.world,s.history1,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ BeginClearedRuleInstruction99(s.cleared,s.atomic,s.origin1,s.atomicOrigin,s.world,<<>>,s.clearance,s.atomicPlan) /\ FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,s.actualReturn,s.step,s.finishedPlan) RuleEmptyPreparationChecks99 == LET s == RuleEmptyRouteFixture99 unprocessed == [s.before EXCEPT !.phase="Prepared",!.preparedEffects=s.before.state.effects,!.openingRef=s.before.currentRef,!.windowId=4900,!.group=49] net == [kind |-> "Damage",subtype |-> "HarmClassA",actor |-> "SideA",minimumPresent |-> TRUE,minimum |-> 1,targetSitePresent |-> FALSE,targetSite |-> "NoValue"] IN /\ RuleEmptyRouteValid99(s) /\ s.before.initialEffects # Empty9 /\ s.replaced.state.effects=Empty9 /\ s.prepared.preparedEffects=Empty9 /\ s.finished.initialEffects=s.before.initialEffects /\ s.finished.initialRef=s.before.initialRef /\ s.finished.imminenceId=s.before.imminenceId /\ s.finished.currentRef.revision=1 /\ s.finished.currentRef.origin="Rule" /\ s.finished.currentRef.abilityInstance=0 /\ s.finished.currentRef.index=0 /\ s.clearance.windowId=0 /\ s.clearance.openingRevision=1 /\ s.clearance.revision=1 /\ s.history1.serial=1 /\ s.history1.evidence=s.history0.evidence /\ WouldOrdinalCountCurrent99(s.history1,TimingRef9("Turn",s.world.turn.id),net)=1 /\ ~PrepareOpeningInterrupts99(s.before,unprocessed,s.ledger,s.ledger,s.base.origin,s.world,s.history0,4900,49,Empty9,{},CardFacts9) /\ LET badWorld == [s.world EXCEPT !.replacementDefinitions[4720].bindingSnapshotId=500] IN ~ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,badWorld,s.states,s.steps,CardFacts9,s.history0) /\ LET badWorld == [s.world EXCEPT !.liveReplacementIds={}] IN ~ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,badWorld,s.states,s.steps,CardFacts9,s.history0) /\ LET foreign == OpenInstruction93(4710,"Rule",0,RuleAbilitySource9("ForeignReplacement"),"NoValue",0,"ForeignReplacement",<<"StructuralCreateReplacement">>,FALSE) badWorld == [s.world EXCEPT !.replacementDefinitions[4720].creation.instruction=InstructionWindowRef93(foreign)] IN ~ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,badWorld,s.states,s.steps,CardFacts9,s.history0) RuleNoModifiersClearanceChecks99 == LET s == RuleEmptyRouteFixture99 wrongClearance == [s.clearance EXCEPT !.revision=0] wrongCleared == [s.cleared EXCEPT !.clearance=wrongClearance] IN /\ RuleEmptyRouteValid99(s) /\ ~ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin1,s.world,s.history0,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ ~ClearPreparedInstruction99(s.noWindow,wrongCleared,s.origin1,s.world,s.history1,s.ledger,<<>>,<<>>,"NoModifiers",wrongClearance,CardFacts9) /\ LET before == [s.prepared EXCEPT !.site=s.site] after == [before EXCEPT !.phase="InstructionCleared",!.clearance=s.clearance] IN ~ClearPreparedInstruction99(before,after,s.origin1,s.world,s.history1,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ ~BeginClearedRuleInstruction99(s.cleared,[s.atomic EXCEPT !.actualEffects=s.before.initialEffects],s.origin1,s.atomicOrigin,s.world,<<>>,s.clearance,s.atomicPlan) /\ LET returnedWorld == [s.world EXCEPT !.ruleInvocations[4400].returned=TRUE] IN ~BeginClearedRuleInstruction99(s.cleared,s.atomic,s.origin1,s.atomicOrigin,returnedWorld,<<>>,s.clearance,s.atomicPlan) /\ LET foreignWorld == [s.world EXCEPT !.ruleInvocations[4400].step="ForeignRule"] IN ~BeginClearedRuleInstruction99(s.cleared,s.atomic,s.origin1,s.atomicOrigin,foreignWorld,<<>>,s.clearance,s.atomicPlan) /\ LET bad == [s.cleared EXCEPT !.clearance.source=RuleAbilitySource9("ForeignRule")] after == [s.atomic EXCEPT !.clearance=bad.clearance] IN ~BeginClearedRuleInstruction99(bad,after,s.origin1,s.atomicOrigin,s.world,<<>>,bad.clearance,s.atomicPlan) RuleActualReturnChecks99 == LET s == RuleEmptyRouteFixture99 IN /\ RuleEmptyRouteValid99(s) /\ s.finished.phase="Returned" /\ s.finishedPlan.phase="Complete" /\ s.finishedPlan.completedSteps=s.base.origin.plan.steps /\ \A field \in {"complete","childrenReturned"} : LET badReturn == [s.actualReturn EXCEPT ![field]=FALSE] IN ~FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,badReturn, [s.step EXCEPT !.expectedReturn=badReturn],s.finishedPlan) /\ LET badReturn == [s.actualReturn EXCEPT !.contextId=4501] IN ~FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,badReturn, [s.step EXCEPT !.expectedReturn=badReturn],s.finishedPlan) /\ LET badReturn == [s.actualReturn EXCEPT !.snapshotId=500] IN ~FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,badReturn, [s.step EXCEPT !.expectedReturn=badReturn],s.finishedPlan) /\ LET badReturn == [s.actualReturn EXCEPT !.effects=s.before.initialEffects] IN ~FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,s.before.initialEffects,badReturn, [s.step EXCEPT !.expectedReturn=badReturn],s.finishedPlan) /\ LET badReturn == [s.actualReturn EXCEPT !.instruction.id=4101] IN ~FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,badReturn, [s.step EXCEPT !.expectedReturn=badReturn],s.finishedPlan) /\ ~FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,s.actualReturn, [s.step EXCEPT !.expectedReturn.contextId=4501],s.finishedPlan) RuleClearanceChecks99 == /\ RuleEmptyPreparationChecks99 /\ RuleNoModifiersClearanceChecks99 /\ RuleActualReturnChecks99 WouldAccountingAtomFixture99(id,subtype,amount,step) == [id |-> id,lineage |-> id,kind |-> "Damage",damageType |-> subtype,value |-> amount, preventable |-> TRUE,targeted |-> FALSE,targetCard |-> 0,baseController |-> "SideA", baseOrigin |-> RuleAbilitySource9(step),actor |-> "SideA",targetSite |-> "SchemaAtom082", specifications |-> [structural |-> TRUE],restrictions |-> {}] WouldAccountingScenario99(planId,contextId,entryId,worldId,subtype,amount,turnId,traversalId) == LET step == "StructuralWouldAccounting99" owner == [windowId |-> 0,option |-> NoPriorityOption9,transaction |-> 0] beforePlan == OpenInstruction93(planId,"Rule",0,RuleAbilitySource9(step),"NoValue",0,step,<<"StructuralDamage">>,FALSE) plan == [beforePlan EXCEPT !.announced=TRUE,!.phase="Imminent"] structure == [tag |-> "StructuralRuleProcedure",id |-> 10000+entryId,step |-> step] targets == [tag |-> "InstructionTargets",instruction |-> planId,abilityInstance |-> 0,valid |-> TRUE, source |-> beforePlan.source,sourceZone |-> "NoValue",index |-> 0,targets |-> {}] entry == [tag |-> "ActualInstructionEntry",id |-> entryId,snapshotId |-> worldId,kind |-> "Rule", beforePlan |-> beforePlan,afterPlan |-> plan,stackBefore |-> <<>>,stackAfter |-> <<>>, ruleInvocation |-> 20000+entryId,ruleStep |-> step,sourceProcedure |-> structure,owner |-> owner,targets |-> targets] traversal == IF traversalId=0 THEN NoTraversal6 ELSE [TraversalFixture92("ProcedureCodef1914978bb8e") EXCEPT !.id=traversalId] world == [tag |-> "CurrentInterruptWorld",id |-> worldId,turn |-> OpenTurn5("SideA",turnId,[p \in SetupPlayers |-> 0]), traversalControl |-> [traversal |-> traversal],objects |-> Empty9,controllers |-> Empty9,activePeriods |-> Empty9, entries |-> [id \in {entryId} |-> entry],ruleInvocations |-> [id \in {20000+entryId} |-> [tag |-> "ActualRuleInvocation",step |-> step,returned |-> FALSE,structure |-> structure,owner |-> owner]]] origin == [kind |-> "Instruction",plan |-> plan,parent |-> Empty9,ruleStep |-> step] effects == [id \in {1} |-> WouldAccountingAtomFixture99(id,subtype,amount,step)] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> plan.source, snapshotId |-> worldId,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> worldId,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(contextId,entryId,origin,world,description,effects,owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entryId},!.usedContextIds={contextId},!.contexts=[id \in {contextId} |-> context]] IN [world |-> world,origin |-> origin,entry |-> entry,description |-> description,projection |-> projection,context |-> context,registry |-> registry] WouldCurrentReceiptFixture99(id,context,world,order) == [tag |-> "CurrentExpectedWouldObservation",id |-> id,contextId |-> context.id,imminenceId |-> context.imminenceId, reference |-> context.currentRef,snapshotId |-> world.id,effects |-> context.state.effects, groups |-> [effect \in DOMAIN context.state.effects |-> context.wouldGroups[effect]],periods |-> ActualWouldPeriods99(world),order |-> order] WouldAccountingCommitted99(before,context,world,order,receipt) == WouldAfterFixture99(before,context.id,context.imminenceId,context.currentRef,world.id,context.state.effects, [id \in DOMAIN context.state.effects |-> context.wouldGroups[id]],ActualWouldPeriods99(world),order,receipt) WouldAccountingCriterion99(subtype,minimum) == [kind |-> "Damage",subtype |-> subtype,actor |-> "SideA",minimumPresent |-> TRUE,minimum |-> minimum,targetSitePresent |-> TRUE,targetSite |-> "SchemaAtom082"] WouldAccountingReplacement99(id,fromSubtype,toSubtype,amount,policy,count) == [id |-> id,source |-> RuleAbilitySource9("StructuralWouldReplacement99"),sourceSHA |-> "SyntheticNormalizedRuleControl99", pattern |-> [kind |-> "Damage",damageType |-> fromSubtype],wouldGrouping |-> policy, behavior |-> [mode |-> "Replace",results |-> [index \in 1..count |-> [kind |-> "Damage",damageType |-> toSubtype,value |-> amount,actor |-> "SideA",targetSite |-> "SchemaAtom082",preventable |-> TRUE, targeted |-> FALSE,targetCard |-> 0,specifications |-> [structural |-> TRUE],restrictions |-> {}]]]] WouldAccountingStep99(state,input,replacements,world,chosen,resultIds) == LET decision == ReplacementDecision99(state,input,replacements,world,chosen,resultIds) IN [decision |-> decision,after |-> ReplacementNextState99(state,input,replacements,chosen,resultIds,decision), trace |-> <<[effectId |-> input,decision |-> decision]>>] WouldAccountingAppliedContext99(before,origin,world,nextState,groups) == LET oldIds == DOMAIN before.state.effects newIds == DOMAIN nextState.effects archive == ReplacementOverlay99(before.ancestryArchive,ReplacementOverlay99(before.state.ancestry,nextState.ancestry)) IN [before EXCEPT !.state=nextState,!.currentRef=OriginReference99(origin),!.currentWorld=world.id, !.templates=ReplacementOverlay99(@,nextState.effects),!.ancestryArchive=archive, !.retiredEffects=@ \cup (oldIds \ newIds),!.wouldGroups=groups] WouldAccountingNetCoreNetFixture99 == LET s == WouldAccountingScenario99(4900,5000,5100,501,"HarmClassA",3,901,2) netToCore == [id \in {71} |-> WouldAccountingReplacement99(id,"HarmClassA","PersistentCapacityHarm",1,"Preserve",1)] coreToNet == [id \in {72} |-> WouldAccountingReplacement99(id,"PersistentCapacityHarm","HarmClassA",2,"Preserve",1)] one == WouldAccountingStep99(s.context.state,1,netToCore,s.world,71,<<11>>) origin1 == [s.origin EXCEPT !.plan.revision=1] world1 == [s.world EXCEPT !.id=502] groups1 == ReplacementWouldGroups99(s.context.wouldGroups,<>,one.trace,netToCore) context1 == WouldAccountingAppliedContext99(s.context,origin1,world1,one.after,groups1) two == WouldAccountingStep99(one.after,11,coreToNet,world1,72,<<12>>) origin2 == [s.origin EXCEPT !.plan.revision=2] world2 == [s.world EXCEPT !.id=503] groups2 == ReplacementWouldGroups99(groups1,<>,two.trace,coreToNet) context2 == WouldAccountingAppliedContext99(context1,origin2,world2,two.after,groups2) receipt0 == WouldCurrentReceiptFixture99(1,s.context,s.world,<<1>>) h0 == WouldAccountingCommitted99(NewWouldAccounting99,s.context,s.world,<<1>>,receipt0) receipt1 == WouldCurrentReceiptFixture99(2,context1,world1,<<11>>) h1 == WouldAccountingCommitted99(h0,context1,world1,<<11>>,receipt1) receipt2 == WouldCurrentReceiptFixture99(3,context2,world2,<<12>>) h2 == WouldAccountingCommitted99(h1,context2,world2,<<12>>,receipt2) IN [s |-> s,one |-> one,two |-> two,netToCore |-> netToCore,coreToNet |-> coreToNet, origin1 |-> origin1,origin2 |-> origin2,world1 |-> world1,world2 |-> world2,context1 |-> context1,context2 |-> context2, receipt0 |-> receipt0,receipt1 |-> receipt1,receipt2 |-> receipt2,h0 |-> h0,h1 |-> h1,h2 |-> h2] WouldAccountingStableGroupChecks99 == LET f == WouldAccountingNetCoreNetFixture99 s == f.s group == s.context.wouldGroups[1] turn == TimingRef9("Turn",901) traversal == TimingRef9("SchemaAtom138",2) net == WouldAccountingCriterion99("HarmClassA",1) core == WouldAccountingCriterion99("PersistentCapacityHarm",1) IN /\ ActualImminenceEntry99(s.entry,s.origin,s.world,CardFacts9) /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,5000,s.origin,s.world,s.entry,s.description,s.projection,s.context.initialEffects,s.entry.owner,CardFacts9,NewWouldAccounting99,f.h0,f.receipt0) /\ s.context.currentRef.origin="Rule" /\ s.context.currentRef.abilityInstance=0 /\ s.context.currentRef.index=0 /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,f.h0,s.context,s.origin,s.world,<<1>>,f.receipt0) /\ ApplyReplacementStep99(s.context.state,f.one.after,1,f.netToCore,s.world,f.one.decision) /\ AppliedReplacementContext99(s.context,f.context1,s.origin,f.origin1,f.world1,f.one.after,1) /\ ObserveCurrentExpectedWould99(f.h0,f.h1,f.context1,f.origin1,f.world1,<<11>>,f.receipt1) /\ ApplyReplacementStep99(f.one.after,f.two.after,11,f.coreToNet,f.world1,f.two.decision) /\ AppliedReplacementContext99(f.context1,f.context2,f.origin1,f.origin2,f.world2,f.two.after,1) /\ ObserveCurrentExpectedWould99(f.h1,f.h2,f.context2,f.origin2,f.world2,<<12>>,f.receipt2) /\ 1 \notin DOMAIN f.context1.state.effects /\ 11 \notin DOMAIN f.context2.state.effects /\ f.context1.state.effects[11].lineage=1 /\ f.context2.state.effects[12].lineage=1 /\ f.context1.wouldGroups[11]=group /\ f.context2.wouldGroups[12]=group /\ DOMAIN f.h2.groups={group} /\ Len(f.h2.evidence)=3 /\ \A period \in {turn,traversal} : /\ WouldOrdinalCountCurrent99(f.h2,period,net)=1 /\ WouldOrdinalCountCurrent99(f.h2,period,core)=1 /\ WouldOrdinalAtCurrent99(f.h2,group,period,net)=1 /\ WouldOrdinalAtCurrent99(f.h2,group,period,core)=1 /\ WouldViewCurrent99(f.h2,f.context2,f.world2) /\ ~WouldViewCurrent99(f.h0,f.context2,f.world2) WouldAccountingFirstMatchOrderChecks99 == LET f == WouldAccountingNetCoreNetFixture99 independent == WouldAccountingScenario99(4901,5001,5101,502,"PersistentCapacityHarm",1,901,2) receipt == WouldCurrentReceiptFixture99(4,independent.context,independent.world,<<1>>) both == WouldAccountingCommitted99(f.h0,independent.context,independent.world,<<1>>,receipt) coreWorld == [f.world1 EXCEPT !.id=503] coreContext == [f.context1 EXCEPT !.currentWorld=503] coreReceipt == WouldCurrentReceiptFixture99(5,coreContext,coreWorld,<<11>>) oldNowCore == WouldAccountingCommitted99(both,coreContext,coreWorld,<<11>>,coreReceipt) turn == TimingRef9("Turn",901) criterion == WouldAccountingCriterion99("PersistentCapacityHarm",1) oldGroup == f.s.context.wouldGroups[1] independentGroup == independent.context.wouldGroups[1] IN /\ ActualImminenceEntry99(independent.entry,independent.origin,independent.world,CardFacts9) /\ ObserveCurrentExpectedWould99(f.h0,both,independent.context,independent.origin,independent.world,<<1>>,receipt) /\ ObserveCurrentExpectedWould99(both,oldNowCore,coreContext,f.origin1,coreWorld,<<11>>,coreReceipt) /\ FirstWouldMatchSerial99(oldNowCore,independentGroup,turn,criterion)=2 /\ FirstWouldMatchSerial99(oldNowCore,oldGroup,turn,criterion)=3 /\ WouldOrdinalAtCurrent99(oldNowCore,independentGroup,turn,criterion)=1 /\ WouldOrdinalAtCurrent99(oldNowCore,oldGroup,turn,criterion)=2 /\ WouldOrdinalCountCurrent99(oldNowCore,turn,criterion)=2 /\ WouldOrdinalAtCurrent99(oldNowCore,oldGroup,turn,WouldAccountingCriterion99("HarmClassA",1))=1 WouldAccountingThresholdChecks99 == LET s == WouldAccountingScenario99(4910,5010,5110,601,"HarmClassA",0,901,0) c0 == s.context w1 == [s.world EXCEPT !.id=602] o1 == [s.origin EXCEPT !.plan.revision=1] c1 == [c0 EXCEPT !.currentRef=OriginReference99(o1),!.currentWorld=602,!.state.effects[1].value=1] w2 == [s.world EXCEPT !.id=603] o2 == [s.origin EXCEPT !.plan.revision=2] c2 == [c1 EXCEPT !.currentRef=OriginReference99(o2),!.currentWorld=603,!.state.effects[1].value=0] w3 == [s.world EXCEPT !.id=604] o3 == [s.origin EXCEPT !.plan.revision=3] c3 == [c2 EXCEPT !.currentRef=OriginReference99(o3),!.currentWorld=604,!.state.effects[1].value=2] r0 == WouldCurrentReceiptFixture99(10,c0,s.world,<<1>>) h0 == WouldAccountingCommitted99(NewWouldAccounting99,c0,s.world,<<1>>,r0) r1 == WouldCurrentReceiptFixture99(11,c1,w1,<<1>>) h1 == WouldAccountingCommitted99(h0,c1,w1,<<1>>,r1) r2 == WouldCurrentReceiptFixture99(12,c2,w2,<<1>>) h2 == WouldAccountingCommitted99(h1,c2,w2,<<1>>,r2) r3 == WouldCurrentReceiptFixture99(13,c3,w3,<<1>>) h3 == WouldAccountingCommitted99(h2,c3,w3,<<1>>,r3) period == TimingRef9("Turn",901) criterion == WouldAccountingCriterion99("HarmClassA",1) clause == [mode |-> "WouldTrigger",pattern |-> [kind |-> "Damage",damageType |-> "HarmClassA"],period |-> period,ordinal |-> 1,criterion |-> criterion] IN /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,h0,c0,s.origin,s.world,<<1>>,r0) /\ ObserveCurrentExpectedWould99(h0,h1,c1,o1,w1,<<1>>,r1) /\ ObserveCurrentExpectedWould99(h1,h2,c2,o2,w2,<<1>>,r2) /\ ObserveCurrentExpectedWould99(h2,h3,c3,o3,w3,<<1>>,r3) /\ ModifyExpectedEffectValue99(c0.state.effects,c1.state.effects,1,1) /\ ModifyExpectedEffectValue99(c1.state.effects,c2.state.effects,1,-1) /\ ModifyExpectedEffectValue99(c2.state.effects,c3.state.effects,1,2) /\ WouldOrdinalCountCurrent99(h0,period,criterion)=0 /\ \A h \in {h1,h2,h3} : WouldOrdinalCountCurrent99(h,period,criterion)=1 /\ WouldOrdinalCountCurrent99(h3,period,WouldAccountingCriterion99("HarmClassA",2))=1 /\ WouldOrdinalCountCurrent99(h3,period,WouldAccountingCriterion99("HarmClassA",3))=0 /\ FirstWouldMatchSerial99(h3,c0.wouldGroups[1],period,criterion)=2 /\ ~CapabilityRelevant99(clause,c2.state.effects[1],c2,w2,h2) /\ CapabilityRelevant99(clause,c3.state.effects[1],c3,w3,h3) WouldAccountingProfileAndPeriodsChecks99 == LET f == WouldAccountingNetCoreNetFixture99 s == f.s c == s.context receipt == f.receipt0 criterion == WouldAccountingCriterion99("HarmClassA",1) IN /\ ActualWouldPeriods99(s.world)={TimingRef9("Turn",901),TimingRef9("SchemaAtom138",2)} /\ \A turn \in {901,902} : \A traversal \in {0,2,3} : LET sample == WouldAccountingScenario99(4920,5020,5120,701,"HarmClassA",1,turn,traversal) r == WouldCurrentReceiptFixture99(20,sample.context,sample.world,<<1>>) h == WouldAccountingCommitted99(NewWouldAccounting99,sample.context,sample.world,<<1>>,r) IN /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,h,sample.context,sample.origin,sample.world,<<1>>,r) /\ WouldOrdinalCountCurrent99(h,TimingRef9("Turn",turn),criterion)=1 /\ WouldOrdinalCountCurrent99(h,TimingRef9("Turn",IF turn=901 THEN 902 ELSE 901),criterion)=0 /\ WouldOrdinalCountCurrent99(h,TimingRef9("SchemaAtom138",IF traversal=0 THEN 2 ELSE traversal),criterion)=(IF traversal=0 THEN 0 ELSE 1) /\ WouldOrdinalCountCurrent99(h,TimingRef9("ItemInspection",traversal),criterion)=0 /\ \A field \in {"contextId","imminenceId","reference","snapshotId","effects","groups","periods","order"} : LET wrong == CASE field="contextId" -> [receipt EXCEPT !.contextId=999] [] field="imminenceId" -> [receipt EXCEPT !.imminenceId=999] [] field="reference" -> [receipt EXCEPT !.reference.revision=99] [] field="snapshotId" -> [receipt EXCEPT !.snapshotId=999] [] field="effects" -> [receipt EXCEPT !.effects[1].value=9] [] field="groups" -> [receipt EXCEPT !.groups[1]= <>] [] field="periods" -> [receipt EXCEPT !.periods={TimingRef9("ItemInspection",2)}] [] OTHER -> [receipt EXCEPT !.order= <<>>] after == WouldAccountingCommitted99(NewWouldAccounting99,c,s.world,<<1>>,wrong) IN ~ObserveCurrentExpectedWould99(NewWouldAccounting99,after,c,s.origin,s.world,<<1>>,wrong) /\ LET repeated == WouldAccountingCommitted99(f.h0,c,s.world,<<1>>,receipt) IN ~ObserveCurrentExpectedWould99(f.h0,repeated,c,s.origin,s.world,<<1>>,receipt) /\ LET foreign == WouldAccountingScenario99(4999,5999,c.imminenceId,999,"HarmClassA",3,901,2) r == WouldCurrentReceiptFixture99(99,foreign.context,foreign.world,<<1>>) after == WouldAccountingCommitted99(f.h0,foreign.context,foreign.world,<<1>>,r) IN ~ObserveCurrentExpectedWould99(f.h0,after,foreign.context,foreign.origin,foreign.world,<<1>>,r) /\ \A wrongGroup \in {<<999,1>>,<>} : LET badContext == [c EXCEPT !.wouldGroups[1]=wrongGroup] r == WouldCurrentReceiptFixture99(98,badContext,s.world,<<1>>) after == WouldAccountingCommitted99(NewWouldAccounting99,badContext,s.world,<<1>>,r) IN ~ObserveCurrentExpectedWould99(NewWouldAccounting99,after,badContext,s.origin,s.world,<<1>>,r) /\ WouldViewCurrent99(f.h0,c,s.world) /\ \A field \in {"imminenceId","reference","snapshotId","effects","groups"} : LET wrong == CASE field="imminenceId" -> [receipt EXCEPT !.imminenceId=999] [] field="reference" -> [receipt EXCEPT !.reference.revision=99] [] field="snapshotId" -> [receipt EXCEPT !.snapshotId=999] [] field="effects" -> [receipt EXCEPT !.effects[1].value=9] [] OTHER -> [receipt EXCEPT !.groups[1]= <>] stale == [f.h0 EXCEPT !.latest[c.id]=wrong] IN ~WouldViewCurrent99(stale,c,s.world) WouldAccountingGroupingPathsChecks99 == LET s == WouldAccountingScenario99(4930,5030,5130,801,"HarmClassA",3,901,2) original == s.context.wouldGroups[1] IN \A policy \in {"Preserve","SeparateResults"} : LET rs == [id \in {81} |-> WouldAccountingReplacement99(id,"HarmClassA","PersistentCapacityHarm",1,policy,2)] split == WouldAccountingStep99(s.context.state,1,rs,s.world,81,<<11,12>>) g1 == ReplacementWouldGroups99(s.context.wouldGroups,<>,split.trace,rs) backRs == [id \in {82} |-> WouldAccountingReplacement99(id,"PersistentCapacityHarm","HarmClassA",2,"Preserve",1)] back == WouldAccountingStep99(split.after,11,backRs,s.world,82,<<13>>) g2 == ReplacementWouldGroups99(g1,<>,back.trace,backRs) deeperRs == [id \in {83} |-> WouldAccountingReplacement99(id,"HarmClassA","PersistentCapacityHarm",1,"SeparateResults",2)] deeper == WouldAccountingStep99(back.after,13,deeperRs,s.world,83,<<14,15>>) g3 == ReplacementWouldGroups99(g2,<>,deeper.trace,deeperRs) allRs == ReplacementOverlay99(rs,ReplacementOverlay99(backRs,deeperRs)) folded == ReplacementWouldGroups99(s.context.wouldGroups,<>, split.trace \o back.trace \o deeper.trace,allRs) IN /\ ApplyReplacementStep99(s.context.state,split.after,1,rs,s.world,split.decision) /\ ApplyReplacementStep99(split.after,back.after,11,backRs,s.world,back.decision) /\ ApplyReplacementStep99(back.after,deeper.after,13,deeperRs,s.world,deeper.decision) /\ DOMAIN g1={11,12} /\ DOMAIN g2={12,13} /\ DOMAIN g3={12,14,15} /\ g1[11]=(IF policy="Preserve" THEN original ELSE Append(original,11)) /\ g1[12]=(IF policy="Preserve" THEN original ELSE Append(original,12)) /\ g2[13]=g1[11] /\ g2[12]=g1[12] /\ g3[14]=Append(g1[11],14) /\ g3[15]=Append(g1[11],15) /\ g3[12]=g1[12] /\ folded=g3 /\ \A id \in {12,14,15} : deeper.after.effects[id].lineage=1 /\ g3[14] # g3[15] ExampleFamily021ExposureMarkerDefinition99 == [LexicalConditionalFixture99(9010,"Specimen0241",2,"AvoidExposureMarker") EXCEPT !.trigger.kinds={"AvoidExposureMarker","RemoveExposureMarker"},!.triggerRequirements={401},!.effectChoices={{},{1}},!.optionalParts={1}, !.instructions= <<750>>,!.partsByInstruction=[id \in {750} |-> {1}]] ExampleFamily021NoExampleFamily026Definition99(source) == LET d == LexicalConditionalFixture99(9011+source,"Specimen0162",source,"WouldTakeExposureMarkers") IN [d EXCEPT !.syntax.units= <> \o d.syntax.units, !.primaryCondition=2,!.trigger.kinds={"WouldTakeExposureMarkers","WouldNetDamage"},!.triggerRequirements={402}, !.effectChoices={{},{1}},!.optionalParts={1},!.instructionHasWould=TRUE] ExampleFamily021Specimen0070Definition99(source,id) == LET d == PaidDefinitionFixture95(id,"Specimen0070",<<"Interrupt">>,<<[kind |-> "RetireSource",amount |-> 1]>>) IN [d EXCEPT !.syntax.source=ObjectAbilitySource9(source),!.activity.source=ObjectAbilitySource9(source)] ExampleFamily021Definitions99(card,objects) == LET tag == ExampleFamily021ExposureMarkerDefinition99 oldExampleFamily026 == ExampleFamily021NoExampleFamily026Definition99(3) newExampleFamily026 == ExampleFamily021NoExampleFamily026Definition99(13) keys == {ConditionalKey96(tag)} \cup IF card="Specimen0162" THEN {ConditionalKey96(oldExampleFamily026)} \cup (IF 13 \in DOMAIN objects THEN {ConditionalKey96(newExampleFamily026)} ELSE {}) ELSE {} IN [key \in keys |-> IF key=ConditionalKey96(tag) THEN tag ELSE IF key=ConditionalKey96(oldExampleFamily026) THEN oldExampleFamily026 ELSE newExampleFamily026] ExampleFamily021Lexemes99(definitions) == [key \in DOMAIN definitions |-> IF key=ConditionalKey96(ExampleFamily021ExposureMarkerDefinition99) THEN LexicalSingleFixture99(definitions[key],"Specimen0241","avoid",1,"ActualOccurrenceTrigger",CardFacts9) ELSE LexicalSingleFixture99(definitions[key],"Specimen0162","would",2,"ImminentTrigger",CardFacts9)] ExampleFamily021Object99(card,zone,deployed) == ReplacementOverlay99(CardObject9(card,zone,deployed,IF zone="SideBHand" THEN "Down" ELSE "Up"), [subtypes |-> {},deployCost |-> IF card="Specimen0162" THEN 0 ELSE IF card="Specimen0070" THEN 1 ELSE 3,deployX |-> FALSE]) ExampleFamily021InitialSnapshot99(card,objects) == LET base == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",ExampleFamily021Definitions99(card,objects),objects) IN ReplacementOverlay99(base,[present |-> base.present \cup {9000},exposureMarkerAvoidsOrRemoves |-> [turn \in {1} |-> {}]]) ExampleFamily021Snapshot99(id,checkpoint,point,card,objects,ledger,avoids) == LET defs == ExampleFamily021Definitions99(card,objects) base == SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(id,checkpoint,point,defs,objects),ledger) IN ReplacementOverlay99(base,[activationEpoch |-> ConditionalEpochMap96(ledger,defs),activationSerial |-> ledger.activationSerial, usedObjects |-> DOMAIN objects \cup ledger.lastSnapshot.usedObjects, present |-> base.present \cup (IF 1 \in DOMAIN objects THEN {9000} ELSE {}) \cup (IF card="Specimen0070" /\ 13 \in DOMAIN objects THEN {9020} ELSE {}),exposureMarkerAvoidsOrRemoves |-> [turn \in {1} |-> avoids]]) ExampleFamily021Checkpoint99(ledger,id,card,objects,avoids,caller,events) == [ConditionalCheckpointFixture96(ledger,id, ExampleFamily021Snapshot99(10*id,id,"CheckpointBeginning",card,objects,ledger,avoids), ExampleFamily021Snapshot99(10*id+1,id,"ProcedureCodee605a78f5d5e",card,objects,ledger,avoids),events) EXCEPT !.caller=caller] ExampleFamily021Conditions99(definitions,events) == [key \in DOMAIN definitions |-> [id \in DOMAIN events |-> [ConditionalTriggerReceiptFixture96(definitions[key],events[id]) EXCEPT !.results= [part \in definitions[key].triggerRequirements |-> IF key=ConditionalKey96(ExampleFamily021ExposureMarkerDefinition99) THEN events[id].snapshot.exposureMarkerAvoidsOrRemoves[1]={} ELSE FALSE]]]] ExampleFamily021ProcessCheckpoint99(before,after,beforeStack,afterStack,cp,allocation,bindings,usedWindows) == ProcessConditionalCheckpoint99(before,after,beforeStack,afterStack,cp.processingSnapshot.definitions, ExampleFamily021Lexemes99(cp.processingSnapshot.definitions),cp,ExampleFamily021Conditions99(cp.processingSnapshot.definitions,cp.occurrences), allocation,bindings,Empty9,Empty9,usedWindows,CardFacts9) ExampleFamily021StartFixture99(card) == LET objects == [id \in {1,2,3} |-> IF id=1 THEN ExampleFamily021Object99("Specimen0070","Play",TRUE) ELSE IF id=2 THEN ExampleFamily021Object99("Specimen0241","Play",TRUE) ELSE ExampleFamily021Object99(card,"SideBHand",FALSE)] initial == ExampleFamily021InitialSnapshot99(card,objects) seed == NewConditionalLedger96(initial) ruleStep == "StructuralGive2ExposureMarkers99" rulePlan == OpenInstruction93(790,"Rule",0,RuleAbilitySource9(ruleStep),"NoValue",0,ruleStep,<<"GiveSideB2ExposureMarkers">>,FALSE) ruleImminent == [rulePlan EXCEPT !.phase="Imminent"] site == [TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",3) EXCEPT !.step=ruleStep] opening == [OpeningFixture92(600,"Interrupt",site,Empty9,60,NoTimingRef9) EXCEPT !.instruction=InstructionWindowRef93(ruleImminent)] w == NewPriorityWindow9(600,"Interrupt",site,Empty9,60,NoTimingRef9,opening.instruction,1) cp1 == ExampleFamily021Checkpoint99(seed,1,card,objects,{},ConditionalPriorityCaller96(w),Empty9) received == ConditionalCommittedFixture96(seed,initial.definitions,cp1,Empty9,Empty9,Empty9) ready == [ReadyFixture92(w) EXCEPT !.checkpoint=1] d == ExampleFamily021Specimen0070Definition99(1,9000) lex == LexicalSingleFixture99(d,"Specimen0070","prevent",3,"EffectOperator",CardFacts9) c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.present=initial.present,!.currentEffect=EffectFixture92(ready,{}, {9000}), !.paidRelevance=[tag |-> "PaidInterruptRelevance",windowId |-> 600,instruction |-> ready.instruction,revision |-> 1,eligible |-> {AbilityKey99(d)}]] option == PaidOptionFixture95(d,ready) busy == StartedFixture92(ready,option) p == OpenPaidProcedure95(900,d,option,ready,LegalityFixture92(ready,option).transactionId,"Play") trashed == [id \in {2,3,11} |-> IF id=11 THEN ExampleFamily021Object99("Specimen0070","SideBDiscard",FALSE) ELSE objects[id]] payment == [PaidPaymentFixture95(p,objects,trashed,11,TRUE,FALSE) EXCEPT !.paidOperations={[kind |-> "RetireSource",object |-> 1]}] paid == PaidCommittedFixture95(p,Empty9,FALSE) cp2 == ExampleFamily021Checkpoint99(received,2,card,trashed,{},PaidCheckpointCaller96(paid),Empty9) costLedger == ConditionalCommittedFixture96(received,initial.definitions,cp2,Empty9,Empty9,Empty9) planning == PaidTargetsFrame95(paid,2) plan == OpenInstruction93(700,"Ability",900,d.syntax.source,"Play",1,"NoValue",<<"Prevent1ExposureMarker">>,FALSE) imminentP == PaidImminentFrame95(planning) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] resolvingP == PaidResolvingFrame95(imminentP) resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] finishedP == PaidFinishedFrame95(resolvingP) finishedPlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"Prevent1ExposureMarker">>] exposureMarkers2 == [id \in {401} |-> [ReplacementAtomFixture99(401,401,"ExposureMarkers",FALSE,0) EXCEPT !.baseOrigin=ruleImminent.source]] beforeExposureMarkers == [id \in {401} |-> ReplacementOverlay99(exposureMarkers2[id],[value |-> 2,preventable |-> TRUE,targetSite |-> "NoValue"])] afterExposureMarkers == [beforeExposureMarkers EXCEPT ![401].value=1] callback == [tag |-> "ResolvedInterruptEffectModification",status |-> "Resolved",classification |-> "Interrupt",abilityKind |-> "Paid", id |-> 901,abilityInstance |-> 900,source |-> d.syntax.source,beforeEffects |-> beforeExposureMarkers,afterEffects |-> afterExposureMarkers, revisionBefore |-> 1,revisionAfter |-> 2,operation |-> "PreventAmount",instruction |-> InstructionWindowRef93(ruleImminent)] observation == CHOOSE observed \in PositivePreventionObservations99(beforeExposureMarkers,afterExposureMarkers,callback) : observed.effectId=401 eventSnapshot == ExampleFamily021Snapshot99(25,2,"BeforeAvoidExposureMarker",card,trashed,costLedger,{}) events == [id \in {31} |-> ConditionalEventFixture96(id,"AvoidExposureMarker",0,"SideB","SideB",eventSnapshot,callback.id)] cp3 == ExampleFamily021Checkpoint99(costLedger,3,card,trashed,{31},PaidCheckpointCaller96(finishedP),events) key == [definition |-> ConditionalKey96(ExampleFamily021ExposureMarkerDefinition99),occurrence |-> 31] allocation == [k \in {key} |-> 9100] bindings == ConditionalBindingsFixture96({key},3,610,61) recognized == ConditionalCommittedFixture96(costLedger,initial.definitions,cp3,allocation,bindings,Empty9) IN [card |-> card,objects |-> objects,initial |-> initial,seed |-> seed,ruleStep |-> ruleStep,rulePlan |-> rulePlan,ruleImminent |-> ruleImminent, site |-> site,opening |-> opening,w |-> w,cp1 |-> cp1,received |-> received,ready |-> ready,d |-> d,lex |-> lex,c |-> c,option |-> option,busy |-> busy,p |-> p, trashed |-> trashed,payment |-> payment,paid |-> paid,cp2 |-> cp2,costLedger |-> costLedger,planning |-> planning,plan |-> plan, imminentP |-> imminentP,imminentPlan |-> imminentPlan,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan,finishedP |-> finishedP,finishedPlan |-> finishedPlan, beforeExposureMarkers |-> beforeExposureMarkers,afterExposureMarkers |-> afterExposureMarkers,callback |-> callback,observation |-> observation,events |-> events,cp3 |-> cp3,allocation |-> allocation,bindings |-> bindings,recognized |-> recognized] ExampleFamily021StartValid99(s) == /\ EnterRuleInstruction93(s.rulePlan,s.ruleImminent,s.ruleStep) /\ OpenInstructionInterrupt93(<<>>,<>,600,s.site,Empty9,s.opening,{},s.ruleImminent,"NoValue",s.ruleStep) /\ ExampleFamily021ProcessCheckpoint99(s.seed,s.received,<>,<>,s.cp1,Empty9,Empty9,{600}) /\ CheckpointPriorityWithConditionals96(s.received,<>,<>,[CheckpointFixture92(s.w) EXCEPT !.id=1]) /\ ReservePaidAbility99(<>,<>,s.p,900,s.d,s.lex,s.c,s.option,LegalityFixture92(s.ready,s.option),{},CardFacts9) /\ CardBatchTransfer8(s.objects,s.trashed,{1},[id \in {1} |-> 11],DOMAIN s.objects,"SideBDiscard","Up",[id \in {1} |-> "SideBDiscard"]) /\ PayPaidTrigger95(<>,s.p,s.paid,s.objects,s.trashed,Empty9,Empty9,Empty9,DOMAIN s.objects,s.payment,Empty9,PaidUsesFixture95(s.p),Empty9,PaidTurnUsesFixture95(s.p),1,{PaidUseFixture95(s.p)}) /\ s.paid.ability.detached /\ s.paid.ability.source=ObjectAbilitySource9(1) /\ 1 \notin DOMAIN s.trashed /\ ObserveConditionalActivity96(s.received,s.received,s.received,<>,<>, ExampleFamily021Snapshot99(12,1,"BeforeSpecimen0070Cost",s.card,s.objects,s.received,{}),ExampleFamily021Snapshot99(13,1,"AfterSpecimen0070Cost",s.card,s.trashed,s.received,{})) /\ ExampleFamily021ProcessCheckpoint99(s.received,s.costLedger,<>,<>,s.cp2,Empty9,Empty9,{600}) /\ PaidCheckpointWithConditionals96(s.costLedger,<>,s.paid,s.planning,s.trashed,Empty9,PaidCheckpointFixture95(s.paid,2)) /\ EnterPaidInstruction95(<>,s.planning,s.imminentP,s.plan,s.imminentPlan,[InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}],PaidEntryFixture95(s.plan,2)) /\ ResolvePaidWithoutInterrupt95(<>,s.imminentP,s.resolvingP,s.imminentPlan,s.resolvingPlan,NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0)) /\ PreventExpectedAmount99(s.beforeExposureMarkers,s.afterExposureMarkers,401,1) /\ PositivePreventionObserved99(s.beforeExposureMarkers,s.afterExposureMarkers,401,s.callback) /\ s.observation.kind="AvoidExposureMarker" /\ s.observation.amount=1 /\ CarryPaidInstruction95(<>,s.resolvingP,s.finishedP,s.resolvingPlan,s.finishedPlan, [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "Prevent1ExposureMarker",complete |-> TRUE]) /\ ExampleFamily021ProcessCheckpoint99(s.costLedger,s.recognized,<>,<>,s.cp3,s.allocation,s.bindings,{600}) /\ s.callback.abilityInstance=s.p.id /\ s.callback.source=s.p.ability.source /\ s.events[31].effectId=s.callback.id /\ s.events[31].snapshot.exposureMarkerAvoidsOrRemoves[1]={} /\ s.cp3.processingSnapshot.exposureMarkerAvoidsOrRemoves[1]={31} /\ s.recognized.instances[9100].definitionCopy=ExampleFamily021ExposureMarkerDefinition99 /\ ~s.recognized.instances[9100].member.interrupt /\ s.recognized.instances[9100].member.windowId=610 /\ s.recognized.instances[9100].occurrence=31 /\ ~FlagPresent93(ExampleFamily021ExposureMarkerDefinition99.syntax.units,"OncePerTurn") /\ ConditionalOptional96(ExampleFamily021ExposureMarkerDefinition99) /\ PaidCheckpoint95(<>,s.finishedP,[s.finishedP EXCEPT !.phase="Complete",!.checkpoint=3],s.trashed,Empty9,PaidCheckpointFixture95(s.finishedP,3)) /\ s.recognized.checkpoints[3].caller=PaidCheckpointCaller96(s.finishedP) /\ ~ConditionalCheckpointDrained96(s.recognized,<>,3) /\ ~PaidCheckpointWithConditionals96(s.recognized,<>,s.finishedP,[s.finishedP EXCEPT !.phase="Complete",!.checkpoint=3],s.trashed,Empty9,PaidCheckpointFixture95(s.finishedP,3)) ExampleFamily021DeployAuthorized99(p,plan,objects) == /\ p.definition=ExampleFamily021ExposureMarkerDefinition99 /\ p.phase="Resolve" /\ plan.phase="Resolving" /\ plan.id=750 /\ plan.abilityInstance=p.id /\ plan.source=ObjectAbilitySource9(2) /\ plan.steps= <<"DeployChosenBHandCardDiscount1">> /\ plan.targets={3} /\ 3 \in DOMAIN objects /\ objects[3].zone="SideBHand" /\ objects[3].kind="Support" /\ objects[3].card \in {"Specimen0162","Specimen0070"} ExampleFamily021DeployFixture99(s,p,plan,ledger) == LET start == OpenDeploy8(9200,3,"SideB","Up",p.id,"NoValue") staged == [start EXCEPT !.object=13,!.stage="ProcedureCode6eba7e0bfa75"] stagedObjects == [id \in {2,11,13} |-> IF id=13 THEN DeployStagingRow8(s.trashed[3],"Up",TRUE) ELSE s.trashed[id]] defs == ExampleFamily021Definitions99(s.card,stagedObjects) stagedLedger == [ledger EXCEPT !.activationEpoch=ConditionalEpochMap96(ledger,defs)] destination == [zone |-> "Play",loc |-> <<"Rig","Support">>,area |-> "SideBRig",targetSite |-> "NoValue",targetSiteKind |-> "NoValue",position |-> "NoValue",host |-> 0] declared == [staged EXCEPT !.destination=destination,!.stage="ProcedureCode61973f2a75d8"] afterLike == [declared EXCEPT !.stage="ProcedureCode1ff52d705816"] transaction == [id |-> 9300,procedureId |-> 9200,object |-> 13,allPaid |-> TRUE, basePart |-> DeployInherentPart8(stagedObjects[13],"Up",stagedObjects,destination,0),deployCostIgnored |-> FALSE, paidSomething |-> TRUE,checkpointRequired |-> TRUE,discount |-> 1, amountPaid |-> ModifiedCost(stagedObjects[13].deployCost,<<>>,<<1>>),source |-> ObjectAbilitySource9(2),abilityInstance |-> p.id] barrier == [afterLike EXCEPT !.stage="CostBarrier",!.transaction=9300,!.checkpointRequired=TRUE] cp5 == ExampleFamily021Checkpoint99(stagedLedger,5,s.card,stagedObjects,{31},[kind |-> "DeployCost",deployId |-> 9200,transactionId |-> 9300],Empty9) costLedger == ConditionalCommittedFixture96(stagedLedger,defs,cp5,Empty9,Empty9,Empty9) ready == [barrier EXCEPT !.stage="ProcedureCode0f76bcc2eb00"] placed == [ready EXCEPT !.stage="ProcedureCode4585e6a51427"] deployedObjects == [stagedObjects EXCEPT ![13]=[WithCardLocation8(@,destination) EXCEPT !.deployed=TRUE]] complete == [placed EXCEPT !.stage="Complete",!.complete=TRUE,!.deployedOccurred=TRUE] beforeDeployed == ExampleFamily021Snapshot99(52,5,"BeforeDeployed",s.card,stagedObjects,costLedger,{31}) events == [id \in {41} |-> ReplacementOverlay99(ConditionalEventFixture96(id,"Deployed",13,"SideB","SideB",beforeDeployed,9200), [raw |-> DeployBeginEvent8(placed),deploySource |-> 3,deploySuccessor |-> 13])] cp6 == ExampleFamily021Checkpoint99(costLedger,6,s.card,deployedObjects,{31},[kind |-> "DeployInstruction",deployId |-> 9200],events) deployedLedger == ConditionalCommittedFixture96(costLedger,defs,cp6,Empty9,Empty9,Empty9) verified == [complete EXCEPT !.verificationDone=TRUE] returned == [verified EXCEPT !.returned=TRUE] IN [p |-> p,plan |-> plan,ledger |-> ledger,start |-> start,staged |-> staged,stagedObjects |-> stagedObjects,stagedLedger |-> stagedLedger, destination |-> destination,declared |-> declared,afterLike |-> afterLike,transaction |-> transaction,barrier |-> barrier,cp5 |-> cp5,costLedger |-> costLedger, ready |-> ready,placed |-> placed,deployedObjects |-> deployedObjects,complete |-> complete,events |-> events,cp6 |-> cp6,deployedLedger |-> deployedLedger, verified |-> verified,returned |-> returned] ExampleFamily021DeployValid99(s,g,stack) == /\ ExampleFamily021DeployAuthorized99(g.p,g.plan,s.trashed) /\ BeginDeploy8(g.start,g.staged,s.trashed,g.stagedObjects,13,{1,2,3,11},ExampleFamily021DeployAuthorized99(g.p,g.plan,s.trashed),FALSE,s.trashed[3].kind="Support") /\ ObserveConditionalActivity96(g.ledger,g.ledger,g.stagedLedger,stack,stack, ExampleFamily021Snapshot99(43,4,"BeforeDeployStaging",s.card,s.trashed,g.ledger,{31}), ExampleFamily021Snapshot99(44,4,"AfterDeployStaging",s.card,g.stagedObjects,g.stagedLedger,{31})) /\ DeclareDeployDestination8(g.staged,g.declared,g.stagedObjects,g.destination,FALSE,Empty9,{},FALSE, g.destination.area="SideBRig" /\ g.destination.host=0,{}, {}) /\ FinishDeployLikeRetire8(g.declared,g.afterLike,g.stagedObjects,{}, {},[id \in DOMAIN g.stagedObjects |-> g.stagedObjects[id].kind], [id \in DOMAIN g.stagedObjects |-> "SideB"],LAMBDA trashed : [techniqueIds |-> {},demand |-> Empty9,limit |-> 4,allocationFits |-> TRUE],g.stagedObjects[13].kind="Support") /\ g.transaction.amountPaid=0 /\ g.transaction.discount=1 /\ ~g.transaction.deployCostIgnored /\ PayDeployStep8(g.afterLike,g.barrier,g.stagedObjects,g.transaction,0,~g.stagedObjects[13].deployX) /\ ExampleFamily021ProcessCheckpoint99(g.stagedLedger,g.costLedger,stack,stack,g.cp5,Empty9,Empty9,{600,610}) /\ DrainDeployCostBarrier8(g.barrier,g.ready,9300,5,ConditionalCheckpointDrained96(g.costLedger,stack,5)) /\ DeployAtDestination8(g.ready,g.placed,g.stagedObjects,g.deployedObjects,Empty9,Empty9,{}, {}, g.deployedObjects[13].kind="Support" /\ g.destination.host=0) /\ FinishDeploy8(g.placed,g.complete,g.deployedObjects,{DeployBeginEvent8(g.placed)}) /\ ObserveConditionalActivity96(g.costLedger,g.costLedger,g.costLedger,stack,stack, ExampleFamily021Snapshot99(52,5,"BeforeDeployActivation",s.card,g.stagedObjects,g.costLedger,{31}), ExampleFamily021Snapshot99(53,5,"AfterDeployActivation",s.card,g.deployedObjects,g.costLedger,{31})) /\ ExampleFamily021ProcessCheckpoint99(g.costLedger,g.deployedLedger,stack,stack,g.cp6,Empty9,Empty9,{600,610}) /\ VerifyDeployedCard8(g.complete,g.verified,FALSE,g.deployedObjects[13].card=s.card,[performed |-> FALSE,object |-> 13,afterDeployment |-> TRUE]) /\ ReturnDeployToCaller8(g.verified,g.returned,ConditionalCheckpointDrained96(g.deployedLedger,stack,6),g.p.id) /\ 3 \notin DOMAIN g.deployedObjects /\ g.deployedObjects[13].card=s.card /\ g.deployedObjects[13].deployed /\ g.deployedObjects[13].zone="Play" /\ g.deployedObjects[13].face="Up" ExampleFamily021ChainFixture99(card) == LET s == ExampleFamily021StartFixture99(card) tag == ExampleFamily021ExposureMarkerDefinition99 members == ConditionalWindowMembers96(s.recognized.instances,610) child == WindowFixture92(610,"Reaction",s.site,members,61,NoTimingRef9) cp4 == ExampleFamily021Checkpoint99(s.recognized,4,card,s.trashed,{31},ConditionalPriorityCaller96(child),Empty9) received == ConditionalCommittedFixture96(s.recognized,s.initial.definitions,cp4,Empty9,Empty9,Empty9) ready == [ReadyFixture92(child) EXCEPT !.checkpoint=4] option == ConditionalOptionFixture92(ready,9100) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(9100,tag,ready,option,LegalityFixture92(ready,option).transactionId,"Play") plan == OpenInstruction93(750,"Ability",9100,tag.syntax.source,"Play",1,"NoValue",<<"DeployChosenBHandCardDiscount1">>,TRUE) imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={3},!.phase="Imminent"] selected == [received EXCEPT !.instances[9100].status="Imminent"] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {"DeployChosenBHandCardDiscount1"}] resolving == [selected EXCEPT !.instances[9100].status="Resolving",!.instances[9100].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> expected.effects]]] deploy == ExampleFamily021DeployFixture99(s,resolvingP,resolvingPlan,resolving) usedEvent == [tag |-> "AbilityUsed",useId |-> 2,abilityInstance |-> 9100,source |-> ObjectAbilitySource9(2),player |-> "SideB"] uses == [id \in {1,2} |-> IF id=1 THEN PaidUseFixture95(s.p) ELSE usedEvent] turnUses == [id \in {1,2} |-> IF id=1 THEN PaidTurnUsesFixture95(s.p)[1] ELSE [turnId |-> 1,ability |-> 9010,source |-> ObjectAbilitySource9(2),useId |-> 2]] used == [deploy.deployedLedger EXCEPT !.instances[9100].used=TRUE] completeP == [resolvingP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"DeployChosenBHandCardDiscount1">>] complete == [used EXCEPT !.instances[9100].status="Complete"] cp7 == ExampleFamily021Checkpoint99(complete,7,card,deploy.deployedObjects,{31},ConditionalInstructionCaller96(completeP),Empty9) finalLedger == ConditionalCommittedFixture96(complete,ExampleFamily021Definitions99(card,deploy.deployedObjects),cp7,Empty9,Empty9,Empty9) finalP == [completeP EXCEPT !.phase="Complete",!.checkpoint=7] returnedP == [finalP EXCEPT !.phase="Returned",!.ability.returned=TRUE] returned == CompletePriorityOptionFrame9(busy) conditionalCP == [tag |-> "ConditionalInstructionCheckpoint",id |-> 7,abilityInstance |-> 9100,transactionId |-> p.transaction, source |-> tag.syntax.source,instruction |-> 750,index |-> 1,complete |-> TRUE,allNewerChainsComplete |-> TRUE] cp8 == ExampleFamily021Checkpoint99(finalLedger,8,card,deploy.deployedObjects,{31},ConditionalPriorityCaller96(returned),Empty9) received8 == ConditionalCommittedFixture96(finalLedger,ExampleFamily021Definitions99(card,deploy.deployedObjects),cp8,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(returned) EXCEPT !.checkpoint=8] passed == PassPriorityFrame9(sideB) cp9 == ExampleFamily021Checkpoint99(received8,9,card,deploy.deployedObjects,{31},ConditionalPriorityCaller96(passed),Empty9) received9 == ConditionalCommittedFixture96(received8,ExampleFamily021Definitions99(card,deploy.deployedObjects),cp9,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(passed) EXCEPT !.checkpoint=9] closed == PassPriorityFrame9(sideA) paidFinal == [s.finishedP EXCEPT !.phase="Complete",!.checkpoint=3] paidReturned == [paidFinal EXCEPT !.phase="Returned",!.ability.returned=TRUE] parentReturned == CompletePriorityOptionFrame9(s.busy) cp10 == ExampleFamily021Checkpoint99(received9,10,card,deploy.deployedObjects,{31},ConditionalPriorityCaller96(parentReturned),Empty9) received10 == ConditionalCommittedFixture96(received9,ExampleFamily021Definitions99(card,deploy.deployedObjects),cp10,Empty9,Empty9,Empty9) parentReady == [ReadyFixture92(parentReturned) EXCEPT !.checkpoint=10] IN [s |-> s,tag |-> tag,members |-> members,child |-> child,cp4 |-> cp4,received |-> received,ready |-> ready,option |-> option,busy |-> busy, p |-> p,plan |-> plan,imminentP |-> imminentP,imminentPlan |-> imminentPlan,selected |-> selected,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan, expected |-> expected,resolving |-> resolving,deploy |-> deploy,usedEvent |-> usedEvent,uses |-> uses,turnUses |-> turnUses,used |-> used, completeP |-> completeP,completePlan |-> completePlan,complete |-> complete,cp7 |-> cp7,finalLedger |-> finalLedger,finalP |-> finalP, returnedP |-> returnedP,returned |-> returned,conditionalCP |-> conditionalCP,cp8 |-> cp8,received8 |-> received8,sideB |-> sideB,passed |-> passed, cp9 |-> cp9,received9 |-> received9,sideA |-> sideA,closed |-> closed,paidFinal |-> paidFinal,paidReturned |-> paidReturned,parentReturned |-> parentReturned, cp10 |-> cp10,received10 |-> received10,parentReady |-> parentReady] ExampleFamily021ChainValid99(g) == LET s == g.s objects == g.deploy.deployedObjects IN /\ ExampleFamily021StartValid99(s) /\ OpenConditionalReaction96(<>,<>,s.recognized,610,s.site,OpeningFixture92(610,"Reaction",s.site,g.members,61,NoTimingRef9),{600}) /\ ExampleFamily021ProcessCheckpoint99(s.recognized,g.received,<>,<>,g.cp4,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(g.received,<>,<>,[CheckpointFixture92(g.child) EXCEPT !.id=4]) /\ BeginConditionalResolutionCore99(g.received,g.selected,<>,<>,g.p,g.imminentP,g.tag, ExampleFamily021Lexemes99(s.initial.definitions)[ConditionalKey96(g.tag)], ExampleFamily021Snapshot99(42,4,"BeforeExampleFamily021Choice",s.card,s.trashed,g.received,{31}),9100,g.option,LegalityFixture92(g.ready,g.option),Empty9, g.plan,g.imminentPlan,[InstructionTargetsFixture93(g.plan) EXCEPT !.targets={3}],InstructionEntryFixture93(g.plan),PaidTurnUsesFixture95(s.p), [tag |-> "AbilityRestrictions",ability |-> 9010,source |-> ObjectAbilitySource9(2),results |-> Empty9],CardFacts9) /\ ResolveConditionalWithoutInterrupt96(g.selected,g.resolving,<>,g.imminentP,g.resolvingP,g.imminentPlan,g.resolvingPlan, NoModifiersFixture95(g.imminentPlan),InstructionClearanceFixture93(g.imminentPlan,0,0),g.expected) /\ ExampleFamily021DeployValid99(s,g.deploy,<>) /\ RecordConditionalExecutionUse96(g.deploy.deployedLedger,g.used,g.resolvingP,g.resolvingPlan, [tag |-> "ConditionalEffectExecution",instruction |-> InstructionWindowRef93(g.resolvingPlan),abilityInstance |-> 9100,source |-> ObjectAbilitySource9(2),partIds |-> {1}], PaidUsesFixture95(s.p),g.uses,PaidTurnUsesFixture95(s.p),g.turnUses,2,{g.usedEvent}) /\ CarryConditionalInstruction96(g.used,g.complete,g.complete,<>,<>,g.resolvingP,g.completeP,g.resolvingPlan,g.completePlan, [tag |-> "InstructionStepReturn",instruction |-> 750,index |-> 1,step |-> "DeployChosenBHandCardDiscount1",complete |-> TRUE], ExampleFamily021Snapshot99(62,6,"BeforeExampleFamily021InstructionReturn",s.card,objects,g.used,{31}), ExampleFamily021Snapshot99(63,6,"AfterExampleFamily021InstructionReturn",s.card,objects,g.complete,{31})) /\ ExampleFamily021ProcessCheckpoint99(g.complete,g.finalLedger,<>,<>,g.cp7,Empty9,Empty9,{600,610}) /\ ConditionalInstructionCheckpoint96(g.finalLedger,<>,g.completeP,g.finalP,g.conditionalCP) /\ FinishConditionalProcedure96(<>,<>,g.finalP,g.returnedP,PaidReturnFixture95(g.busy,7)) /\ ExampleFamily021ProcessCheckpoint99(g.finalLedger,g.received8,<>,<>,g.cp8,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(g.received8,<>,<>,[CheckpointFixture92(g.returned) EXCEPT !.id=8]) /\ PassConditionalPriority96(g.received8,g.received8,g.received8,<>,<>,"SideB",Empty9, ExampleFamily021Snapshot99(82,8,"BeforeExampleFamily021SideBPass",s.card,objects,g.received8,{31}),ExampleFamily021Snapshot99(83,8,"AfterExampleFamily021SideBPass",s.card,objects,g.received8,{31})) /\ ExampleFamily021ProcessCheckpoint99(g.received8,g.received9,<>,<>,g.cp9,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(g.received9,<>,<>,[CheckpointFixture92(g.passed) EXCEPT !.id=9]) /\ PassConditionalPriority96(g.received9,g.received9,g.received9,<>,<>,"SideA",Empty9, ExampleFamily021Snapshot99(92,9,"BeforeExampleFamily021SideAPass",s.card,objects,g.received9,{31}),ExampleFamily021Snapshot99(93,9,"AfterExampleFamily021SideAPass",s.card,objects,g.received9,{31})) /\ PopClosedPriorityWindow9(<>,<>) /\ ConditionalCheckpointDrained96(g.received9,<>,3) /\ PaidCheckpointWithConditionals96(g.received9,<>,s.finishedP,g.paidFinal,objects,Empty9,PaidCheckpointFixture95(s.finishedP,3)) /\ FinishPaidProcedure95(<>,<>,g.paidFinal,g.paidReturned,PaidReturnFixture95(s.busy,3)) /\ ExampleFamily021ProcessCheckpoint99(g.received9,g.received10,<>,<>,g.cp10,Empty9,Empty9,{600,610}) /\ CheckpointPriorityWithConditionals96(g.received10,<>,<>,[CheckpointFixture92(g.parentReturned) EXCEPT !.id=10]) /\ s.busy.stage="Resolving" /\ s.busy.reception=s.ready.reception /\ s.busy.busy=s.option /\ ActionablePriority9(<>)={} /\ ActionablePriority9(<>)={} /\ ~CheckpointPriority9(<>,<>,CheckpointFixture92(s.busy)) /\ g.parentReturned.stage="NeedCheckpoint" /\ ActionablePriority9(<>)={} /\ g.parentReady.checkpoint=10 /\ ActionablePriority9(<>)={"SideB"} /\ g.received10.instances[9100].status="Complete" /\ g.received10.instances[9100].used /\ DOMAIN g.received10.instances={9100} /\ g.parentReady.members=s.w.members /\ DOMAIN g.parentReady.members={} ExampleFamily021FreshNoExampleFamily026Checks99 == LET g == ExampleFamily021ChainFixture99("Specimen0162") d == ExampleFamily021NoExampleFamily026Definition99(13) current == ExampleFamily021Snapshot99(102,10,"AfterExampleFamily021NewExampleFamily026",g.s.card,g.deploy.deployedObjects,g.received10,{31}) oldExampleFamily026 == ExampleFamily021NoExampleFamily026Definition99(3) lex == ExampleFamily021Lexemes99(current.definitions)[ConditionalKey96(d)] IN /\ ExampleFamily021ChainValid99(g) /\ ~ConditionalActive96(oldExampleFamily026,g.s.initial) /\ ConditionalActive96(d,current) /\ AbilityInterrupt99(d,lex) /\ current.activationEpoch[ConditionalKey96(d)]=0 /\ current.activationSerial=0 /\ g.s.afterExposureMarkers[401].value=1 /\ d.trigger.kinds={"WouldTakeExposureMarkers","WouldNetDamage"} /\ DOMAIN g.s.w.members={} /\ DOMAIN g.parentReady.members={} /\ DOMAIN g.received10.instances={9100} /\ 13 \in DOMAIN current.objects /\ 3 \notin DOMAIN current.objects /\ g.s.busy.kind="Interrupt" /\ g.child.kind="Reaction" ExampleFamily021FreshPaidFixture99(g) == LET d == ExampleFamily021Specimen0070Definition99(13,9020) lex == LexicalSingleFixture99(d,"Specimen0070","prevent",3,"EffectOperator",CardFacts9) current == ExampleFamily021Snapshot99(102,10,"AfterExampleFamily021NewSpecimen0070",g.s.card,g.deploy.deployedObjects,g.received10,{31}) c == [PaidContextFixture95(d,current.objects,TurnFixture92("SideB")) EXCEPT !.present=current.present,!.uses=g.turnUses, !.currentEffect=[EffectFixture92(g.parentReady,{}, {9020}) EXCEPT !.revision=2], !.paidRelevance=[tag |-> "PaidInterruptRelevance",windowId |-> 600,instruction |-> g.parentReady.instruction,revision |-> 2,eligible |-> {AbilityKey99(d)}]] option == [PaidOptionFixture95(d,g.parentReady) EXCEPT !.id=61] busy == StartedFixture92(g.parentReady,option) p == OpenPaidProcedure95(1000,d,option,g.parentReady,LegalityFixture92(g.parentReady,option).transactionId,"Play") IN [d |-> d,lex |-> lex,current |-> current,c |-> c,option |-> option,busy |-> busy,p |-> p] ExampleFamily021FreshSpecimen0070Checks99 == LET g == ExampleFamily021ChainFixture99("Specimen0070") q == ExampleFamily021FreshPaidFixture99(g) d == q.d lex == q.lex c == q.c option == q.option busy == q.busy p == q.p IN /\ ExampleFamily021ChainValid99(g) /\ PaidEligibility99(d,lex,c,g.parentReady,CardFacts9) /\ ReservePaidAbility99(<>,<>,p,1000,d,lex,c,option,LegalityFixture92(g.parentReady,option),{900,9100},CardFacts9) /\ d.syntax.source=ObjectAbilitySource9(13) /\ p.ability.source=ObjectAbilitySource9(13) /\ g.s.p.ability.source=ObjectAbilitySource9(1) /\ LET beforeReceptionOption == [option EXCEPT !.id=62] beforeReceptionBusy == StartedFixture92(g.parentReturned,beforeReceptionOption) beforeReceptionP == OpenPaidProcedure95(1001,d,beforeReceptionOption,g.parentReturned,LegalityFixture92(g.parentReturned,beforeReceptionOption).transactionId,"Play") IN ~ReservePaidAbility99(<>,<>,beforeReceptionP,1001,d,lex,c,beforeReceptionOption, LegalityFixture92(g.parentReturned,beforeReceptionOption),{900,9100},CardFacts9) /\ ~FlagPresent93(d.syntax.units,"OncePerTurn") /\ AbilityInterrupt99(d,lex) /\ PaidWindowKinds99(d,lex)={"Interrupt"} /\ g.parentReady.id=600 /\ g.parentReady.kind="Interrupt" /\ busy.kind="Interrupt" /\ g.s.afterExposureMarkers[401].value=1 /\ ~g.deploy.deployedObjects[11].deployed /\ g.deploy.deployedObjects[13].deployed ExampleFamily021Checks99 == /\ ExampleFamily021FreshNoExampleFamily026Checks99 /\ ExampleFamily021FreshSpecimen0070Checks99 RelevanceSpecimen0105Definition99 == LET d == LexicalConditionalFixture99(9101,"NeutralValue00009",3,"WouldRetire") IN [d EXCEPT !.syntax.units= <> \o d.syntax.units,!.primaryCondition=2, !.trigger.subject="SchemaAtom149",!.instructionHasWould=TRUE] RelevanceClassDefinition99 == LET d == LexicalConditionalFixture99(9102,"Specimen0237",5,"WouldDraw") IN [d EXCEPT !.syntax.units= <> \o d.syntax.units,!.primaryCondition=2,!.instructionHasWould=TRUE] RelevanceExampleFamily068Definition99 == LET d == LexicalConditionalFixture99(9103,"Specimen0249",6,"WouldNetDamage") IN [d EXCEPT !.syntax.units= <> \o d.syntax.units,!.primaryCondition=2,!.instructionHasWould=TRUE, !.effectChoices={{},{1}},!.optionalParts={1}] RelevanceConstructDefinition99 == LET d == PaidDefinitionFixture95(9104,"Specimen0206",<<"Interrupt">>,<<[kind |-> "RetireSource",amount |-> 1]>>) IN [d EXCEPT !.syntax.source=ObjectAbilitySource9(4),!.activity.source=ObjectAbilitySource9(4)] RelevanceDefinitions99 == [key \in {ConditionalKey96(RelevanceSpecimen0105Definition99),ConditionalKey96(RelevanceClassDefinition99),ConditionalKey96(RelevanceExampleFamily068Definition99)} |-> IF key=ConditionalKey96(RelevanceSpecimen0105Definition99) THEN RelevanceSpecimen0105Definition99 ELSE IF key=ConditionalKey96(RelevanceClassDefinition99) THEN RelevanceClassDefinition99 ELSE RelevanceExampleFamily068Definition99] RelevanceLexemes99(d) == IF d.syntax.kind="Paid" THEN LexicalSingleFixture99(d,"Specimen0206","prevent",3,"EffectOperator",CardFacts9) ELSE LET card == CASE d.syntax.id=9101 -> "NeutralValue00009" [] d.syntax.id=9102 -> "Specimen0237" [] OTHER -> "Specimen0249" IN LexicalReceiptFixture99(d,card,[i \in IF d.syntax.id \in {9101,9103} THEN {1,2} ELSE {1} |-> IF i=1 THEN LexicalMentionFixture99(d,"would",2,"ImminentTrigger") ELSE LexicalMentionFixture99(d,"instead",3,"EffectOperator")],CardFacts9) RelevanceCriterion99(kind,subtype,actor,minimum,minimumPresent,targetSite,targetSitePresent) == [kind |-> kind,subtype |-> subtype,actor |-> actor,minimum |-> minimum,minimumPresent |-> minimumPresent,targetSite |-> targetSite,targetSitePresent |-> targetSitePresent] RelevanceCapabilities99(d,lex,turnId,traversalId) == LET h == [mode |-> "WouldTrigger",pattern |-> [kind |-> "Retire",targetCard |-> 3],ordinal |-> 0,period |-> TimingRef9("Turn",turnId)] draw == [mode |-> "WouldTrigger",pattern |-> [kind |-> "Draw",actor |-> "SideB"],ordinal |-> 1,period |-> TimingRef9("Turn",turnId), criterion |-> RelevanceCriterion99("Draw","NoValue","SideB",0,FALSE,"NoValue",FALSE)] netPattern == [kind |-> "Damage",damageType |-> "HarmClassA",actor |-> "SideA",targetSite |-> "SchemaAtom082",minValue |-> 1] net == [mode |-> "WouldTrigger",pattern |-> netPattern,ordinal |-> 1,period |-> TimingRef9("SchemaAtom138",IF traversalId=0 THEN 2 ELSE traversalId), criterion |-> RelevanceCriterion99("Damage","HarmClassA","SideA",1,TRUE,"SchemaAtom082",TRUE)] clauses == CASE d.syntax.id=9101 -> [id \in {1,2} |-> IF id=1 THEN h ELSE [mode |-> "CreateReplacement",pattern |-> h.pattern,replacementPattern |-> h.pattern]] [] d.syntax.id=9102 -> [id \in {1} |-> draw] [] d.syntax.id=9103 -> [id \in {1,2} |-> IF id=1 THEN net ELSE [mode |-> "CreateReplacement",pattern |-> netPattern,replacementPattern |-> netPattern]] [] OTHER -> [id \in {1} |-> [mode |-> "PreventWhole",pattern |-> [kind |-> "Retire",targetCard |-> 3]]] IN [tag |-> "NormalizedInterruptCapabilities",definition |-> d,origin |-> lex.origin,clauses |-> clauses, primaryGroups |-> IF d.syntax.kind="Conditional" THEN [group \in {1} |-> {1}] ELSE Empty9] RelevanceObjects99 == [id \in {3,4,5,6} |-> IF id=3 THEN CardObject9("NeutralValue00009","Play",TRUE,"Up") ELSE IF id=4 THEN CardObject9("Specimen0206","Play",TRUE,"Up") ELSE IF id=5 THEN CardObject9("Specimen0237","Play",TRUE,"Up") ELSE [CardObject9("Specimen0249","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.targetSite="SchemaAtom082",!.area="Root",!.targetSiteKind="SchemaAtom033"]] RelevanceSnapshot99(id,cp,point,objects,ledger) == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(id,cp,point,RelevanceDefinitions99,objects),ledger) EXCEPT !.present=@ \cup (IF 4 \in DOMAIN objects THEN {9104} ELSE {}), !.activationEpoch=ConditionalEpochMap96(ledger,RelevanceDefinitions99),!.activationSerial=ledger.activationSerial, !.usedObjects=@ \cup ledger.lastSnapshot.usedObjects] RelevanceWorld99(base,objects,ledger,id,cp,point,traversal) == LET snapshot == RelevanceSnapshot99(id,cp,point,objects,ledger) pd == RelevanceConstructDefinition99 paid == [key \in {AbilityKey99(pd)} |-> pd] all == ReplacementOverlay99(RelevanceDefinitions99,paid) lexemes == [key \in DOMAIN all |-> RelevanceLexemes99(all[key])] control == PaidTraversalControlFixture95(traversal) c == [PaidContextFixture95(pd,objects,base.turn) EXCEPT !.present=snapshot.present,!.activity=snapshot.activity,!.points=snapshot.points,!.traversal=traversal,!.traversalControl=control] IN ReplacementOverlay99(base,[id |-> id,objects |-> objects,controllers |-> [object \in DOMAIN objects |-> objects[object].side],traversalControl |-> control, conditional |-> snapshot,paidDefinitions |-> paid,lexemes |-> lexemes, capabilities |-> [key \in DOMAIN all |-> RelevanceCapabilities99(all[key],lexemes[key],base.turn.id,traversal.id)], paidContexts |-> [key \in DOMAIN paid |-> c],turnUses |-> Empty9,replacementDefinitions |-> Empty9,liveReplacementIds |-> {}]) RelevanceObserveWorld99(world,ledger) == LET snapshot == SnapshotWithConditionalRegistry96(world.conditional,ledger) IN [world EXCEPT !.conditional=snapshot,!.paidContexts=[key \in DOMAIN @ |-> [@[key] EXCEPT !.activity=snapshot.activity,!.present=snapshot.present,!.points=snapshot.points]]] RelevanceReadyWorld99(world,context,history,ledger,w) == LET c == world.paidContexts[AbilityKey99(RelevanceConstructDefinition99)] IN [world EXCEPT !.paidContexts[AbilityKey99(RelevanceConstructDefinition99)]= [c EXCEPT !.currentEffect=CurrentEffectReceipt99(context,world,history,ledger,w), !.paidRelevance=CurrentPaidRelevanceReceipt99(context,world,history,w)]] RelevanceAtom99(id,kind,step) == [StaticAtomFixture99(id,kind,step) EXCEPT !.value=IF kind="Draw" THEN 2 ELSE IF kind="Damage" THEN 3 ELSE 1, !.actor=IF kind="Draw" THEN "SideB" ELSE "SideA",!.targeted=kind="Retire",!.targetCard=IF kind="Retire" THEN 3 ELSE 0] RelevancePreparedFixture99(before,ledger,world,allocation,windowId,group) == LET keys == DOMAIN allocation ids == {allocation[key] : key \in keys} additions == [id \in ids |-> NewOpeningInterruptInstance99(id,world.conditional.definitions[CHOOSE key \in keys : allocation[key]=id], world.conditional,ledger,before,windowId,group)] afterLedger == [ledger EXCEPT !.instances=ReplacementOverlay99(@,additions), !.interruptRecognitions=@ \cup {[definition |-> key,occurrence |-> before.imminenceId] : key \in keys}] after == [before EXCEPT !.phase="Prepared",!.preparedEffects=before.state.effects,!.openingRef=before.currentRef, !.conditionalIds=ids,!.conditionalDefinitions=[key \in keys |-> world.conditional.definitions[key]],!.windowId=windowId,!.group=group, !.openingMembers=[id \in ids |-> additions[id].member]] IN [context |-> after,ledger |-> afterLedger] RelevanceOpeningFixture99(mode) == LET base == StaticProjectionFixture99 objects == RelevanceObjects99 initialSnapshot == [ConditionalSnapshotFixture96(501,0,"ProcedureCodee605a78f5d5e",RelevanceDefinitions99,objects) EXCEPT !.present=@ \cup {9104}] ledger == NewConditionalLedger96(initialSnapshot) traversal == IF mode="ExampleFamily068" THEN TraversalFixture92("ProcedureCodef1914978bb8e") ELSE NoTraversal6 world == RelevanceWorld99(base.world,objects,ledger,501,0,"ProcedureCodee605a78f5d5e",traversal) effects == IF mode="ExampleFamily068" THEN [id \in {1} |-> RelevanceAtom99(id,"Damage",base.origin.ruleStep)] ELSE [id \in {1,2} |-> RelevanceAtom99(id,IF id=1 THEN "Retire" ELSE "Draw",base.origin.ruleStep)] description == [base.description EXCEPT !.effects=effects,!.order=IF mode="ExampleFamily068" THEN <<1>> ELSE <<1,2>>] projection == [base.projection EXCEPT !.description=description,!.forbiddenIds=IF mode="Specimen0105" THEN {2} ELSE {},!.values=Empty9] initial == [id \in DOMAIN effects \ projection.forbiddenIds |-> effects[id]] before == NewExpectedContext99(4500,base.entry.id,base.origin,world,description,initial,base.entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {4500} |-> before],!.entryIds={base.entry.id},!.usedContextIds={4500}] order == IF mode="Specimen0105" \/ mode="ExampleFamily068" THEN <<1>> ELSE <<1,2>> receipt == RuleWouldReceiptFixture99(4800,before,world,order) history == RuleWouldAfterFixture99(NewWouldAccounting99,before,world,order,receipt) candidates == OpeningConditionalKeys99(before,world,history,ledger) allocation == [key \in candidates |-> IF key=ConditionalKey96(RelevanceSpecimen0105Definition99) THEN 5001 ELSE IF key=ConditionalKey96(RelevanceClassDefinition99) THEN 5002 ELSE 5003] prepared == RelevancePreparedFixture99(before,ledger,world,allocation,4900,49) postWorld == RelevanceObserveWorld99(world,prepared.ledger) site == PrioritySite9("Turn",base.origin.ruleStep,world.turn.phase,TimingRef9("TurnPhase",10),world.turn.owner,world.turn.id,0,0,3,0,FALSE, ActualImminenceEntry99(base.entry,base.origin,world,CardFacts9),~world.turn.formalEnded) opening == PreparedOriginOpening99(prepared.context,site) window == NewPriorityWindow9(4900,"Interrupt",site,prepared.context.openingMembers,49,NoTimingRef9,prepared.context.openingRef,1) opened == [prepared.context EXCEPT !.phase="WindowOpen",!.site=site] IN [mode |-> mode,base |-> base,objects |-> objects,ledger |-> ledger,world |-> world,description |-> description,projection |-> projection,initial |-> initial, before |-> before,registry |-> registry,receipt |-> receipt,history |-> history,candidates |-> candidates,allocation |-> allocation, prepared |-> prepared,postWorld |-> postWorld,site |-> site,opening |-> opening,window |-> window,opened |-> opened] RelevanceOpeningValid99(s) == /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,4500,s.base.origin,s.world,s.base.entry,s.description,s.projection,s.initial,s.base.entry.owner,CardFacts9,NewWouldAccounting99,s.history,s.receipt) /\ CurrentInterruptWorld99(s.world,s.ledger,CardFacts9) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,s.history,s.before,s.base.origin,s.world, IF s.mode="Specimen0105" \/ s.mode="ExampleFamily068" THEN <<1>> ELSE <<1,2>>,s.receipt) /\ PrepareOpeningInterrupts99(s.before,s.prepared.context,s.ledger,s.prepared.ledger,s.base.origin,s.world,s.history,4900,49,s.allocation,{},CardFacts9) /\ OpenPreparedInterrupt99(s.prepared.context,s.opened,<<>>,<>,s.base.origin,s.postWorld,s.history,s.prepared.ledger,s.site,s.opening,{},CardFacts9) /\ s.opened.initialEffects=s.initial /\ s.opened.preparedEffects=s.initial /\ s.opened.openingMembers=s.window.members /\ s.opened.conditionalIds=DOMAIN s.window.members RelevanceCheckpointFixture99(ledger,id,objects,caller) == [ConditionalCheckpointFixture96(ledger,id,RelevanceSnapshot99(600+2*id,id,"CheckpointBeginning",objects,ledger), RelevanceSnapshot99(601+2*id,id,"ProcedureCodee605a78f5d5e",objects,ledger),Empty9) EXCEPT !.caller=caller] RelevanceCheckpointValid99(before,after,stack,cp) == ProcessConditionalCheckpoint99(before,after,stack,stack,RelevanceDefinitions99, [key \in DOMAIN RelevanceDefinitions99 |-> RelevanceLexemes99(RelevanceDefinitions99[key])],cp, ConditionalConditionsFixture96(RelevanceDefinitions99,Empty9),Empty9,Empty9,Empty9,Empty9,{4900},CardFacts9) RelevanceOptionalPassFixture99 == LET s == RelevanceOpeningFixture99("ExampleFamily068") cp1 == RelevanceCheckpointFixture99(s.prepared.ledger,1,s.objects,ConditionalPriorityCaller96(s.window)) received1 == ConditionalCommittedFixture96(s.prepared.ledger,RelevanceDefinitions99,cp1,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(s.window) EXCEPT !.checkpoint=1] passed == PassPriorityFrame9(sideA) cp2 == RelevanceCheckpointFixture99(received1,2,s.objects,ConditionalPriorityCaller96(passed)) received2 == ConditionalCommittedFixture96(received1,RelevanceDefinitions99,cp2,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(passed) EXCEPT !.checkpoint=2] closed == PassPriorityFrame9(sideB) lost == [received2 EXCEPT !.instances[5003].status="Lost"] lostWorld == RelevanceObserveWorld99(s.postWorld,lost) IN [s |-> s,cp1 |-> cp1,received1 |-> received1,sideA |-> sideA,passed |-> passed,cp2 |-> cp2,received2 |-> received2, sideB |-> sideB,closed |-> closed,lost |-> lost,lostWorld |-> lostWorld] RelevanceOptionalPassChecks99 == LET g == RelevanceOptionalPassFixture99 s == g.s IN /\ RelevanceOpeningValid99(s) /\ s.opened.conditionalIds={5003} /\ ~s.window.members[5003].mandatory /\ s.world.traversalControl.traversal.id=2 /\ s.world.traversalControl.traversal.attacked="SchemaAtom082" /\ s.world.objects[6].targetSite="SchemaAtom082" /\ CurrentPendingRelevant99(s.opened,s.postWorld,s.history,s.prepared.ledger)={5003} /\ RelevanceCheckpointValid99(s.prepared.ledger,g.received1,<>,g.cp1) /\ CheckpointPriorityWithConditionals96(g.received1,<>,<>,[CheckpointFixture92(s.window) EXCEPT !.id=1]) /\ PassCurrentInterrupt99(g.received1,g.received1,g.received1,<>,<>,"SideA",s.opened,s.base.origin,s.postWorld,s.history, s.postWorld.conditional,RelevanceSnapshot99(610,1,"AfterExampleFamily068SideAPass",s.objects,g.received1),CardFacts9) /\ g.passed.pending={5003} /\ g.passed.lostPending={} /\ g.received1.instances[5003].status="Pending" /\ RelevanceCheckpointValid99(g.received1,g.received2,<>,g.cp2) /\ CheckpointPriorityWithConditionals96(g.received2,<>,<>,[CheckpointFixture92(g.passed) EXCEPT !.id=2]) /\ PassCurrentInterrupt99(g.received2,g.lost,g.lost,<>,<>,"SideB",s.opened,s.base.origin,s.postWorld,s.history, s.postWorld.conditional,RelevanceSnapshot99(611,2,"AfterExampleFamily068WindowClose",s.objects,g.lost),CardFacts9) /\ ~g.closed.open /\ g.closed.pending={} /\ g.closed.lostPending={5003} /\ g.lost.instances[5003].status="Lost" /\ ConditionalInstanceCurrent96(g.lost.instances[5003],RelevanceDefinitions99,g.lostWorld.conditional) /\ CurrentPendingRelevant99(s.opened,g.lostWorld,s.history,g.lost)={} /\ PopClosedPriorityWindow9(<>,<<>>) RelevanceExampleFamily068StartFixture99 == LET g == RelevanceOptionalPassFixture99 s == g.s d == RelevanceExampleFamily068Definition99 ledger == g.received1 w == g.sideA world == s.postWorld option == ConditionalOptionFixture92(w,5003) busy == StartedFixture92(w,option) p == OpenConditionalProcedure96(5003,d,w,option,LegalityFixture92(w,option).transactionId,"Play") plan == OpenInstruction93(700,"Ability",5003,d.syntax.source,"Play",1,"NoValue",<<"MayPay2CreateCoreReplacement">>,FALSE) imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] selectedLedger == [ledger EXCEPT !.instances[5003].status="Imminent"] targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={}] receipt == InstructionEntryFixture93(plan) restrictions == [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9] selection == SelectedInterrupt99(imminentP,d,world.lexemes[AbilityKey99(d)],world.capabilities[AbilityKey99(d)],s.opened,world) callerEntry == [tag |-> "ActualInstructionEntry",id |-> 5500,snapshotId |-> world.id,kind |-> "ConditionalFirst", before |-> p,after |-> imminentP,beforePlan |-> plan,afterPlan |-> imminentPlan,stackBefore |-> <>,stackAfter |-> <>, beforeLedger |-> ledger,afterLedger |-> selectedLedger,definition |-> d,lexemes |-> world.lexemes[AbilityKey99(d)],snapshot |-> world.conditional, instance |-> 5003,option |-> option,legality |-> LegalityFixture92(w,option),targets |-> targets,receipt |-> receipt,turnUses |-> Empty9,restrictions |-> restrictions, parentContext |-> s.opened,parentOrigin |-> s.base.origin,parentWorld |-> world,parentHistory |-> s.history, owner |-> [windowId |-> w.id,option |-> option,transaction |-> LegalityFixture92(w,option).transactionId]] IN [g |-> g,s |-> s,d |-> d,ledger |-> ledger,w |-> w,world |-> world,option |-> option,busy |-> busy,p |-> p,plan |-> plan, imminentP |-> imminentP,imminentPlan |-> imminentPlan,selectedLedger |-> selectedLedger,targets |-> targets,receipt |-> receipt, restrictions |-> restrictions,selection |-> selection,callerEntry |-> callerEntry] RelevanceExampleFamily068StartChecks99 == LET g == RelevanceExampleFamily068StartFixture99 IN /\ RelevanceOptionalPassChecks99 /\ SelectCurrentConditionalInterrupt99(g.ledger,g.selectedLedger,<>,<>,g.p,g.imminentP,g.selection,g.d,g.world.conditional,5003, g.option,LegalityFixture92(g.w,g.option),g.plan,g.imminentPlan,g.targets,g.receipt,Empty9,g.restrictions, g.s.opened,g.s.base.origin,g.world,g.s.history,CardFacts9) /\ g.selectedLedger.instances[5003].status="Imminent" /\ g.busy.busy.instance=5003 /\ g.busy.stage="Resolving" /\ g.imminentPlan.announced /\ g.imminentPlan.targets={} /\ g.imminentP.ability.detached RelevancePostPreventWhole99(before,origin,world,effectId) == LET effects == [id \in DOMAIN before.state.effects \ {effectId} |-> before.state.effects[id]] IN [before EXCEPT !.currentRef=OriginReference99(origin),!.currentWorld=world.id,!.state.effects=effects, !.state.ancestry=[id \in DOMAIN effects |-> before.state.ancestry[id]], !.ancestryArchive=ReplacementOverlay99(@,before.state.ancestry),!.removedEffects=@ \cup {effectId},!.modificationIds=@ \cup {5600}, !.modifications=Append(@,[kind |-> "PostPreventionComponentInput",operationId |-> 5600,source |-> ObjectAbilitySource9(4), beforeEffects |-> before.state.effects,afterEffects |-> effects,from |-> before.currentRef,to |-> OriginReference99(origin)])] RelevanceSpecimen0105Fixture99 == LET s == RelevanceOpeningFixture99("Specimen0105") cp1 == RelevanceCheckpointFixture99(s.prepared.ledger,1,s.objects,ConditionalPriorityCaller96(s.window)) received1 == ConditionalCommittedFixture96(s.prepared.ledger,RelevanceDefinitions99,cp1,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(s.window) EXCEPT !.checkpoint=1] passed == PassPriorityFrame9(sideA) cp2 == RelevanceCheckpointFixture99(received1,2,s.objects,ConditionalPriorityCaller96(passed)) received2 == ConditionalCommittedFixture96(received1,RelevanceDefinitions99,cp2,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(passed) EXCEPT !.checkpoint=2] blockedClosed == PassPriorityFrame9(sideB) blockedLost == [received2 EXCEPT !.instances[5001].status="Lost"] world == RelevanceReadyWorld99(s.postWorld,s.opened,s.history,received2,sideB) d == RelevanceConstructDefinition99 option == PaidOptionFixture95(d,sideB) busy == StartedFixture92(sideB,option) p == OpenPaidProcedure95(5501,d,option,sideB,LegalityFixture92(sideB,option).transactionId,"Play") selection == SelectedInterrupt99(p,d,world.lexemes[AbilityKey99(d)],world.capabilities[AbilityKey99(d)],s.opened,world) afterObjects == [id \in {3,5,6,14} |-> IF id=14 THEN CardObject9("Specimen0206","SideBDiscard",FALSE,"Up") ELSE s.objects[id]] origin1 == [s.base.origin EXCEPT !.plan.revision=1] world1 == RelevanceWorld99(s.world,afterObjects,received2,502,2,"AfterConstructComponentReturn",NoTraversal6) prevented == RelevancePostPreventWhole99(s.opened,origin1,world1,1) receipt1 == RuleWouldReceiptFixture99(4801,prevented,world1,<<>>) history1 == RuleWouldAfterFixture99(s.history,prevented,world1,<<>>,receipt1) world2 == RelevanceWorld99(s.world,afterObjects,received2,503,2,"AfterIndependentDrawRestrictionLift",NoTraversal6) origin2 == [s.base.origin EXCEPT !.plan.revision=2] draw == [id \in {2} |-> s.description.effects[id]] live == StaticRefreshAfterFixture99(prevented,origin2,world2,draw) receipt2 == RuleWouldReceiptFixture99(4802,live,world2,<<2>>) history2 == RuleWouldAfterFixture99(history1,live,world2,<<2>>,receipt2) returned == CompletePriorityOptionFrame9(busy) cp3 == RelevanceCheckpointFixture99(received2,3,afterObjects,ConditionalPriorityCaller96(returned)) received3 == ConditionalCommittedFixture96(received2,RelevanceDefinitions99,cp3,Empty9,Empty9,Empty9) ready == [ReadyFixture92(returned) EXCEPT !.checkpoint=3] passSideB == PassPriorityFrame9(ready) cp4 == RelevanceCheckpointFixture99(received3,4,afterObjects,ConditionalPriorityCaller96(passSideB)) received4 == ConditionalCommittedFixture96(received3,RelevanceDefinitions99,cp4,Empty9,Empty9,Empty9) readySideA == [ReadyFixture92(passSideB) EXCEPT !.checkpoint=4] closed == PassPriorityFrame9(readySideA) lost == [received4 EXCEPT !.instances[5001].status="Lost"] lateAllocation == [key \in {ConditionalKey96(RelevanceClassDefinition99)} |-> 5002] latePrepared == RelevancePreparedFixture99(live,received3,world2,lateAllocation,4901,50) IN [s |-> s,cp1 |-> cp1,received1 |-> received1,sideA |-> sideA,passed |-> passed,cp2 |-> cp2,received2 |-> received2,sideB |-> sideB, blockedClosed |-> blockedClosed,blockedLost |-> blockedLost,world |-> world,d |-> d,option |-> option,busy |-> busy,p |-> p,selection |-> selection, afterObjects |-> afterObjects,origin1 |-> origin1,world1 |-> world1,prevented |-> prevented,receipt1 |-> receipt1,history1 |-> history1, world2 |-> world2,origin2 |-> origin2,draw |-> draw,live |-> live,receipt2 |-> receipt2,history2 |-> history2, returned |-> returned,cp3 |-> cp3,received3 |-> received3,ready |-> ready,passSideB |-> passSideB,cp4 |-> cp4,received4 |-> received4, readySideA |-> readySideA,closed |-> closed,lost |-> lost,lateAllocation |-> lateAllocation,latePrepared |-> latePrepared] RelevanceMandatoryPassChecks99 == LET g == RelevanceSpecimen0105Fixture99 s == g.s h == RelevanceSpecimen0105Definition99 class == RelevanceClassDefinition99 IN /\ RelevanceOpeningValid99(s) /\ s.opened.conditionalIds={5001} /\ s.window.members[5001].mandatory /\ RelevanceCheckpointValid99(s.prepared.ledger,g.received1,<>,g.cp1) /\ CheckpointPriorityWithConditionals96(g.received1,<>,<>,[CheckpointFixture92(s.window) EXCEPT !.id=1]) /\ PassCurrentInterrupt99(g.received1,g.received1,g.received1,<>,<>,"SideA",s.opened,s.base.origin,s.postWorld,s.history, s.postWorld.conditional,RelevanceSnapshot99(610,1,"AfterInitialSideAPass",s.objects,g.received1),CardFacts9) /\ RelevanceCheckpointValid99(g.received1,g.received2,<>,g.cp2) /\ CheckpointPriorityWithConditionals96(g.received2,<>,<>,[CheckpointFixture92(g.passed) EXCEPT !.id=2]) /\ CurrentPendingRelevant99(s.opened,g.world,s.history,g.received2)={5001} /\ ~PassCurrentInterrupt99(g.received2,g.blockedLost,g.blockedLost,<>,<>,"SideB",s.opened,s.base.origin,g.world,s.history, g.world.conditional,RelevanceSnapshot99(611,2,"RejectedMandatoryPass",s.objects,g.blockedLost),CardFacts9) /\ ReserveCurrentPaidWithSelection99(<>,<>,g.p,g.selection,5501,g.d,g.world.paidContexts[AbilityKey99(g.d)], s.opened,s.base.origin,g.world,s.history,g.received2,g.option,LegalityFixture92(g.sideB,g.option),{},CardFacts9) /\ g.busy.previousPass=TRUE /\ g.passed.previousPass=TRUE /\ g.returned.previousPass=FALSE /\ CardBatchTransfer8(s.objects,g.afterObjects,{4},[id \in {4} |-> 14],DOMAIN s.objects,"SideBDiscard","Up",[id \in {4} |-> "SideBDiscard"]) /\ PreventExpectedWhole99(s.opened.state.effects,g.prevented.state.effects,1) /\ ExpectedContextOrigin99(g.prevented,g.origin1) /\ ExpectedContextWorld99(g.prevented,g.world1) /\ CurrentInterruptWorld99(g.world1,g.received2,CardFacts9) /\ ObserveCurrentExpectedWould99(s.history,g.history1,g.prevented,g.origin1,g.world1,<<>>,g.receipt1) /\ CurrentPendingRelevant99(g.prevented,g.world1,g.history1,g.received2)={} /\ RefreshExpectedWorld99(g.prevented,g.live,g.origin1,g.origin2,g.world2,StaticRefreshReceiptFixture99(g.prevented,g.world2,g.draw),g.history1) /\ ObserveCurrentExpectedWould99(g.history1,g.history2,g.live,g.origin2,g.world2,<<2>>,g.receipt2) /\ g.live.initialEffects=s.initial /\ g.live.preparedEffects=s.initial /\ DOMAIN g.live.state.effects={2} /\ g.live.openingRef=s.opened.openingRef /\ g.live.currentRef.revision=2 /\ g.live.conditionalIds={5001} /\ CurrentEffectReceipt99(g.live,g.world2,g.history2,g.received3,g.ready).revision=3 /\ InterruptRelevant99(class,g.world2.lexemes[AbilityKey99(class)],g.world2.capabilities[AbilityKey99(class)],g.live,g.world2,g.history2) /\ ConditionalInterruptPrimary99(class,g.world2.capabilities[AbilityKey99(class)],g.live,g.world2,g.history2) /\ CurrentPendingRelevant99(g.live,g.world2,g.history2,g.received2)={} /\ g.received2.instances[5001].status="Pending" /\ DOMAIN g.received2.instances={5001} /\ RelevanceCheckpointValid99(g.received2,g.received3,<>,g.cp3) /\ CheckpointPriorityWithConditionals96(g.received3,<>,<>,[CheckpointFixture92(g.returned) EXCEPT !.id=3]) /\ PassCurrentInterrupt99(g.received3,g.received3,g.received3,<>,<>,"SideB",g.live,g.origin2,g.world2,g.history2, g.world2.conditional,RelevanceSnapshot99(612,3,"AfterIrrelevantSideBPass",g.afterObjects,g.received3),CardFacts9) /\ ~PassCurrentInterrupt99(g.received3,g.received3,g.received3,<>,<>,"SideB",g.live,g.origin2,g.world2,s.history, g.world2.conditional,RelevanceSnapshot99(612,3,"RejectedStaleWouldView",g.afterObjects,g.received3),CardFacts9) /\ ~PassCurrentInterrupt99(g.received3,g.received3,g.received3,<>,<>,"SideB",g.live,g.origin2,g.world2,g.history2, [g.world2.conditional EXCEPT !.id=499],RelevanceSnapshot99(612,3,"RejectedForeignBeforeSnapshot",g.afterObjects,g.received3),CardFacts9) /\ ~PassCurrentInterrupt99(g.received3,g.received3,g.received3,<>,<>,"SideB",g.live,[g.origin2 EXCEPT !.plan.id=4101],g.world2,g.history2, g.world2.conditional,RelevanceSnapshot99(612,3,"RejectedForeignOrigin",g.afterObjects,g.received3),CardFacts9) /\ g.passSideB.pending={5001} /\ g.passSideB.lostPending={} /\ g.received3.instances[5001].status="Pending" /\ RelevanceCheckpointValid99(g.received3,g.received4,<>,g.cp4) /\ CheckpointPriorityWithConditionals96(g.received4,<>,<>,[CheckpointFixture92(g.passSideB) EXCEPT !.id=4]) /\ PassCurrentInterrupt99(g.received4,g.lost,g.lost,<>,<>,"SideA",g.live,g.origin2,g.world2,g.history2, g.world2.conditional,RelevanceSnapshot99(613,4,"AfterIrrelevantWindowClose",g.afterObjects,g.lost),CardFacts9) /\ ~g.closed.open /\ g.closed.pending={} /\ g.closed.lostPending={5001} /\ g.lost.instances[5001].status="Lost" /\ ~PrepareOpeningInterrupts99(g.live,g.latePrepared.context,g.received3,g.latePrepared.ledger,g.origin2,g.world2,g.history2, 4901,50,g.lateAllocation,{4900},CardFacts9) RelevancePreparedMembershipChecks99 == LET s == RelevanceOpeningFixture99("Both") record == [RuleEmptyReplacementFixture99(s.before,s.world) EXCEPT !.blueprint.pattern.kind="Retire"] world == [s.world EXCEPT !.replacementDefinitions=[id \in {4720} |-> record],!.liveReplacementIds={4720}] rs == [id \in {4720} |-> record.blueprint] decision == ReplacementDecision99(s.before.state,1,rs,[id |-> 501,controllers |-> world.controllers],4720,<<>>) nextState == ReplacementNextState99(s.before.state,1,rs,4720,<<>>,decision) states == <> steps == <<[effectId |-> 1,decision |-> decision]>> origin == [s.base.origin EXCEPT !.plan.revision=1] afterR == [s.before EXCEPT !.state=nextState,!.currentRef=OriginReference99(origin),!.retiredEffects={1}, !.wouldGroups=[effect \in {2} |-> s.before.wouldGroups[effect]]] receipt == RuleWouldReceiptFixture99(4801,afterR,world,<<2>>) history == RuleWouldAfterFixture99(s.history,afterR,world,<<2>>,receipt) allocation == [key \in {ConditionalKey96(RelevanceClassDefinition99)} |-> 5002] prepared == RelevancePreparedFixture99(afterR,s.ledger,world,allocation,4900,49) postWorld == RelevanceObserveWorld99(world,prepared.ledger) opening == PreparedOriginOpening99(prepared.context,s.site) window == NewPriorityWindow9(4900,"Interrupt",s.site,prepared.context.openingMembers,49,NoTimingRef9,prepared.context.openingRef,2) opened == [prepared.context EXCEPT !.phase="WindowOpen",!.site=s.site] IN /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,4500,s.base.origin,world,s.base.entry,s.description,s.projection,s.initial,s.base.entry.owner,CardFacts9,NewWouldAccounting99,s.history,s.receipt) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,s.history,s.before,s.base.origin,world,<<1,2>>,s.receipt) /\ OpeningConditionalKeys99(s.before,world,s.history,s.ledger)={ConditionalKey96(RelevanceSpecimen0105Definition99),ConditionalKey96(RelevanceClassDefinition99)} /\ ~PrepareOpeningInterrupts99(s.before,s.prepared.context,s.ledger,s.prepared.ledger,s.base.origin,world,s.history,4900,49,s.allocation,{},CardFacts9) /\ ApplyAutomaticReplacements99(s.before,afterR,s.base.origin,origin,world,states,steps,CardFacts9,s.history) /\ ObserveCurrentExpectedWould99(s.history,history,afterR,origin,world,<<2>>,receipt) /\ PrepareOpeningInterrupts99(afterR,prepared.context,s.ledger,prepared.ledger,origin,world,history,4900,49,allocation,{},CardFacts9) /\ OpenPreparedInterrupt99(prepared.context,opened,<<>>,<>,origin,postWorld,history,prepared.ledger,s.site,opening,{},CardFacts9) /\ DOMAIN s.before.initialEffects={1,2} /\ DOMAIN prepared.context.preparedEffects={2} /\ prepared.context.conditionalIds={5002} /\ prepared.context.openingRef.revision=1 /\ window.effectRevision=2 /\ window.members[5002].mandatory /\ ~InterruptRelevant99(RelevanceSpecimen0105Definition99,world.lexemes[AbilityKey99(RelevanceSpecimen0105Definition99)], world.capabilities[AbilityKey99(RelevanceSpecimen0105Definition99)],afterR,world,history) /\ InterruptRelevant99(RelevanceClassDefinition99,world.lexemes[AbilityKey99(RelevanceClassDefinition99)], world.capabilities[AbilityKey99(RelevanceClassDefinition99)],afterR,world,history) /\ {postWorld.capabilities[AbilityKey99(RelevanceClassDefinition99)].clauses[id].mode : id \in DOMAIN postWorld.capabilities[AbilityKey99(RelevanceClassDefinition99)].clauses}={"WouldTrigger"} RelevanceExampleFamily068SecondFixture99 == LET s == RelevanceOpeningFixture99("ExampleFamily068") oldBeforePlan == [s.base.entry.beforePlan EXCEPT !.id=4101] oldPlan == [s.base.entry.afterPlan EXCEPT !.id=4101] oldEntry == [s.base.entry EXCEPT !.id=4301,!.beforePlan=oldBeforePlan,!.afterPlan=oldPlan,!.targets.instruction=4101] world == [s.world EXCEPT !.entries=ReplacementOverlay99(@,[id \in {4301} |-> oldEntry])] oldOrigin == [s.base.origin EXCEPT !.plan=oldPlan] oldDescription == [s.description EXCEPT !.context=OriginReference99(oldOrigin)] oldProjection == [s.projection EXCEPT !.description=oldDescription] oldContext == NewExpectedContext99(4501,4301,oldOrigin,world,oldDescription,s.initial,oldEntry.owner) oldRegistry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {4501} |-> oldContext],!.entryIds={4301},!.usedContextIds={4501}] oldReceipt == RuleWouldReceiptFixture99(4810,oldContext,world,<<1>>) oldHistory == RuleWouldAfterFixture99(NewWouldAccounting99,oldContext,world,<<1>>,oldReceipt) registry == [oldRegistry EXCEPT !.contexts=ReplacementOverlay99(@,[id \in {4500} |-> s.before]),!.entryIds=@ \cup {4300},!.usedContextIds=@ \cup {4500}] receipt == RuleWouldReceiptFixture99(4811,s.before,world,<<1>>) history == RuleWouldAfterFixture99(oldHistory,s.before,world,<<1>>,receipt) prepared == RelevancePreparedFixture99(s.before,s.ledger,world,Empty9,4900,49) IN [s |-> s,world |-> world,oldEntry |-> oldEntry,oldOrigin |-> oldOrigin,oldDescription |-> oldDescription,oldProjection |-> oldProjection, oldContext |-> oldContext,oldRegistry |-> oldRegistry,oldReceipt |-> oldReceipt,oldHistory |-> oldHistory, registry |-> registry,receipt |-> receipt,history |-> history,prepared |-> prepared] RelevanceConditionalPrimaryChecks99 == LET g == RelevanceExampleFamily068SecondFixture99 s == g.s d == RelevanceExampleFamily068Definition99 cap == g.world.capabilities[AbilityKey99(d)] wrongAllocation == [key \in {AbilityKey99(d)} |-> 5003] wrongPrepared == RelevancePreparedFixture99(s.before,s.ledger,g.world,wrongAllocation,4900,49) IN /\ BeginExpectedContext99(NewExpectedRegistry99,g.oldRegistry,4501,g.oldOrigin,g.world,g.oldEntry,g.oldDescription,g.oldProjection,s.initial,g.oldEntry.owner,CardFacts9,NewWouldAccounting99,g.oldHistory,g.oldReceipt) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,g.oldHistory,g.oldContext,g.oldOrigin,g.world,<<1>>,g.oldReceipt) /\ BeginExpectedContext99(g.oldRegistry,g.registry,4500,s.base.origin,g.world,s.base.entry,s.description,s.projection,s.initial,s.base.entry.owner,CardFacts9,g.oldHistory,g.history,g.receipt) /\ ObserveCurrentExpectedWould99(g.oldHistory,g.history,s.before,s.base.origin,g.world,<<1>>,g.receipt) /\ WouldOrdinalAtCurrent99(g.history,s.before.wouldGroups[1],TimingRef9("SchemaAtom138",2),cap.clauses[1].criterion)=2 /\ CapabilityRelevant99(cap.clauses[2],s.before.state.effects[1],s.before,g.world,g.history) /\ InterruptRelevant99(d,g.world.lexemes[AbilityKey99(d)],cap,s.before,g.world,g.history) /\ ~ConditionalInterruptPrimary99(d,cap,s.before,g.world,g.history) /\ OpeningConditionalKeys99(s.before,g.world,g.history,s.ledger)={} /\ PrepareOpeningInterrupts99(s.before,g.prepared.context,s.ledger,g.prepared.ledger,s.base.origin,g.world,g.history,4900,49,Empty9,{},CardFacts9) /\ g.prepared.context.conditionalIds={} /\ DOMAIN g.prepared.ledger.instances={} /\ ~PrepareOpeningInterrupts99(s.before,wrongPrepared.context,s.ledger,wrongPrepared.ledger,s.base.origin,g.world,g.history,4900,49,wrongAllocation,{},CardFacts9) RelevancePendingScopeChecks99 == LET s == RelevanceOpeningFixture99("Specimen0105") h == RelevanceSpecimen0105Definition99 oldEntry == [s.base.entry EXCEPT !.id=4301,!.beforePlan.id=4101,!.afterPlan.id=4101,!.targets.instruction=4101] world0 == [s.world EXCEPT !.entries=ReplacementOverlay99(@,[id \in {4301} |-> oldEntry])] oldOrigin == [s.base.origin EXCEPT !.plan=oldEntry.afterPlan] oldDescription == [s.description EXCEPT !.context=OriginReference99(oldOrigin)] oldProjection == [s.projection EXCEPT !.description=oldDescription] oldContext == NewExpectedContext99(4501,4301,oldOrigin,world0,oldDescription,s.initial,oldEntry.owner) oldRegistry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {4501} |-> oldContext],!.entryIds={4301},!.usedContextIds={4501}] oldReceipt == RuleWouldReceiptFixture99(4810,oldContext,world0,<<1>>) oldHistory == RuleWouldAfterFixture99(NewWouldAccounting99,oldContext,world0,<<1>>,oldReceipt) oldAllocation == [key \in {ConditionalKey96(h)} |-> 5101] oldPrepared == RelevancePreparedFixture99(oldContext,s.ledger,world0,oldAllocation,4999,48) worldBefore == RelevanceObserveWorld99(world0,oldPrepared.ledger) registry == [oldRegistry EXCEPT !.contexts=ReplacementOverlay99(@,[id \in {4500} |-> s.before]),!.entryIds=@ \cup {4300},!.usedContextIds=@ \cup {4500}] receipt == RuleWouldReceiptFixture99(4811,s.before,worldBefore,<<1>>) history == RuleWouldAfterFixture99(oldHistory,s.before,worldBefore,<<1>>,receipt) prepared == RelevancePreparedFixture99(s.before,oldPrepared.ledger,worldBefore,s.allocation,4900,49) world == RelevanceObserveWorld99(worldBefore,prepared.ledger) earlier == prepared.ledger.instances[5101] IN /\ BeginExpectedContext99(NewExpectedRegistry99,oldRegistry,4501,oldOrigin,world0,oldEntry,oldDescription,oldProjection,s.initial,oldEntry.owner,CardFacts9,NewWouldAccounting99,oldHistory,oldReceipt) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,oldHistory,oldContext,oldOrigin,world0,<<1>>,oldReceipt) /\ PrepareOpeningInterrupts99(oldContext,oldPrepared.context,s.ledger,oldPrepared.ledger,oldOrigin,world0,oldHistory,4999,48,oldAllocation,{},CardFacts9) /\ BeginExpectedContext99(oldRegistry,registry,4500,s.base.origin,worldBefore,s.base.entry,s.description,s.projection,s.initial,s.base.entry.owner,CardFacts9,oldHistory,history,receipt) /\ ObserveCurrentExpectedWould99(oldHistory,history,s.before,s.base.origin,worldBefore,<<1>>,receipt) /\ PrepareOpeningInterrupts99(s.before,prepared.context,oldPrepared.ledger,prepared.ledger,s.base.origin,worldBefore,history,4900,49,s.allocation,{4999},CardFacts9) /\ CurrentInterruptWorld99(world,prepared.ledger,CardFacts9) /\ earlier.member.windowId=4999 /\ earlier.member.group=48 /\ earlier.member.id=5101 /\ earlier.occurrence=4301 /\ earlier.status="Pending" /\ ConditionalInstanceCurrent96(earlier,RelevanceDefinitions99,world.conditional) /\ ConditionalInterruptPrimary99(h,world.capabilities[AbilityKey99(h)],prepared.context,world,history) /\ InterruptRelevant99(h,world.lexemes[AbilityKey99(h)],world.capabilities[AbilityKey99(h)],prepared.context,world,history) /\ CurrentPendingRelevant99(prepared.context,world,history,prepared.ledger)={5001} /\ CurrentEffectReceipt99(prepared.context,world,history,prepared.ledger,s.window).relevantConditional={5001} RelevancePrimarySchemaChecks99 == LET s == RelevanceOpeningFixture99("ExampleFamily068") key == AbilityKey99(RelevanceExampleFamily068Definition99) wrongMode == [s.world EXCEPT !.capabilities[key].primaryGroups[1]={2}] emptyGroup == [s.world EXCEPT !.capabilities[key].primaryGroups[1]={}] missingClause == [s.world EXCEPT !.capabilities[key].primaryGroups[1]={99}] IN /\ CurrentInterruptWorld99(s.world,s.ledger,CardFacts9) /\ ~CurrentInterruptWorld99(wrongMode,s.ledger,CardFacts9) /\ ~CurrentInterruptWorld99(emptyGroup,s.ledger,CardFacts9) /\ ~CurrentInterruptWorld99(missingClause,s.ledger,CardFacts9) FullRelevanceChecks99 == /\ RelevanceOptionalPassChecks99 /\ RelevanceExampleFamily068StartChecks99 /\ RelevanceMandatoryPassChecks99 /\ RelevancePreparedMembershipChecks99 /\ RelevanceConditionalPrimaryChecks99 /\ RelevancePendingScopeChecks99 /\ RelevancePrimarySchemaChecks99 FullExampleFamily021NoExampleFamily026Criterion99 == [alternatives |-> {[kind |-> "ExposureMarkers",subtype |-> "NoValue",actor |-> "SideB",minimumPresent |-> FALSE,minimum |-> 0,targetSitePresent |-> FALSE,targetSite |-> "NoValue"]} \cup {[kind |-> "Damage",subtype |-> "HarmClassA",actor |-> "SchemaAtom016",minimumPresent |-> FALSE,minimum |-> 0,targetSitePresent |-> FALSE,targetSite |-> "NoValue"]}] FullExampleFamily021Capabilities99(d,lex) == [tag |-> "NormalizedInterruptCapabilities",definition |-> d,origin |-> lex.origin, clauses |-> IF ~AbilityInterrupt99(d,lex) THEN Empty9 ELSE IF d.syntax.kind="Paid" THEN [id \in {1} |-> [mode |-> "PreventAmount",pattern |-> [kind |-> "ExposureMarkers"],value |-> 1]] ELSE [id \in 1..4 |-> CASE id=1 -> [mode |-> "PreventWhole",pattern |-> [kind |-> "ExposureMarkers"]] [] id=2 -> [mode |-> "PreventWhole",pattern |-> [kind |-> "Damage",damageType |-> "HarmClassA"]] [] OTHER -> [mode |-> "WouldTrigger",pattern |-> IF id=3 THEN [kind |-> "ExposureMarkers"] ELSE [kind |-> "Damage",damageType |-> "HarmClassA"], period |-> TimingRef9("Turn",1),ordinal |-> 1,criterion |-> FullExampleFamily021NoExampleFamily026Criterion99]], primaryGroups |-> IF d.syntax.kind="Conditional" /\ AbilityInterrupt99(d,lex) THEN [id \in {1,2} |-> {id+2}] ELSE Empty9] FullExampleFamily021Entry99(s) == LET owner == [windowId |-> 0,option |-> NoPriorityOption9,transaction |-> 0] structure == [tag |-> "StructuralRuleProcedure",id |-> 9801,step |-> s.ruleStep] IN [tag |-> "ActualInstructionEntry",id |-> 9800,snapshotId |-> s.initial.id,kind |-> "Rule", beforePlan |-> s.rulePlan,afterPlan |-> [s.ruleImminent EXCEPT !.announced=TRUE],stackBefore |-> <<>>,stackAfter |-> <<>>, ruleInvocation |-> 9802,ruleStep |-> s.ruleStep,sourceProcedure |-> structure,owner |-> owner, targets |-> [InstructionTargetsFixture93(s.rulePlan) EXCEPT !.targets={}]] FullExampleFamily021World99(g,snapshot,paidDefinitions,turnUses) == LET s == g.s entry == FullExampleFamily021Entry99(s) definitions == ReplacementOverlay99(snapshot.definitions,paidDefinitions) lexemes == [key \in DOMAIN definitions |-> IF key \in DOMAIN snapshot.definitions THEN ExampleFamily021Lexemes99(snapshot.definitions)[key] ELSE LexicalSingleFixture99(definitions[key],"Specimen0070","prevent",3,"EffectOperator",CardFacts9)] contexts == [key \in DOMAIN paidDefinitions |-> [PaidContextFixture95(paidDefinitions[key],snapshot.objects,s.c.turn) EXCEPT !.traversalControl=s.c.traversalControl,!.traversal=s.c.traversalControl.traversal, !.present=snapshot.present,!.activity=snapshot.activity,!.points=snapshot.points,!.uses=turnUses]] IN [tag |-> "CurrentInterruptWorld",id |-> snapshot.id,turn |-> s.c.turn,traversalControl |-> s.c.traversalControl, objects |-> snapshot.objects,controllers |-> [id \in DOMAIN snapshot.objects |-> "SideB"],activePeriods |-> Empty9, conditional |-> snapshot,paidDefinitions |-> paidDefinitions,lexemes |-> lexemes, capabilities |-> [key \in DOMAIN definitions |-> FullExampleFamily021Capabilities99(definitions[key],lexemes[key])],paidContexts |-> contexts, turnUses |-> turnUses,replacementDefinitions |-> Empty9,liveReplacementIds |-> {}, entries |-> [id \in {entry.id} |-> entry],ruleInvocations |-> [id \in {entry.ruleInvocation} |-> [tag |-> "ActualRuleInvocation",step |-> entry.ruleStep,returned |-> FALSE,structure |-> entry.sourceProcedure,owner |-> entry.owner]]] FullExampleFamily021WorldReceipts99(world,context,history,ledger,w) == [world EXCEPT !.paidContexts=[key \in DOMAIN @ |-> [@[key] EXCEPT !.currentEffect=CurrentEffectReceipt99(context,world,history,ledger,w), !.paidRelevance=CurrentPaidRelevanceReceipt99(context,world,history,w)]]] FullExampleFamily021ContextFixture99(card) == LET g == ExampleFamily021ChainFixture99(card) s == g.s entry == FullExampleFamily021Entry99(s) origin == [kind |-> "Instruction",plan |-> entry.afterPlan,parent |-> "NoValue",ruleStep |-> s.ruleStep] paid0 == [key \in {AbilityKey99(s.d)} |-> s.d] world0 == FullExampleFamily021World99(g,s.initial,paid0,Empty9) description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> origin.plan.source, snapshotId |-> world0.id,effects |-> s.beforeExposureMarkers,order |-> <<401>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world0.id,forbiddenIds |-> {},values |-> Empty9] before == NewExpectedContext99(9803,entry.id,origin,world0,description,s.beforeExposureMarkers,entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={before.id},!.contexts=[id \in {before.id} |-> before]] receipt0 == WouldCurrentReceiptFixture99(9810,before,world0,<<401>>) history0 == WouldAccountingCommitted99(NewWouldAccounting99,before,world0,<<401>>,receipt0) prepared == [before EXCEPT !.phase="Prepared",!.preparedEffects=s.beforeExposureMarkers,!.openingRef=before.currentRef,!.windowId=600,!.group=60] opened == [prepared EXCEPT !.phase="WindowOpen",!.site=s.site] readyWorld == FullExampleFamily021WorldReceipts99(world0,opened,history0,s.received,s.ready) snapshot == ExampleFamily021Snapshot99(102,10,"FullExampleFamily021AfterReaction",card,g.deploy.deployedObjects,g.received10,{31}) fresh == ExampleFamily021Specimen0070Definition99(13,9020) paid1 == IF card="Specimen0070" THEN ReplacementOverlay99(paid0,[key \in {AbilityKey99(fresh)} |-> fresh]) ELSE paid0 currentWorld0 == FullExampleFamily021World99(g,snapshot,paid1,g.turnUses) currentOrigin == [origin EXCEPT !.plan.revision=1] current == [opened EXCEPT !.currentWorld=currentWorld0.id,!.currentRef=OriginReference99(currentOrigin),!.state.effects=s.afterExposureMarkers, !.modificationIds={s.callback.id},!.modifications= <<[tag |-> "ExampleFamily021ResolvedSpecimen0070Projection",callback |-> s.callback, beforeEffects |-> s.beforeExposureMarkers,afterEffects |-> s.afterExposureMarkers,modifier |-> InstructionWindowRef93(s.resolvingPlan)]>>] receipt1 == WouldCurrentReceiptFixture99(9811,current,currentWorld0,<<401>>) history1 == WouldAccountingCommitted99(history0,current,currentWorld0,<<401>>,receipt1) currentWorld == FullExampleFamily021WorldReceipts99(currentWorld0,current,history1,g.received10,g.parentReady) IN [g |-> g,entry |-> entry,origin |-> origin,world0 |-> world0,description |-> description,projection |-> projection,before |-> before, registry |-> registry,receipt0 |-> receipt0,history0 |-> history0,prepared |-> prepared,opened |-> opened,readyWorld |-> readyWorld, current |-> current,currentOrigin |-> currentOrigin,currentWorld0 |-> currentWorld0,currentWorld |-> currentWorld, receipt1 |-> receipt1,history1 |-> history1,fresh |-> fresh] FullExampleFamily021ContextValid99(f) == LET g == f.g s == g.s IN /\ ExampleFamily021ChainValid99(g) /\ CurrentInterruptWorld99(f.world0,s.seed,CardFacts9) /\ BeginExpectedContext99(NewExpectedRegistry99,f.registry,f.before.id,f.origin,f.world0,f.entry,f.description,f.projection,s.beforeExposureMarkers,f.entry.owner,CardFacts9,NewWouldAccounting99,f.history0,f.receipt0) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,f.history0,f.before,f.origin,f.world0,<<401>>,f.receipt0) /\ PrepareOpeningInterrupts99(f.before,f.prepared,s.seed,s.seed,f.origin,f.world0,f.history0,600,60,Empty9,{},CardFacts9) /\ OpenPreparedInterrupt99(f.prepared,f.opened,<<>>,<>,f.origin,f.world0,f.history0,s.seed,s.site, PreparedOriginOpening99(f.prepared,s.site),{},CardFacts9) /\ CurrentInterruptWorld99(f.readyWorld,s.received,CardFacts9) /\ ReserveCurrentPaidInterrupt99(<>,<>,s.p,900,s.d,f.readyWorld.paidContexts[AbilityKey99(s.d)], f.opened,f.origin,f.readyWorld,f.history0,s.received,s.option,LegalityFixture92(s.ready,s.option),{},CardFacts9) /\ s.callback.beforeEffects=f.opened.state.effects /\ s.callback.afterEffects=f.current.state.effects /\ s.callback.source=s.p.ability.source /\ s.callback.abilityInstance=s.p.id /\ f.current.currentRef.revision=f.opened.currentRef.revision+1 /\ f.current.initialEffects=s.beforeExposureMarkers /\ f.current.openingRef=f.opened.openingRef /\ f.current.openingMembers=f.opened.openingMembers /\ f.current.conditionalIds=f.opened.conditionalIds /\ CurrentInterruptWorld99(f.currentWorld,g.received10,CardFacts9) /\ ObserveCurrentExpectedWould99(f.history0,f.history1,f.current,f.currentOrigin,f.currentWorld,<<401>>,f.receipt1) /\ WouldViewCurrent99(f.history1,f.current,f.currentWorld) /\ CurrentInterruptWindow99(f.current,<>) FullExampleFamily021NoExampleFamily026MembershipChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0162") g == f.g d == ExampleFamily021NoExampleFamily026Definition99(13) key == AbilityKey99(d) IN /\ FullExampleFamily021ContextValid99(f) /\ ~ConditionalActive96(ExampleFamily021NoExampleFamily026Definition99(3),f.world0.conditional) /\ ConditionalActive96(d,f.currentWorld.conditional) /\ InterruptRelevant99(d,f.currentWorld.lexemes[key],f.currentWorld.capabilities[key],f.current,f.currentWorld,f.history1) /\ key \in OpeningConditionalKeys99(f.current,f.currentWorld,f.history1,g.received10) /\ f.opened.conditionalIds={} /\ f.current.conditionalIds={} /\ f.current.openingMembers=Empty9 /\ g.parentReady.members=Empty9 /\ CurrentPendingRelevant99(f.current,f.currentWorld,f.history1,g.received10)={} /\ CurrentPaidRelevant99(f.current,f.currentWorld,f.history1,g.parentReady)={} /\ DOMAIN g.received10.instances={9100} /\ g.received10.instances[9100].status="Complete" FullExampleFamily021ReservationFixture99(f,context,origin,world0,history,w) == LET g == f.g world == FullExampleFamily021WorldReceipts99(world0,context,history,g.received10,w) d == f.fresh option == [PaidOptionFixture95(d,w) EXCEPT !.id=61] legality == LegalityFixture92(w,option) busy == StartedFixture92(w,option) p == OpenPaidProcedure95(1000,d,option,w,legality.transactionId,"Play") IN [world |-> world,d |-> d,c |-> world.paidContexts[AbilityKey99(d)],option |-> option,legality |-> legality,busy |-> busy,p |-> p] FullExampleFamily021Reserve99(f,context,origin,history,w,q) == ReserveCurrentPaidInterrupt99(<>,<>,q.p,1000,q.d,q.c,context,origin,q.world,history,f.g.received10, q.option,q.legality,{900,9100},CardFacts9) FullExampleFamily021FreshPaidChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0070") g == f.g key == AbilityKey99(f.fresh) q == FullExampleFamily021ReservationFixture99(f,f.current,f.currentOrigin,f.currentWorld0,f.history1,g.parentReady) beforeReception == FullExampleFamily021ReservationFixture99(f,f.current,f.currentOrigin,f.currentWorld0,f.history1,g.parentReturned) selection == SelectedInterrupt99(q.p,q.d,q.world.lexemes[key],q.world.capabilities[key],f.current,q.world) IN /\ FullExampleFamily021ContextValid99(f) /\ CurrentPaidRelevant99(f.current,q.world,f.history1,g.parentReady)={key} /\ CurrentPendingRelevant99(f.current,q.world,f.history1,g.received10)={} /\ FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,f.history1,g.parentReady,q) /\ ReserveCurrentPaidWithSelection99(<>,<>,q.p,selection,1000,q.d,q.c,f.current,f.currentOrigin,q.world, f.history1,g.received10,q.option,q.legality,{900,9100},CardFacts9) /\ q.p.ability.source=ObjectAbilitySource9(13) /\ g.s.p.ability.source=ObjectAbilitySource9(1) /\ q.c.currentEffect=CurrentEffectReceipt99(f.current,q.world,f.history1,g.received10,g.parentReady) /\ q.c.paidRelevance=CurrentPaidRelevanceReceipt99(f.current,q.world,f.history1,g.parentReady) /\ ~FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,f.history1,g.parentReturned,beforeReception) /\ f.current.state.effects[401].value=1 /\ f.current.currentRef.revision=1 /\ g.parentReady.effectRevision=1 FullExampleFamily021CurrentProfileChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0070") g == f.g w == g.parentReady q == FullExampleFamily021ReservationFixture99(f,f.current,f.currentOrigin,f.currentWorld0,f.history1,w) key == AbilityKey99(f.fresh) IN /\ FullExampleFamily021ContextValid99(f) /\ \A field \in {"reference","snapshotId","effects","groups"} : LET latest == f.history1.latest[f.current.id] wrong == CASE field="reference" -> [latest EXCEPT !.reference.revision=0] [] field="snapshotId" -> [latest EXCEPT !.snapshotId=999] [] field="effects" -> [latest EXCEPT !.effects[401].value=2] [] OTHER -> [latest EXCEPT !.groups[401]= <>] history == [f.history1 EXCEPT !.latest[f.current.id]=wrong] IN ~FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,history,w,q) /\ LET stale == [f.current EXCEPT !.currentWorld=999] IN ~FullExampleFamily021Reserve99(f,stale,f.currentOrigin,f.history1,w,q) /\ LET foreign == [f.currentOrigin EXCEPT !.plan.id=999] IN ~FullExampleFamily021Reserve99(f,f.current,foreign,f.history1,w,q) /\ LET wrongWorld == [q.world EXCEPT !.conditional.id=999] bad == [q EXCEPT !.world=wrongWorld] IN ~FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,f.history1,w,bad) /\ LET wrongWorld == [q.world EXCEPT !.lexemes[key].source=ObjectAbilitySource9(14)] bad == [q EXCEPT !.world=wrongWorld] IN ~FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,f.history1,w,bad) /\ \A field \in {"id","group"} : LET wrongWindow == [w EXCEPT ![field]=999] bad == FullExampleFamily021ReservationFixture99(f,f.current,f.currentOrigin,f.currentWorld0,f.history1,wrongWindow) IN ~FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,f.history1,wrongWindow,bad) /\ LET stale == [f.current EXCEPT !.phase="Prepared"] IN ~FullExampleFamily021Reserve99(f,stale,f.currentOrigin,f.history1,w,q) /\ LET wrongWindow == [w EXCEPT !.instruction.id=999] bad == FullExampleFamily021ReservationFixture99(f,f.current,f.currentOrigin,f.currentWorld0,f.history1,wrongWindow) IN ~FullExampleFamily021Reserve99(f,f.current,f.currentOrigin,f.history1,wrongWindow,bad) FullExampleFamily021ForeignPendingControlChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0162") g == f.g d == ExampleFamily021NoExampleFamily026Definition99(13) otherContext == [f.current EXCEPT !.id=9900,!.imminenceId=9901,!.currentRef.id=791,!.initialRef.id=791] instance == NewOpeningInterruptInstance99(9200,d,f.currentWorld.conditional,g.received10,otherContext,611,62) ledger == [g.received10 EXCEPT !.instances=ReplacementOverlay99(@,[id \in {9200} |-> instance])] snapshot == [SnapshotWithConditionalRegistry96(f.currentWorld.conditional,ledger) EXCEPT !.id=103] context == [f.current EXCEPT !.currentWorld=103] world0 == FullExampleFamily021World99(g,snapshot,f.currentWorld.paidDefinitions,g.turnUses) receipt == WouldCurrentReceiptFixture99(9812,context,world0,<<401>>) history == WouldAccountingCommitted99(f.history1,context,world0,<<401>>,receipt) world == FullExampleFamily021WorldReceipts99(world0,context,history,ledger,g.parentReady) IN /\ FullExampleFamily021ContextValid99(f) /\ CurrentInterruptWorld99(world,ledger,CardFacts9) /\ ObserveCurrentExpectedWould99(f.history1,history,context,f.currentOrigin,world,<<401>>,receipt) /\ WouldViewCurrent99(history,context,world) /\ ConditionalInstanceCurrent96(instance,world.conditional.definitions,world.conditional) /\ InterruptRelevant99(d,world.lexemes[AbilityKey99(d)],world.capabilities[AbilityKey99(d)],context,world,history) /\ instance.member.windowId=611 /\ instance.member.group=62 /\ instance.status="Pending" /\ CurrentPendingRelevant99(context,world,history,ledger)={} FullExampleFamily021NoExampleFamily026UnionPrimaryChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0162") d == ExampleFamily021NoExampleFamily026Definition99(13) key == AbilityKey99(d) prior == WouldAccountingScenario99(9820,9821,9822,9823,"HarmClassA",1,1,0) priorReceipt == WouldCurrentReceiptFixture99(9824,prior.context,prior.world,<<1>>) priorHistory == WouldAccountingCommitted99(NewWouldAccounting99,prior.context,prior.world,<<1>>,priorReceipt) originalHistory == WouldAccountingCommitted99(priorHistory,f.before,f.world0,<<401>>,f.receipt0) currentHistory == WouldAccountingCommitted99(originalHistory,f.current,f.currentWorld0,<<401>>,f.receipt1) world == FullExampleFamily021WorldReceipts99(f.currentWorld0,f.current,currentHistory,f.g.received10,f.g.parentReady) IN /\ FullExampleFamily021ContextValid99(f) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,priorHistory,prior.context,prior.origin,prior.world,<<1>>,priorReceipt) /\ ObserveCurrentExpectedWould99(priorHistory,originalHistory,f.before,f.origin,f.world0,<<401>>,f.receipt0) /\ ObserveCurrentExpectedWould99(originalHistory,currentHistory,f.current,f.currentOrigin,world,<<401>>,f.receipt1) /\ CurrentInterruptWorld99(world,f.g.received10,CardFacts9) /\ WouldOrdinalAtCurrent99(currentHistory,f.current.wouldGroups[401],TimingRef9("Turn",1),FullExampleFamily021NoExampleFamily026Criterion99)=2 /\ InterruptRelevant99(d,world.lexemes[key],world.capabilities[key],f.current,world,currentHistory) /\ ~ConditionalInterruptPrimary99(d,world.capabilities[key],f.current,world,currentHistory) /\ key \notin OpeningConditionalKeys99(f.current,world,currentHistory,f.g.received10) FullExampleFamily021RemovedSubjectChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0070") snapshot == [f.currentWorld0.conditional EXCEPT !.id=104] world0 == FullExampleFamily021World99(f.g,snapshot,f.currentWorld0.paidDefinitions,f.g.turnUses) origin == [f.currentOrigin EXCEPT !.plan.revision=2] context == [f.current EXCEPT !.currentWorld=104,!.currentRef=OriginReference99(origin),!.state.effects=Empty9, !.state.ancestry=Empty9,!.removedEffects={401}] receipt == WouldCurrentReceiptFixture99(9813,context,world0,<<>>) history == WouldAccountingCommitted99(f.history1,context,world0,<<>>,receipt) q == FullExampleFamily021ReservationFixture99(f,context,origin,world0,history,f.g.parentReady) IN /\ FullExampleFamily021ContextValid99(f) /\ PreventExpectedWhole99(f.current.state.effects,context.state.effects,401) /\ CurrentInterruptWorld99(q.world,f.g.received10,CardFacts9) /\ ObserveCurrentExpectedWould99(f.history1,history,context,origin,q.world,<<>>,receipt) /\ WouldViewCurrent99(history,context,q.world) /\ PaidBaseEligibility99(q.d,q.world.lexemes[AbilityKey99(q.d)],q.c,f.g.parentReady) /\ CurrentPaidRelevant99(context,q.world,history,f.g.parentReady)={} /\ ~FullExampleFamily021Reserve99(f,context,origin,history,f.g.parentReady,q) FullExampleFamily021InactivePlayerOpeningChecks99 == LET f == FullExampleFamily021ContextFixture99("Specimen0070") turn == TurnFixture92("SideA") snapshot == [f.world0.conditional EXCEPT !.id=201] entry == [f.entry EXCEPT !.snapshotId=201] world == [f.world0 EXCEPT !.id=201,!.turn=turn,!.conditional=snapshot,!.entries[entry.id]=entry, !.paidContexts=[key \in DOMAIN @ |-> [@[key] EXCEPT !.turn=turn]]] description == [f.description EXCEPT !.snapshotId=201] projection == [f.projection EXCEPT !.snapshotId=201,!.description=description] before == NewExpectedContext99(9803,entry.id,f.origin,world,description,f.g.s.beforeExposureMarkers,entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={before.id},!.contexts=[id \in {before.id} |-> before]] receipt == WouldCurrentReceiptFixture99(9825,before,world,<<401>>) history == WouldAccountingCommitted99(NewWouldAccounting99,before,world,<<401>>,receipt) prepared == [before EXCEPT !.phase="Prepared",!.preparedEffects=before.state.effects,!.openingRef=before.currentRef,!.windowId=600,!.group=60] site == [TurnSiteFixture92("SideA","ProcedureCoded6fbcb09dd4f",3) EXCEPT !.step=f.g.s.ruleStep] opening == PreparedOriginOpening99(prepared,site) window == NewPriorityWindow9(600,"Interrupt",site,Empty9,60,NoTimingRef9,prepared.openingRef,1) opened == [prepared EXCEPT !.phase="WindowOpen",!.site=site] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] IN /\ CurrentInterruptWorld99(world,f.g.s.seed,CardFacts9) /\ BeginExpectedContext99(NewExpectedRegistry99,registry,before.id,f.origin,world,entry,description,projection,before.initialEffects,entry.owner,CardFacts9,NewWouldAccounting99,history,receipt) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,history,before,f.origin,world,<<401>>,receipt) /\ PrepareOpeningInterrupts99(before,prepared,f.g.s.seed,f.g.s.seed,f.origin,world,history,600,60,Empty9,{},CardFacts9) /\ window.priority="SideA" /\ window.active="SideA" /\ world.paidDefinitions[AbilityKey99(f.g.s.d)].syntax.controller="SideB" /\ CurrentPaidRelevant99(prepared,world,history,window)={} /\ OpeningPaidRelevant99(prepared,world,history,window)={AbilityKey99(f.g.s.d)} /\ OpenPreparedInterrupt99(prepared,opened,<<>>,<>,f.origin,world,history,f.g.s.seed,site,opening,{},CardFacts9) /\ ~NoPreparedInterrupt99(prepared,noWindow,f.origin,world,history,f.g.s.seed,<<>>,site,CardFacts9) /\ ~ClearPreparedInstruction99(noWindow,cleared,f.origin,world,history,f.g.s.seed,<<>>,<<>>,"NoModifiers",clearance,CardFacts9) FullExampleFamily021Checks99 == /\ FullExampleFamily021NoExampleFamily026MembershipChecks99 /\ FullExampleFamily021FreshPaidChecks99 /\ FullExampleFamily021CurrentProfileChecks99 /\ FullExampleFamily021ForeignPendingControlChecks99 /\ FullExampleFamily021NoExampleFamily026UnionPrimaryChecks99 /\ FullExampleFamily021RemovedSubjectChecks99 /\ FullExampleFamily021InactivePlayerOpeningChecks99 FullSpecimen0070CallbackForCard99(card) == LET f == FullExampleFamily021ContextFixture99(card) s == f.g.s selected == SelectedInterrupt99(s.p,s.d,s.lex,f.readyWorld.capabilities[AbilityKey99(s.d)],f.opened,f.readyWorld) selectedWorld == ReplacementOverlay99(f.readyWorld,[interruptSelections |-> [id \in {s.p.id} |-> selected]]) owner == [windowId |-> s.p.windowId,option |-> s.p.option,transaction |-> s.p.transaction] entry == [tag |-> "ActualInstructionEntry",id |-> 9910,snapshotId |-> s.costLedger.lastSnapshot.id,kind |-> "Paid", before |-> s.planning,after |-> s.imminentP,beforePlan |-> s.plan,afterPlan |-> s.imminentPlan, stackBefore |-> <>,stackAfter |-> <>,owner |-> owner, targets |-> [InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}],receipt |-> PaidEntryFixture95(s.plan,2),selection |-> selected] world0 == FullExampleFamily021World99(f.g,s.costLedger.lastSnapshot,Empty9,PaidTurnUsesFixture95(s.p)) world == ReplacementOverlay99(world0,[entries |-> ReplacementOverlay99(world0.entries,[id \in {9910} |-> entry]), interruptSelections |-> [id \in {s.p.id} |-> selected]]) parentOrigin == [f.origin EXCEPT !.plan.revision=1] projection == StaticRefreshReceiptFixture99(f.opened,world,f.opened.state.effects) parent == StaticRefreshAfterFixture99(f.opened,parentOrigin,world,f.opened.state.effects) origin == [kind |-> "Instruction",plan |-> s.imminentPlan,parent |-> s.imminentP.ability,ruleStep |-> "NoValue"] operation == ReplacementOverlay99(ReplacementAtomFixture99(51,51,"PreventAmount",FALSE,0), [value |-> 1,pattern |-> [kind |-> "ExposureMarkers"],targetSite |-> "NoValue",preventable |-> FALSE,baseOrigin |-> s.p.ability.source, operationId |-> 901,effectId |-> 401,parentContextId |-> parent.id,parentImminenceId |-> parent.imminenceId, parentReference |-> WouldContextKey99(parent.initialRef)]) effects == [id \in {51} |-> operation] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> s.p.ability.source, snapshotId |-> world.id,effects |-> effects,order |-> <<51>>] static == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world.id,forbiddenIds |-> {},values |-> Empty9] modifier == NewExpectedContext99(9911,entry.id,origin,world,description,effects,owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={modifier.id},!.contexts=[id \in {modifier.id} |-> modifier]] receipt == RuleWouldReceiptFixture99(9912,modifier,world,<<51>>) history == RuleWouldAfterFixture99(f.history0,modifier,world,<<51>>,receipt) prepared == [modifier EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=modifier.currentRef,!.windowId=650,!.group=65] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] atomicOrigin == [origin EXCEPT !.plan=s.resolvingPlan,!.parent=s.resolvingP.ability] actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> modifier.id,instruction |-> atomic.currentRef, snapshotId |-> world.id,effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE] step == [tag |-> "InstructionStepReturn",instruction |-> s.plan.id,index |-> 1,step |-> "Prevent1ExposureMarker",complete |-> TRUE, expectedControl |-> operation,expectedReturn |-> actualReturn] call == [kind |-> "Paid",before |-> s.resolvingP,after |-> s.finishedP,beforePlan |-> s.resolvingPlan,afterPlan |-> s.finishedPlan, stack |-> <>,step |-> step] afterOrigin == [parentOrigin EXCEPT !.plan.revision=2] after == [parent EXCEPT !.currentRef=OriginReference99(afterOrigin),!.state.effects=s.afterExposureMarkers, !.state.ancestry=[id \in {401} |-> parent.state.ancestry[id]],!.ancestryArchive=ReplacementOverlay99(@,parent.state.ancestry), !.modificationIds={901},!.modifications=Append(@,[kind |-> operation.kind,operation |-> operation,modifier |-> atomic.currentRef, beforeEffects |-> parent.state.effects,afterEffects |-> s.afterExposureMarkers,from |-> parent.currentRef,to |-> OriginReference99(afterOrigin)])] returned == [atomic EXCEPT !.phase="Returned"] resolved == ResolvedControlReceipt99(parent,after,atomic,s.resolvingP,operation) IN [f |-> f,s |-> s,selected |-> selected,selectedWorld |-> selectedWorld,entry |-> entry,world |-> world,parent |-> parent,parentOrigin |-> parentOrigin, projection |-> projection,origin |-> origin,operation |-> operation,effects |-> effects,description |-> description,static |-> static, modifier |-> modifier,registry |-> registry,receipt |-> receipt,history |-> history,prepared |-> prepared,noWindow |-> noWindow, clearance |-> clearance,cleared |-> cleared,atomic |-> atomic,atomicOrigin |-> atomicOrigin,actualReturn |-> actualReturn,call |-> call, after |-> after,afterOrigin |-> afterOrigin,returned |-> returned,resolved |-> resolved] FullSpecimen0070CallbackFixture99 == FullSpecimen0070CallbackForCard99("Specimen0070") FullSpecimen0070CallbackValid99(q) == LET s == q.s IN /\ FullExampleFamily021ContextValid99(q.f) /\ PublishSelectedPaidInterrupt99(q.f.readyWorld,q.selectedWorld,<>,<>,s.p,q.selected,900,s.d, q.f.readyWorld.paidContexts[AbilityKey99(s.d)],q.f.opened,q.f.origin,q.f.history0,s.received,s.option,LegalityFixture92(s.ready,s.option),{},CardFacts9) /\ CurrentInterruptWorld99(q.world,s.costLedger,CardFacts9) /\ RefreshExpectedWorld99(q.f.opened,q.parent,q.f.origin,q.parentOrigin,q.world,q.projection,q.f.history0) /\ BeginExpectedContext99(NewExpectedRegistry99,q.registry,q.modifier.id,q.origin,q.world,q.entry,q.description,q.static,q.effects,q.modifier.owner,CardFacts9,q.f.history0,q.history,q.receipt) /\ ObserveCurrentExpectedWould99(q.f.history0,q.history,q.modifier,q.origin,q.world,<<51>>,q.receipt) /\ PrepareOpeningInterrupts99(q.modifier,q.prepared,s.costLedger,s.costLedger,q.origin,q.world,q.history,650,65,Empty9,{600},CardFacts9) /\ NoPreparedInterrupt99(q.prepared,q.noWindow,q.origin,q.world,q.history,s.costLedger,<>,s.site,CardFacts9) /\ ClearPreparedInstruction99(q.noWindow,q.cleared,q.origin,q.world,q.history,s.costLedger,<>,<>,"NoModifiers",q.clearance,CardFacts9) /\ BeginClearedAbilityInstruction99(q.cleared,q.atomic,q.origin,q.atomicOrigin,q.world,s.costLedger,s.costLedger,<>, [kind |-> "Paid",before |-> s.imminentP,after |-> s.resolvingP],q.clearance,s.resolvingPlan) /\ ResolvePaidInterruptAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,q.selected,q.call,q.operation, s.afterExposureMarkers,q.resolved,q.actualReturn,CardFacts9) FullSpecimen0070RouteChecks99 == LET q == FullSpecimen0070CallbackFixture99 IN /\ FullSpecimen0070CallbackValid99(q) /\ q.s.paid.costPaid /\ q.s.paid.ability.detached /\ 1 \notin DOMAIN q.world.objects /\ q.parent.state.effects[401].value=2 /\ q.after.state.effects[401].value=1 /\ q.after.initialEffects=q.f.opened.initialEffects /\ q.after.openingRef=q.f.opened.openingRef /\ q.after.currentRef.revision=2 /\ q.returned.phase="Returned" /\ PositivePreventionObservations99(q.parent.state.effects,q.after.state.effects,q.resolved) # {} /\ ~ExampleFamily025PreventionObserved99(q.parent.state.effects,q.after.state.effects,ObjectAbilitySource9(2),q.resolved) FullSpecimen0070CallbackBoundariesChecks99 == LET q == FullSpecimen0070CallbackFixture99 invoke(parent,after,origin,modifier,selection,call,operation,effects,resolved,actualReturn) == ResolvePaidInterruptAndReturn99(parent,after,origin,q.afterOrigin,modifier,q.returned,q.world,selection,call,operation,effects,resolved,actualReturn,CardFacts9) IN /\ FullSpecimen0070CallbackValid99(q) /\ \A bad \in {[q.operation EXCEPT !.parentContextId=999],[q.operation EXCEPT !.parentImminenceId=999], [q.operation EXCEPT !.parentReference.id=999],[q.operation EXCEPT !.operationId=999],[q.operation EXCEPT !.effectId=999]} : ~invoke(q.parent,q.after,q.parentOrigin,q.atomic,q.selected,q.call,bad,q.s.afterExposureMarkers,q.resolved,q.actualReturn) /\ \A bad \in {[q.actualReturn EXCEPT !.contextId=999],[q.actualReturn EXCEPT !.instruction.id=999], [q.actualReturn EXCEPT !.snapshotId=999],[q.actualReturn EXCEPT !.effects=Empty9],[q.actualReturn EXCEPT !.complete=FALSE], [q.actualReturn EXCEPT !.childrenReturned=FALSE]} : ~invoke(q.parent,q.after,q.parentOrigin,q.atomic,q.selected,q.call,q.operation,q.s.afterExposureMarkers,q.resolved,bad) /\ \A bad \in {[q.selected EXCEPT !.instance=999],[q.selected EXCEPT !.source=ObjectAbilitySource9(11)], [q.selected EXCEPT !.windowId=999],[q.selected EXCEPT !.transactionId=999],[q.selected EXCEPT !.contextId=999], [q.selected EXCEPT !.imminenceId=999],[q.selected EXCEPT !.selectedReference.id=999]} : ~invoke(q.parent,q.after,q.parentOrigin,q.atomic,bad,q.call,q.operation,q.s.afterExposureMarkers,q.resolved,q.actualReturn) FullSpecimen0070ChangedControl99(q,operation) == LET modifier == [q.atomic EXCEPT !.actualEffects=[id \in {operation.id} |-> operation]] effects == q.s.afterExposureMarkers after == [q.parent EXCEPT !.currentRef=OriginReference99(q.afterOrigin),!.state.effects=effects, !.state.ancestry=[id \in DOMAIN effects |-> q.parent.state.ancestry[id]],!.ancestryArchive=ReplacementOverlay99(@,q.parent.state.ancestry), !.modificationIds=@ \cup {operation.operationId},!.modifications=Append(@,[kind |-> operation.kind,operation |-> operation,modifier |-> modifier.currentRef, beforeEffects |-> q.parent.state.effects,afterEffects |-> effects,from |-> q.parent.currentRef,to |-> OriginReference99(q.afterOrigin)])] receipt == [q.actualReturn EXCEPT !.effects=modifier.actualEffects] call == [q.call EXCEPT !.step.expectedControl=operation,!.step.expectedReturn=receipt] IN [modifier |-> modifier,after |-> after,receipt |-> receipt,call |-> call, returned |-> [modifier EXCEPT !.phase="Returned"],resolved |-> ResolvedControlReceipt99(q.parent,after,modifier,call.before,operation)] FullSpecimen0070CoherentControlChecks99 == LET q == FullSpecimen0070CallbackFixture99 IN /\ FullSpecimen0070CallbackValid99(q) /\ \A operation \in {[q.operation EXCEPT !.parentContextId=999],[q.operation EXCEPT !.parentImminenceId=999], [q.operation EXCEPT !.parentReference.id=999]} : LET c == FullSpecimen0070ChangedControl99(q,operation) IN ~ResolvePaidInterruptAndReturn99(q.parent,c.after,q.parentOrigin,q.afterOrigin,c.modifier,c.returned,q.world,q.selected,c.call,operation, q.s.afterExposureMarkers,c.resolved,c.receipt,CardFacts9) /\ \A receipt \in {[q.actualReturn EXCEPT !.contextId=999],[q.actualReturn EXCEPT !.instruction.id=999], [q.actualReturn EXCEPT !.snapshotId=999],[q.actualReturn EXCEPT !.effects=Empty9],[q.actualReturn EXCEPT !.complete=FALSE], [q.actualReturn EXCEPT !.childrenReturned=FALSE]} : LET call == [q.call EXCEPT !.step.expectedReturn=receipt] IN ~ResolvePaidInterruptAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,q.selected,call,q.operation, q.s.afterExposureMarkers,q.resolved,receipt,CardFacts9) FullGenericAbilityReturnChecks99 == LET q == FullSpecimen0070CallbackFixture99 afterOrigin == [q.atomicOrigin EXCEPT !.plan=q.call.afterPlan,!.parent=q.call.after.ability] IN /\ FullSpecimen0070CallbackValid99(q) /\ FinishExpectedAbilityInstruction99(q.atomic,q.returned,q.atomicOrigin,afterOrigin,q.world,q.call,q.actualReturn) /\ \A receipt \in {[q.actualReturn EXCEPT !.contextId=999],[q.actualReturn EXCEPT !.instruction.id=999], [q.actualReturn EXCEPT !.snapshotId=999],[q.actualReturn EXCEPT !.effects=Empty9],[q.actualReturn EXCEPT !.complete=FALSE], [q.actualReturn EXCEPT !.childrenReturned=FALSE]} : ~FinishExpectedAbilityInstruction99(q.atomic,q.returned,q.atomicOrigin,afterOrigin,q.world,[q.call EXCEPT !.step.expectedReturn=receipt],receipt) FullSpecimen0070ControlAfter99(q,modifier,operation,effects) == [q.parent EXCEPT !.currentRef=OriginReference99(q.afterOrigin),!.state.effects=effects, !.state.ancestry=[id \in DOMAIN effects |-> q.parent.state.ancestry[id]], !.ancestryArchive=ReplacementOverlay99(@,q.parent.state.ancestry), !.removedEffects=@ \cup (DOMAIN q.parent.state.effects \ DOMAIN effects), !.modificationIds=@ \cup {operation.operationId},!.modifications=Append(@, [kind |-> operation.kind,operation |-> operation,modifier |-> modifier.currentRef, beforeEffects |-> q.parent.state.effects,afterEffects |-> effects,from |-> q.parent.currentRef,to |-> OriginReference99(q.afterOrigin)])] FullSpecimen0070ControlExecutionChecks99 == LET q == FullSpecimen0070CallbackFixture99 IN /\ FullSpecimen0070CallbackValid99(q) /\ LET operation == [q.operation EXCEPT !.value=2] effects == [q.parent.state.effects EXCEPT ![401].value=0] after == FullSpecimen0070ControlAfter99(q,q.atomic,operation,effects) call == [q.call EXCEPT !.step.expectedControl=operation] resolved == ResolvedControlReceipt99(q.parent,after,q.atomic,call.before,operation) IN ~ResolvePaidInterruptAndReturn99(q.parent,after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,q.selected,call,operation, effects,resolved,q.actualReturn,CardFacts9) /\ LET operation == [q.operation EXCEPT !.effectId=0] modifier == [q.atomic EXCEPT !.actualEffects=[id \in {51} |-> operation]] effects == q.parent.state.effects receipt == [q.actualReturn EXCEPT !.effects=modifier.actualEffects] call == [q.call EXCEPT !.step.expectedControl=operation,!.step.expectedReturn=receipt] after == FullSpecimen0070ControlAfter99(q,modifier,operation,effects) resolved == ResolvedControlReceipt99(q.parent,after,modifier,call.before,operation) IN ~ResolvePaidInterruptAndReturn99(q.parent,after,q.parentOrigin,q.afterOrigin,modifier,[modifier EXCEPT !.phase="Returned"],q.world,q.selected,call,operation, effects,resolved,receipt,CardFacts9) FullSpecimen0070SelectedRecordChecks99 == LET q == FullSpecimen0070CallbackFixture99 IN /\ FullSpecimen0070CallbackValid99(q) /\ \A selection \in {[q.selected EXCEPT !.tag="OtherSelection"],[q.selected EXCEPT !.definition.syntax.id=999], [q.selected EXCEPT !.option.id=999]} : ~ResolvePaidInterruptAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,selection,q.call,q.operation, q.s.afterExposureMarkers,q.resolved,q.actualReturn,CardFacts9) FullPaidEntrySelectionChecks99 == LET q == FullSpecimen0070CallbackFixture99 IN /\ FullSpecimen0070CallbackValid99(q) /\ ActualImminenceEntry99(q.entry,q.origin,q.world,CardFacts9) /\ \A selection \in {[q.selected EXCEPT !.instance=999],[q.selected EXCEPT !.definition.syntax.id=999], [q.selected EXCEPT !.windowId=999],[q.selected EXCEPT !.option.id=999],[q.selected EXCEPT !.transactionId=999], [q.selected EXCEPT !.source=ObjectAbilitySource9(11)]} : LET entry == [q.entry EXCEPT !.selection=selection] world == [q.world EXCEPT !.entries[entry.id]=entry,!.interruptSelections[entry.before.id]=selection] IN ~ActualImminenceEntry99(entry,q.origin,world,CardFacts9) /\ LET entry == [q.entry EXCEPT !.selection.contextId=999] world == [q.world EXCEPT !.entries[entry.id]=entry] IN ~ActualImminenceEntry99(entry,q.origin,world,CardFacts9) FullGenericAbilityCallerBindingsChecks99 == LET q == FullSpecimen0070CallbackFixture99 finishedOrigin(beforeOrigin,call) == [beforeOrigin EXCEPT !.plan=call.afterPlan,!.parent=call.after.ability] finish(before,after,beforeOrigin,call,receipt) == FinishExpectedAbilityInstruction99(before,after,beforeOrigin,finishedOrigin(beforeOrigin,call),q.world,call,receipt) IN /\ FullSpecimen0070CallbackValid99(q) /\ ~finish([q.atomic EXCEPT !.phase="InstructionCleared"],q.returned,q.atomicOrigin,q.call,q.actualReturn) /\ LET before == [q.atomic EXCEPT !.currentRef.id=999] receipt == [q.actualReturn EXCEPT !.instruction=before.currentRef] call == [q.call EXCEPT !.step.expectedReturn=receipt] IN ~finish(before,[before EXCEPT !.phase="Returned"],q.atomicOrigin,call,receipt) /\ LET origin == [q.atomicOrigin EXCEPT !.plan.id=999] before == [q.atomic EXCEPT !.currentRef=InstructionWindowRef93(origin.plan)] receipt == [q.actualReturn EXCEPT !.instruction=before.currentRef] call == [q.call EXCEPT !.step.expectedReturn=receipt] IN ~finish(before,[before EXCEPT !.phase="Returned"],origin,call,receipt) /\ LET origin == [q.atomicOrigin EXCEPT !.parent.source=ObjectAbilitySource9(11)] IN ~finish(q.atomic,q.returned,origin,q.call,q.actualReturn) /\ ~finish(q.atomic,q.returned,q.atomicOrigin,[q.call EXCEPT !.step.expectedReturn.contextId=999],q.actualReturn) FullModifierReturnReceiptProfileChecks99 == LET q == FullSpecimen0070CallbackFixture99 badExposureMarker == [q.actualReturn EXCEPT !.tag="OtherReturn"] IN /\ FullSpecimen0070CallbackValid99(q) /\ ~ResolvePaidInterruptAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,q.selected, [q.call EXCEPT !.step.expectedReturn=badExposureMarker],q.operation,q.s.afterExposureMarkers,q.resolved,badExposureMarker,CardFacts9) /\ ~ResolvePaidInterruptAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,q.selected, [q.call EXCEPT !.step.expectedReturn.contextId=999],q.operation,q.s.afterExposureMarkers,q.resolved,q.actualReturn,CardFacts9) FullGenericReturnTagChecks99 == LET q == FullSpecimen0070CallbackFixture99 origin == [q.atomicOrigin EXCEPT !.plan=q.call.afterPlan,!.parent=q.call.after.ability] receipt == [q.actualReturn EXCEPT !.tag="OtherReturn"] IN /\ FullSpecimen0070CallbackValid99(q) /\ ~FinishExpectedAbilityInstruction99(q.atomic,q.returned,q.atomicOrigin,origin,q.world,[q.call EXCEPT !.step.expectedReturn=receipt],receipt) FullSpecimen0070UnpaidControlChecks99 == LET q == FullSpecimen0070CallbackFixture99 call == [q.call EXCEPT !.before.costPaid=FALSE,!.after.costPaid=FALSE] IN /\ FullSpecimen0070CallbackValid99(q) /\ ~ResolvePaidInterruptAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,q.selected,call,q.operation, q.s.afterExposureMarkers,q.resolved,q.actualReturn,CardFacts9) FullExampleFamily068ReplacementFixture99 == LET g == RelevanceExampleFamily068StartFixture99 entry == g.callerEntry world0 == ReplacementOverlay99(RelevanceObserveWorld99(g.world,g.selectedLedger), [entries |-> ReplacementOverlay99(g.world.entries,[id \in {entry.id} |-> entry]),usedReplacementIds |-> {}]) origin == [kind |-> "Instruction",plan |-> g.imminentPlan,parent |-> g.imminentP.ability,ruleStep |-> "NoValue"] parent == g.s.opened parentOrigin == g.s.base.origin body == [kind |-> "Damage",targeted |-> FALSE,targetCard |-> 0,damageType |-> "PersistentCapacityHarm",value |-> 1, actor |-> "SideA",targetSite |-> "SchemaAtom082",preventable |-> TRUE,specifications |-> parent.state.effects[1].specifications,restrictions |-> parent.state.effects[1].restrictions] blueprint == ReplacementBlueprintFixture99(5600,6,"Specimen0249",[kind |-> "Damage",damageType |-> "HarmClassA",actor |-> "SideA",targetSite |-> "SchemaAtom082",minValue |-> 1], [mode |-> "Replace",results |-> <>]) fullBlueprint == ReplacementOverlay99(blueprint,[wouldGrouping |-> "Preserve"]) operation == ReplacementOverlay99(ReplacementAtomFixture99(51,51,"CreateReplacement",FALSE,0), [value |-> 0,targetSite |-> "SchemaAtom082",baseController |-> g.d.syntax.controller,actor |-> g.d.syntax.controller,baseOrigin |-> g.d.syntax.source,parentContextId |-> parent.id,parentImminenceId |-> parent.imminenceId, parentReference |-> WouldContextKey99(parent.initialRef),replacementId |-> 5600,blueprint |-> fullBlueprint]) effects == [id \in {51} |-> operation] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> g.d.syntax.source, snapshotId |-> world0.id,effects |-> effects,order |-> <<51>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world0.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(5501,entry.id,origin,world0,description,effects,entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={context.id},!.contexts=[id \in {context.id} |-> context]] observed == [g.selectedLedger EXCEPT !.instances[5003].expected=[index \in {1} |-> [instruction |-> context.initialRef,effects |-> ExpectedObservationSet99(effects)]]] world == RelevanceObserveWorld99(world0,observed) receipt == RuleWouldReceiptFixture99(5502,context,world,<<51>>) history == RuleWouldAfterFixture99(g.s.history,context,world,<<51>>,receipt) prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=5503,!.group=55] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=g.s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] resolvingP == [g.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [g.imminentPlan EXCEPT !.phase="Resolving"] resolvingLedger == [observed EXCEPT !.instances[5003].status="Resolving"] atomicOrigin == [origin EXCEPT !.plan=resolvingPlan,!.parent=resolvingP.ability] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] usedLedger == [resolvingLedger EXCEPT !.instances[5003].used=TRUE] used == ConditionalUsedEvent96(resolvingP,5601) finishedP == [resolvingP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] finishedPlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=resolvingPlan.steps] finishedLedger == [usedLedger EXCEPT !.instances[5003].status="Complete"] actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> atomic.id,instruction |-> atomic.currentRef, snapshotId |-> world.id,effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE] step == [tag |-> "InstructionStepReturn",instruction |-> resolvingPlan.id,index |-> 1,step |-> Head(resolvingPlan.steps),complete |-> TRUE, expectedReplacement |-> operation,expectedReturn |-> actualReturn] beforeSnapshot == SnapshotWithConditionalRegistry96(world.conditional,usedLedger) afterSnapshot == SnapshotWithConditionalRegistry96([world.conditional EXCEPT !.point="AfterExampleFamily068Instruction"],finishedLedger) call == [kind |-> "Conditional",before |-> resolvingP,after |-> finishedP,beforePlan |-> resolvingPlan,afterPlan |-> finishedPlan, beforeLedger |-> usedLedger,candidateLedger |-> finishedLedger,afterLedger |-> finishedLedger,beforeStack |-> <>,afterStack |-> <>, step |-> step,beforeSnapshot |-> beforeSnapshot,afterSnapshot |-> afterSnapshot] record == [id |-> 5600,definition |-> g.d,lexemes |-> g.world.lexemes[AbilityKey99(g.d)],blueprint |-> fullBlueprint,bindingSnapshotId |-> world.id, provider |-> "ImminentInterrupt",scope |-> [kind |-> "Instruction",context |-> WouldContextKey99(parent.initialRef)], creation |-> [tag |-> "ResolvedReplacementCreation",replacement |-> 5600,instruction |-> atomic.currentRef,abilityInstance |-> g.p.id]] replacements == [id \in {5600} |-> fullBlueprint] decision == ReplacementDecision99(parent.state,1,replacements,[id |-> world.id,controllers |-> world.controllers],5600,<<11>>) nextState == ReplacementNextState99(parent.state,1,replacements,5600,<<11>>,decision) states == <> steps == <<[effectId |-> 1,decision |-> decision]>> afterOrigin == [parentOrigin EXCEPT !.plan.revision=2] after == [parent EXCEPT !.state=nextState,!.currentRef=OriginReference99(afterOrigin),!.currentWorld=world.id, !.templates=ReplacementOverlay99(@,nextState.effects),!.ancestryArchive=ReplacementOverlay99(@,ReplacementOverlay99(parent.state.ancestry,nextState.ancestry)), !.retiredEffects={1},!.wouldGroups=[id \in {11} |-> parent.wouldGroups[1]],!.temporaryReplacements=[id \in {5600} |-> record]] returned == [atomic EXCEPT !.phase="Returned"] receiptAfter == RuleWouldReceiptFixture99(5504,after,world,<<11>>) historyAfter == RuleWouldAfterFixture99(history,after,world,<<11>>,receiptAfter) IN [g |-> g,entry |-> entry,world0 |-> world0,world |-> world,origin |-> origin,parent |-> parent,parentOrigin |-> parentOrigin, operation |-> operation,description |-> description,projection |-> projection,effects |-> effects,context |-> context,registry |-> registry, observed |-> observed,receipt |-> receipt,history |-> history,prepared |-> prepared,noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared, resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan,resolvingLedger |-> resolvingLedger,atomicOrigin |-> atomicOrigin,atomic |-> atomic, usedLedger |-> usedLedger,used |-> used,actualReturn |-> actualReturn,call |-> call,record |-> record,states |-> states,steps |-> steps, afterOrigin |-> afterOrigin,after |-> after,returned |-> returned,receiptAfter |-> receiptAfter,historyAfter |-> historyAfter] FullExampleFamily068ReplacementValid99(q) == LET g == q.g IN /\ RelevanceExampleFamily068StartChecks99 /\ BeginExpectedContext99(NewExpectedRegistry99,q.registry,q.context.id,q.origin,q.world0,q.entry,q.description,q.projection,q.effects,q.entry.owner,CardFacts9,g.s.history,q.history,q.receipt) /\ ObserveInitialConditionalExpected99(g.selectedLedger,q.observed,g.imminentP,g.imminentPlan,q.context) /\ CurrentInterruptWorld99(q.world,q.observed,CardFacts9) /\ ObserveCurrentExpectedWould99(g.s.history,q.history,q.context,q.origin,q.world,<<51>>,q.receipt) /\ PrepareOpeningInterrupts99(q.context,q.prepared,q.observed,q.observed,q.origin,q.world,q.history,5503,55,Empty9,{4900},CardFacts9) /\ NoPreparedInterrupt99(q.prepared,q.noWindow,q.origin,q.world,q.history,q.observed,<>,g.s.site,CardFacts9) /\ ClearPreparedInstruction99(q.noWindow,q.cleared,q.origin,q.world,q.history,q.observed,<>,<>,"NoModifiers",q.clearance,CardFacts9) /\ BeginClearedAbilityInstruction99(q.cleared,q.atomic,q.origin,q.atomicOrigin,q.world,q.observed,q.resolvingLedger,<>, [kind |-> "Conditional",before |-> g.imminentP,after |-> q.resolvingP],q.clearance,q.resolvingPlan) /\ RecordConditionalExecutionUse96(q.resolvingLedger,q.usedLedger,q.resolvingP,q.resolvingPlan, ConditionalExecutionFixture96(q.resolvingP,q.resolvingPlan,{1}),Empty9,[id \in {5601} |-> q.used],Empty9, [id \in {5601} |-> ConditionalTurnUseRow96(q.resolvingP,5601)],5601,{q.used}) /\ ResolveConditionalReplacementAndReturn99(q.parent,q.after,q.parentOrigin,q.afterOrigin,q.atomic,q.returned,q.world,g.selection,q.call, q.operation,q.record,{5600},q.states,q.steps,q.actualReturn,CardFacts9) /\ ObserveCurrentExpectedWould99(q.history,q.historyAfter,q.after,q.afterOrigin,q.world,<<11>>,q.receiptAfter) FullExampleFamily068ImmediateChecks99 == LET q == FullExampleFamily068ReplacementFixture99 traversal == TimingRef9("SchemaAtom138",2) net == RelevanceCriterion99("Damage","HarmClassA","SideA",1,TRUE,"SchemaAtom082",TRUE) core == [net EXCEPT !.subtype="PersistentCapacityHarm"] IN /\ FullExampleFamily068ReplacementValid99(q) /\ q.operation.baseController=q.g.d.syntax.controller /\ q.operation.actor=q.g.d.syntax.controller /\ q.operation.baseController="SideA" /\ q.parent.state.effects[1].damageType="HarmClassA" /\ q.parent.state.effects[1].value=3 /\ DOMAIN q.after.state.effects={11} /\ q.after.state.effects[11].damageType="PersistentCapacityHarm" /\ q.after.state.effects[11].value=1 /\ q.after.state.effects[11].baseOrigin=q.parent.state.effects[1].baseOrigin /\ q.after.state.ancestry[11]={5600} /\ q.after.state.transformations # <<>> /\ q.after.initialEffects=q.parent.initialEffects /\ q.after.openingMembers=q.parent.openingMembers /\ q.after.conditionalIds=q.parent.conditionalIds /\ q.after.currentRef.revision=2 /\ q.after.openingRef.revision=0 /\ WouldOrdinalCountCurrent99(q.historyAfter,traversal,net)=1 /\ WouldOrdinalCountCurrent99(q.historyAfter,traversal,core)=1 /\ CurrentPendingRelevant99(q.after,q.world,q.historyAfter,q.call.afterLedger)={} /\ q.call.afterLedger.instances[5003].status="Complete" /\ q.call.afterLedger.instances[5003].used FullExampleFamily068InitialObservationChecks99 == LET q == FullExampleFamily068ReplacementFixture99 g == q.g emptyLog == [q.observed EXCEPT !.instances[5003].expected[1].effects={}] emptyResolving == [emptyLog EXCEPT !.instances[5003].status="Resolving"] IN /\ FullExampleFamily068ReplacementValid99(q) /\ q.observed.instances[5003].expected[1].effects=ExpectedObservationSet99(q.context.initialEffects) /\ q.context.initialRef.revision=0 /\ q.context.currentRef.revision=0 /\ ContextInitialObservationBound99(q.observed,g.imminentP,q.context) /\ ~BeginClearedAbilityInstruction99(q.cleared,q.atomic,q.origin,q.atomicOrigin,q.world,emptyLog,emptyResolving,<>, [kind |-> "Conditional",before |-> g.imminentP,after |-> q.resolvingP],q.clearance,q.resolvingPlan) /\ ~ObserveInitialConditionalExpected99(q.observed,q.observed,g.imminentP,g.imminentPlan,q.context) FullExampleFamily068CoherentCreationChecks99 == LET q == FullExampleFamily068ReplacementFixture99 g == q.g invoke(after,modifier,returned,call,operation,record) == ResolveConditionalReplacementAndReturn99(q.parent,after,q.parentOrigin,q.afterOrigin,modifier,returned,q.world,g.selection,call, operation,record,{5600},q.states,q.steps,call.step.expectedReturn,CardFacts9) foreign == [q.record.definition EXCEPT !.syntax.id=9199,!.activity.id=9199] foreignLex == [q.record.lexemes EXCEPT !.definition=foreign, !.mentions=[id \in DOMAIN @ |-> [@[id] EXCEPT !.owner=AbilityKey99(foreign)]]] foreignRecord == [q.record EXCEPT !.definition=foreign,!.lexemes=foreignLex] foreignCreation == [q.record EXCEPT !.creation.instruction.index=2] IN /\ FullExampleFamily068ReplacementValid99(q) /\ \A record \in {foreignRecord,foreignCreation,[q.record EXCEPT !.bindingSnapshotId=999]} : LET after == [q.after EXCEPT !.temporaryReplacements[5600]=record] IN ~invoke(after,q.atomic,q.returned,q.call,q.operation,record) /\ \A operation \in {[q.operation EXCEPT !.parentContextId=999],[q.operation EXCEPT !.parentImminenceId=999], [q.operation EXCEPT !.parentReference.id=999]} : LET modifier == [q.atomic EXCEPT !.actualEffects=[id \in {51} |-> operation]] receipt == [q.actualReturn EXCEPT !.effects=modifier.actualEffects] call == [q.call EXCEPT !.step.expectedReplacement=operation,!.step.expectedReturn=receipt] IN ~invoke(q.after,modifier,[modifier EXCEPT !.phase="Returned"],call,operation,q.record) FullExampleFamily068InvokeAltered99(q,after,modifier,returned,world,call,operation,record,afterUsedIds) == ResolveConditionalReplacementAndReturn99(q.parent,after,q.parentOrigin,q.afterOrigin,modifier,returned,world,q.g.selection,call, operation,record,afterUsedIds,q.states,q.steps,call.step.expectedReturn,CardFacts9) FullExampleFamily068OperationAuthorityChecks99 == LET q == FullExampleFamily068ReplacementFixture99 mismatch == [q.operation EXCEPT !.targetSite="SchemaAtom129"] mismatchCall == [q.call EXCEPT !.step.expectedReplacement=mismatch] IN /\ FullExampleFamily068ReplacementValid99(q) /\ ~FullExampleFamily068InvokeAltered99(q,q.after,q.atomic,q.returned,q.world,mismatchCall,mismatch,q.record,{5600}) /\ \A operation \in {[q.operation EXCEPT !.kind="NoExpectedEffects"], [q.operation EXCEPT !.replacementId=5601], [q.operation EXCEPT !.blueprint.behavior.results[1].value=2]} : LET effects == [id \in {51} |-> operation] modifier == [q.atomic EXCEPT !.actualEffects=effects] receipt == [q.actualReturn EXCEPT !.effects=effects] call == [q.call EXCEPT !.step.expectedReplacement=operation,!.step.expectedReturn=receipt] IN ~FullExampleFamily068InvokeAltered99(q,q.after,modifier,[modifier EXCEPT !.phase="Returned"],q.world,call,operation,q.record,{5600}) /\ LET record == [q.record EXCEPT !.scope=[kind |-> "Turn",id |-> q.world.turn.id]] after == [q.after EXCEPT !.temporaryReplacements[5600]=record] IN ~FullExampleFamily068InvokeAltered99(q,after,q.atomic,q.returned,q.world,q.call,q.operation,record,{5600}) /\ LET record == [q.record EXCEPT !.creation.abilityInstance=0] after == [q.after EXCEPT !.temporaryReplacements[5600]=record] IN ~FullExampleFamily068InvokeAltered99(q,after,q.atomic,q.returned,q.world,q.call,q.operation,record,{5600}) /\ LET extra == LexicalMentionFixture99(q.g.d,"you",3,"OtherOwnText") record == [q.record EXCEPT !.lexemes.mentions=ReplacementOverlay99(@,[id \in {99} |-> extra])] after == [q.after EXCEPT !.temporaryReplacements[5600]=record] IN /\ AbilityLexemesValid99(record.definition,record.lexemes,q.world.objects,CardFacts9) /\ ~FullExampleFamily068InvokeAltered99(q,after,q.atomic,q.returned,q.world,q.call,q.operation,record,{5600}) /\ ~FullExampleFamily068InvokeAltered99(q,q.after,q.atomic,q.returned,[q.world EXCEPT !.usedReplacementIds={5600}],q.call,q.operation,q.record,{5600}) /\ ~FullExampleFamily068InvokeAltered99(q,q.after,q.atomic,q.returned,q.world,q.call,q.operation,q.record,{}) FullExampleFamily068ReturnCompositionChecks99 == LET q == FullExampleFamily068ReplacementFixture99 wrongStep == [q.call EXCEPT !.step.expectedReplacement.replacementId=999] stillResolving == q.usedLedger wrongRegistry == [q.call EXCEPT !.candidateLedger=stillResolving,!.afterLedger=stillResolving, !.afterSnapshot=SnapshotWithConditionalRegistry96(q.call.afterSnapshot,stillResolving)] IN /\ FullExampleFamily068ReplacementValid99(q) /\ ~FullExampleFamily068InvokeAltered99(q,q.after,q.atomic,q.returned,q.world,wrongStep,q.operation,q.record,{5600}) /\ ~FullExampleFamily068InvokeAltered99(q,q.after,q.atomic,q.returned,q.world,wrongRegistry,q.operation,q.record,{5600}) /\ \A field \in {"complete","childrenReturned"} : LET receipt == [q.actualReturn EXCEPT ![field]=FALSE] call == [q.call EXCEPT !.step.expectedReturn=receipt] IN ~FullExampleFamily068InvokeAltered99(q,q.after,q.atomic,q.returned,q.world,call,q.operation,q.record,{5600}) FullExampleFamily068PreparedEmptyObservationChecks99 == LET q == FullExampleFamily068ReplacementFixture99 seedRecord == RuleEmptyReplacementFixture99(q.context,q.world) record == [seedRecord EXCEPT !.id=5650,!.blueprint.id=5650,!.blueprint.pattern.kind="CreateReplacement",!.creation.replacement=5650] world == [q.world EXCEPT !.replacementDefinitions=[id \in {5650} |-> record],!.liveReplacementIds={5650},!.usedReplacementIds=@ \cup {5650}] replacements == [id \in {5650} |-> record.blueprint] decision == ReplacementDecision99(q.context.state,51,replacements,[id |-> world.id,controllers |-> world.controllers],5650,<<>>) nextState == ReplacementNextState99(q.context.state,51,replacements,5650,<<>>,decision) states == <> steps == <<[effectId |-> 51,decision |-> decision]>> origin == [q.origin EXCEPT !.plan.revision=1] afterR == [q.context EXCEPT !.state=nextState,!.currentRef=OriginReference99(origin),!.retiredEffects={51},!.wouldGroups=Empty9] receipt == RuleWouldReceiptFixture99(5651,afterR,world,<<>>) history == RuleWouldAfterFixture99(q.history,afterR,world,<<>>,receipt) prepared == [afterR EXCEPT !.phase="Prepared",!.preparedEffects=Empty9,!.openingRef=afterR.currentRef,!.windowId=5652,!.group=56] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=q.g.s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomicPlan == [origin.plan EXCEPT !.phase="Resolving"] atomicOrigin == [origin EXCEPT !.plan=atomicPlan,!.parent=q.resolvingP.ability] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=Empty9] wrongLog == [q.observed EXCEPT !.instances[5003].expected[1].effects={}] wrongResolving == [wrongLog EXCEPT !.instances[5003].status="Resolving"] call == [kind |-> "Conditional",before |-> q.g.imminentP,after |-> q.resolvingP] IN /\ FullExampleFamily068ReplacementValid99(q) /\ ApplyAutomaticReplacements99(q.context,afterR,q.origin,origin,world,states,steps,CardFacts9,q.history) /\ ObserveCurrentExpectedWould99(q.history,history,afterR,origin,world,<<>>,receipt) /\ PrepareOpeningInterrupts99(afterR,prepared,q.observed,q.observed,origin,world,history,5652,56,Empty9,{4900},CardFacts9) /\ NoPreparedInterrupt99(prepared,noWindow,origin,world,history,q.observed,<>,q.g.s.site,CardFacts9) /\ ClearPreparedInstruction99(noWindow,cleared,origin,world,history,q.observed,<>,<>,"NoModifiers",clearance,CardFacts9) /\ ContextInitialObservationBound99(q.observed,q.g.imminentP,cleared) /\ q.observed.instances[5003].expected[1].effects=ExpectedObservationSet99(q.context.initialEffects) /\ decision.controller=q.g.d.syntax.controller /\ q.context.initialEffects # Empty9 /\ cleared.preparedEffects=Empty9 /\ cleared.initialRef.revision=0 /\ cleared.currentRef.revision=1 /\ BeginClearedAbilityInstruction99(cleared,atomic,origin,atomicOrigin,world,q.observed,q.resolvingLedger,<>,call,clearance,atomicPlan) /\ atomic.actualEffects=Empty9 /\ ~BeginClearedAbilityInstruction99(cleared,atomic,origin,atomicOrigin,world,wrongLog,wrongResolving,<>,call,clearance,atomicPlan) FullExampleFamily068DuplicateGuardControlsChecks99 == LET q == FullExampleFamily068ReplacementFixture99 returnedInput == [q.atomic EXCEPT !.phase="Returned"] foreignRef == [q.atomic.currentRef EXCEPT !.id=999] modifier == [q.atomic EXCEPT !.currentRef=foreignRef] record == [q.record EXCEPT !.creation.instruction=foreignRef] after == [q.after EXCEPT !.temporaryReplacements[5600]=record] receipt == [q.actualReturn EXCEPT !.instruction=foreignRef] call == [q.call EXCEPT !.step.expectedReturn=receipt] IN /\ FullExampleFamily068ReplacementValid99(q) /\ ~FullExampleFamily068InvokeAltered99(q,q.after,returnedInput,q.returned,q.world,q.call,q.operation,q.record,{5600}) /\ ~FullExampleFamily068InvokeAltered99(q,after,modifier,[modifier EXCEPT !.phase="Returned"],q.world,call,q.operation,record,{5600}) FullExampleFamily021CallbackChainFixture99(card) == LET q == FullSpecimen0070CallbackForCard99(card) f == q.f g == f.g world0 == f.currentWorld0 origin == [q.afterOrigin EXCEPT !.plan.revision=3] projection == StaticRefreshReceiptFixture99(q.after,world0,q.after.state.effects) context == StaticRefreshAfterFixture99(q.after,origin,world0,q.after.state.effects) receipt == RuleWouldReceiptFixture99(9959,context,world0,<<401>>) history == RuleWouldAfterFixture99(q.history,context,world0,<<401>>,receipt) world == FullExampleFamily021WorldReceipts99(world0,context,history,g.received10,g.parentReady) IN [q |-> q,f |-> f,g |-> g,world0 |-> world0,origin |-> origin,projection |-> projection, context |-> context,receipt |-> receipt,history |-> history,world |-> world] FullExampleFamily021CallbackChainValid99(c) == LET q == c.q f == c.f g == c.g IN /\ FullSpecimen0070CallbackValid99(q) /\ ExampleFamily021ChainValid99(g) /\ q.resolved.id=g.s.events[31].effectId /\ g.s.events[31].kind="AvoidExposureMarker" /\ q.resolved.beforeEffects=g.s.beforeExposureMarkers /\ q.resolved.afterEffects=g.s.afterExposureMarkers /\ LET event == CHOOSE observed \in PositivePreventionObservations99(q.parent.state.effects,q.after.state.effects,q.resolved) : observed.kind="AvoidExposureMarker" IN /\ event.amount=1 /\ event.source=g.s.d.syntax.source /\ event.operationId=g.s.events[31].effectId /\ event.interruptInstance=g.s.p.id /\ event.instruction=q.atomic.currentRef /\ q.returned.phase="Returned" /\ g.parentReturned.stage="NeedCheckpoint" /\ g.parentReady.stage="Ready" /\ g.parentReady.checkpoint=10 /\ g.received10.instances[9100].status="Complete" /\ g.returnedP.phase="Returned" /\ RefreshExpectedWorld99(q.after,c.context,q.afterOrigin,c.origin,c.world0,c.projection,q.history) /\ CurrentInterruptWorld99(c.world,g.received10,CardFacts9) /\ ObserveCurrentExpectedWould99(q.history,c.history,c.context,c.origin,c.world,<<401>>,c.receipt) /\ c.context.initialEffects=f.opened.initialEffects /\ c.context.openingRef=f.opened.openingRef /\ c.context.modifications[2]=q.after.modifications[2] /\ c.context.conditionalIds=f.opened.conditionalIds /\ c.context.openingMembers=f.opened.openingMembers FullExampleFamily021CallbackPaidChecks99 == LET c == FullExampleFamily021CallbackChainFixture99("Specimen0070") q == FullExampleFamily021ReservationFixture99(c.f,c.context,c.origin,c.world,c.history,c.g.parentReady) beforeCP == FullExampleFamily021ReservationFixture99(c.f,c.context,c.origin,c.world,c.history,c.g.parentReturned) IN /\ FullExampleFamily021CallbackChainValid99(c) /\ c.context.currentRef.revision=3 /\ c.context.state.effects[401].value=1 /\ c.context.openingRef.revision=0 /\ c.context.openingMembers=Empty9 /\ FullExampleFamily021Reserve99(c.f,c.context,c.origin,c.history,c.g.parentReady,q) /\ ~FullExampleFamily021Reserve99(c.f,c.context,c.origin,c.history,c.g.parentReturned,beforeCP) /\ q.p.ability.source=ObjectAbilitySource9(13) /\ c.q.s.p.ability.source=ObjectAbilitySource9(1) FullExampleFamily021CallbackNoExampleFamily026Checks99 == LET c == FullExampleFamily021CallbackChainFixture99("Specimen0162") d == ExampleFamily021NoExampleFamily026Definition99(13) key == AbilityKey99(d) IN /\ FullExampleFamily021CallbackChainValid99(c) /\ ConditionalActive96(d,c.world.conditional) /\ InterruptRelevant99(d,c.world.lexemes[key],c.world.capabilities[key],c.context,c.world,c.history) /\ ConditionalInterruptPrimary99(d,c.world.capabilities[key],c.context,c.world,c.history) /\ key \in OpeningConditionalKeys99(c.context,c.world,c.history,c.g.received10) /\ CurrentPendingRelevant99(c.context,c.world,c.history,c.g.received10)={} /\ c.context.conditionalIds={} /\ c.context.openingMembers=Empty9 FullPublicPaidRouteChecks99 == LET q == FullSpecimen0070CallbackFixture99 f == q.f s == q.s IN /\ FullSpecimen0070CallbackValid99(q) /\ ReservePaidAbility99(<>,<>,s.p,900,s.d,s.lex,f.readyWorld.paidContexts[AbilityKey99(s.d)], s.option,LegalityFixture92(s.ready,s.option),{},CardFacts9) /\ ~ReserveNormalPaid99(<>,<>,s.p,900,s.d,s.lex,f.readyWorld.paidContexts[AbilityKey99(s.d)], s.option,LegalityFixture92(s.ready,s.option),{},CardFacts9) FullPublicMidItemInspectionChecks99 == LET d == PaidDefinitionFixture95("Imp","Specimen0115",<<"ItemInspection","OncePerTurn">>,<<[kind |-> "HostedCluster",amount |-> 1]>>) objects == [id \in {1,2,3} |-> CASE id=1 -> CardObject9("Specimen0115","Play",TRUE,"Up") [] id=2 -> CardObject9("Specimen0148","Play",TRUE,"Down") [] OTHER -> PaidCounterFixture95("SchemaAtom180",1)] c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.traversal=TraversalFixture92("ProcedureCoded75d879e00ff"),!.traversalControl=PaidTraversalControlFixture95(TraversalFixture92("ProcedureCoded75d879e00ff"))] a == [OpenItemInspection7(300,2,objects[2],2,40,"siteInspection",{}) EXCEPT !.step="ProcedureCode1dd0e8f05be2",!.active=TRUE,!.beginMet=TRUE] w == ReadyFixture92(WindowFixture92(174,"MidItemInspection",ItemInspectionPrioritySite9(c.turn,a,objects),Empty9,0,NoTimingRef9)) mid == MidOption7("Imp",TRUE,TRUE,TRUE) basic == MidOption7("BasicRetire",TRUE,TRUE,TRUE) option == [PaidOptionFixture95(d,w) EXCEPT !.target=2] busy == StartedFixture92(w,option) p == OpenPaidProcedure95(140,d,option,w,LegalityFixture92(w,option).transactionId,"Play") lex == LexicalSingleFixture99(d,"Specimen0115","trash",4,"EffectOperator",CardFacts9) prohibited == [c EXCEPT !.useProhibitions={[source |-> d.syntax.source,traversalId |-> 2]}] IN /\ AbilityLexemesValid99(d,lex,objects,CardFacts9) /\ ~AbilityInterrupt99(d,lex) /\ ReserveCurrentMidItemInspection99(<>,<>,p,140,d,lex,c,option,LegalityFixture92(w,option),{},a,a,mid,{mid,basic},TRUE,FALSE,CardFacts9) /\ ~ReserveCurrentMidItemInspection99(<>,<>,p,140,d,lex,prohibited,option,LegalityFixture92(w,option),{},a,a,mid,{mid,basic},TRUE,FALSE,CardFacts9) /\ ~ReserveNormalPaid99(<>,<>,p,140,d,lex,c,option,LegalityFixture92(w,option),{},CardFacts9) /\ ~ReserveCurrentMidItemInspection99(<>,<>,p,140,d,lex,c,option,LegalityFixture92(w,option),{},[a EXCEPT !.midUsed=TRUE],[a EXCEPT !.midUsed=TRUE],mid,{mid,basic},TRUE,FALSE,CardFacts9) /\ ~MidItemInspectionChoiceAllowed7("Decline",{[mid EXCEPT !.legal=FALSE],basic},TRUE,FALSE) FullExampleFamily068EntrySnapshotChecks99 == LET q == FullExampleFamily068ReplacementFixture99 entry == [q.entry EXCEPT !.snapshotId=999] world == [q.world0 EXCEPT !.id=999,!.conditional.id=999,!.entries[entry.id]=entry] IN /\ FullExampleFamily068ReplacementValid99(q) /\ ActualImminenceEntry99(q.entry,q.origin,q.world0,CardFacts9) /\ ~ActualImminenceEntry99(entry,q.origin,world,CardFacts9) FullPublicNormalPositiveChecks99 == \A card \in {"Specimen0090","Specimen0189"} : LET kind == IF card="Specimen0090" THEN "NeutralValue00001" ELSE "Paid" cost == IF card="Specimen0090" THEN <<[kind |-> "SpendActionPoints",amount |-> 1],[kind |-> "RetireSource",amount |-> 1]>> ELSE <<[kind |-> "ResourceUnits",amount |-> 2]>> d == [PaidDefinitionFixture95(9250,card,<<>>,cost) EXCEPT !.refersHosted=card="Specimen0090"] objects == PaidSourceFixture95(card) w == PaidWindowFixture95(9251,kind,"SideB") c == PaidContextFixture95(d,objects,TurnFixture92("SideB")) lex == LexicalReceiptFixture99(d,card,Empty9,CardFacts9) option == PaidOptionFixture95(d,w) p == OpenPaidProcedure95(9252,d,option,w,LegalityFixture92(w,option).transactionId,"Play") IN /\ AbilityLexemesValid99(d,lex,objects,CardFacts9) /\ ~AbilityInterrupt99(d,lex) /\ ReserveNormalPaid99(<>,<>,p,9252,d,lex,c,option,LegalityFixture92(w,option),{},CardFacts9) /\ w.kind=kind /\ PaidWindowKinds99(d,lex)={kind} FullBarrierInstructionFixture99 == LET s == SubStartFixture98("Specimen0245",<<"Damage1","GainResourceUnit">>,<<>>) snapshot == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,s.objects) ledger == NewConditionalLedger96(snapshot) entry == [tag |-> "ActualBarrierInstructionEntry",kind |-> "EncounterSelection",id |-> 9950,snapshotId |-> 1, stackBefore |-> <<>>,stackAfter |-> <<>>,owner |-> s.p.owner,procedure |-> s.p,beforeLoop |-> s.loop,afterLoop |-> s.selected, encounter |-> s.e,step |-> "ProcedureCodef1914978bb8e",orderState |-> s.state,currentOrder |-> s.actualOrder,instance |-> s.p.id,usedInstances |-> {}, present |-> DOMAIN s.definitions,activity |-> s.activity,points |-> snapshot.points] origin == [kind |-> "BarrierInstruction",procedure |-> s.p] world == [tag |-> "CurrentInterruptWorld",id |-> 1,turn |-> TurnFixture92("SideB"),traversalControl |-> s.control, objects |-> s.objects,controllers |-> [id \in DOMAIN s.objects |-> IF id=2 THEN "SideA" ELSE "SideB"],activePeriods |-> Empty9, conditional |-> snapshot,paidDefinitions |-> Empty9,lexemes |-> Empty9,capabilities |-> Empty9,paidContexts |-> Empty9,turnUses |-> Empty9, replacementDefinitions |-> Empty9,liveReplacementIds |-> {},entries |-> [id \in {9950} |-> entry]] effect == ReplacementOverlay99(ReplacementAtomFixture99(1,1,"BarrierInstruction",FALSE,0), [value |-> 0,preventable |-> TRUE,targetSite |-> "SchemaAtom082",baseController |-> s.p.definition.syntax.controller,actor |-> s.p.definition.syntax.controller,baseOrigin |-> s.p.ability.source,barrierInstruction |-> s.p.barrierInstruction, payload |-> [kind |-> "BarrierInstructionTemplate",instructions |-> s.p.payload.instructions]]) effects == [id \in {1} |-> effect] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> s.p.ability.source, snapshotId |-> 1,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> 1,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(9951,entry.id,origin,world,description,effects,s.p.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={context.id},!.contexts=[id \in {context.id} |-> context]] receipt == RuleWouldReceiptFixture99(9952,context,world,<<1>>) history == RuleWouldAfterFixture99(NewWouldAccounting99,context,world,<<1>>,receipt) prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=650,!.group=65] site == SubWindowFixture98(s.p,650).site noWindow == [prepared EXCEPT !.phase="Cleared",!.site=site] ready == [s.p EXCEPT !.phase="FirstTargets"] afterOrigin == [origin EXCEPT !.procedure=ready] clearance == BarrierInstructionContextClearance99(noWindow,0,s.p) returned == [noWindow EXCEPT !.phase="Returned",!.actualEffects=effects,!.clearance=clearance] IN [s |-> s,ledger |-> ledger,entry |-> entry,origin |-> origin,world |-> world,effects |-> effects,description |-> description,projection |-> projection, context |-> context,registry |-> registry,receipt |-> receipt,history |-> history,prepared |-> prepared,site |-> site,noWindow |-> noWindow, ready |-> ready,afterOrigin |-> afterOrigin,clearance |-> clearance,returned |-> returned] FullBarrierInstructionValid99(q) == /\ SubStartValid98(q.s) /\ BeginExpectedContext99(NewExpectedRegistry99,q.registry,q.context.id,q.origin,q.world,q.entry,q.description,q.projection,q.effects,q.s.p.owner,CardFacts9,NewWouldAccounting99,q.history,q.receipt) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,q.history,q.context,q.origin,q.world,<<1>>,q.receipt) /\ PrepareOpeningInterrupts99(q.context,q.prepared,q.ledger,q.ledger,q.origin,q.world,q.history,650,65,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(q.prepared,q.noWindow,q.origin,q.world,q.history,q.ledger,<<>>,q.site,CardFacts9) /\ ClearPreparedBarrierInstruction99(q.noWindow,q.returned,q.origin,q.afterOrigin,q.world,q.history,q.ledger,<<>>,<<>>,"NoModifiers", q.s.p.payload,FALSE,q.clearance,CardFacts9) FullBarrierInstructionRouteChecks99 == LET q == FullBarrierInstructionFixture99 IN /\ FullBarrierInstructionValid99(q) /\ q.context.state.effects[1].baseController=q.s.p.definition.syntax.controller /\ q.context.state.effects[1].actor="SideA" /\ q.context.currentRef.origin="BarrierInstruction" /\ q.context.currentRef.index=0 /\ q.context.currentRef.abilityInstance=q.s.p.id /\ q.context.currentRef.source=ObjectAbilitySource9(2) /\ q.ready.phase="FirstTargets" /\ ~q.ready.ability.detached /\ ~q.ready.ability.firstImminent /\ q.ready.ability.source=ObjectAbilitySource9(2) /\ q.ready.payload=q.s.p.payload /\ q.s.e.resolved={} /\ q.s.selected.handled={} /\ ~ClearPreparedInstruction99(q.noWindow,q.returned,q.origin,q.world,q.history,q.ledger,<<>>,<<>>,"NoModifiers",q.clearance,CardFacts9) FullBarrierInstructionPreventedFixture99(q) == LET p == [q.s.p EXCEPT !.revision=1] source == RuleAbilitySource9("StructuralWholeBarrierInstructionPrevention99") plan == [OpenInstruction93(9964,"Ability",9963,source,"Rule",1,"NoValue",<<"PreventBarrierInstruction">>,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] operation == ReplacementOverlay99(ReplacementAtomFixture99(9961,9961,"PreventWhole",FALSE,0), [value |-> 0,pattern |-> [kind |-> "BarrierInstruction"],targetSite |-> "NoValue",baseOrigin |-> source,operationId |-> 9962,effectId |-> 1, parentContextId |-> q.context.id,parentImminenceId |-> q.context.imminenceId,parentReference |-> WouldContextKey99(q.context.initialRef)]) modification == [kind |-> "PreventWhole",operation |-> operation,modifier |-> InstructionWindowRef93(plan), beforeEffects |-> q.context.state.effects,afterEffects |-> Empty9,from |-> q.context.currentRef,to |-> BarrierInstructionWindowRef98(p)] context == [q.context EXCEPT !.currentRef=BarrierInstructionWindowRef98(p),!.phase="WindowOpen",!.windowId=650,!.group=65,!.site=q.site, !.state.effects=Empty9,!.state.ancestry=Empty9,!.removedEffects={1},!.modificationIds={9962},!.modifications= <>] IN [p |-> p,context |-> context,modification |-> modification,operation |-> operation,plan |-> plan] FullBarrierInstructionProjectionChecks99 == LET q == FullBarrierInstructionFixture99 payload == [q.s.p.definition EXCEPT !.instructions= <<2100>>] replaced == [q.context EXCEPT !.state.effects[1].payload.instructions= <<2100>>] prevention == FullBarrierInstructionPreventedFixture99(q) prevented == prevention.context IN /\ FullBarrierInstructionValid99(q) /\ ExpectedBarrierInstructionProjection99(replaced,q.s.p,payload,FALSE) /\ payload.syntax.source=q.s.p.ability.source /\ payload.syntax.source # ObjectAbilitySource9(4) /\ ExpectedBarrierInstructionProjection99(prevented,prevention.p,prevention.p.payload,TRUE) /\ ~ExpectedBarrierInstructionProjection99(prevented,prevention.p,prevention.p.payload,FALSE) /\ ~ExpectedBarrierInstructionProjection99(q.context,q.s.p,q.s.p.payload,TRUE) /\ ~ExpectedBarrierInstructionProjection99([q.context EXCEPT !.state.effects[1].barrierInstruction=102],q.s.p,q.s.p.payload,FALSE) /\ ~ExpectedBarrierInstructionProjection99([q.context EXCEPT !.state.effects[1].baseOrigin=ObjectAbilitySource9(4)],q.s.p,q.s.p.payload,FALSE) /\ ~ExpectedBarrierInstructionProjection99([q.context EXCEPT !.state.effects[1].payload.instructions= <<>>],q.s.p,[payload EXCEPT !.instructions= <<>>],FALSE) /\ \A bad \in {[q.clearance EXCEPT !.openingRevision=1],[q.clearance EXCEPT !.barrierInstruction.index=1], [q.clearance EXCEPT !.barrierInstruction.source=ObjectAbilitySource9(4)],[q.clearance EXCEPT !.complete=FALSE]} : ~ClearPreparedBarrierInstruction99(q.noWindow,[q.returned EXCEPT !.clearance=bad],q.origin,q.afterOrigin,q.world,q.history,q.ledger,<<>>,<<>>,"NoModifiers",q.s.p.payload,FALSE,bad,CardFacts9) FullBarrierInstructionCoherentProjectionChecks99 == LET q == FullBarrierInstructionFixture99 original == q.context.state.effects[1] twice == [q.context EXCEPT !.state.effects=[id \in {1,2} |-> IF id=1 THEN original ELSE [original EXCEPT !.id=2,!.lineage=2]], !.state.ancestry=[id \in {1,2} |-> {}],!.state.usedEffectIds=@ \cup {2}] prevention == FullBarrierInstructionPreventedFixture99(q) empty == prevention.context changed == [q.s.p.payload EXCEPT !.instructions= <<2100>>] IN /\ FullBarrierInstructionValid99(q) /\ ReplacementStateValid99(twice.state) /\ ~ExpectedBarrierInstructionProjection99(twice,q.s.p,q.s.p.payload,FALSE) /\ ~ExpectedBarrierInstructionProjection99(empty,prevention.p,changed,TRUE) /\ ~ExpectedBarrierInstructionProjection99(q.context,q.s.p,changed,FALSE) /\ ~ExpectedBarrierInstructionProjection99([q.context EXCEPT !.state.effects[1].kind="ExposureMarkers"],q.s.p,q.s.p.payload,FALSE) /\ ~ExpectedBarrierInstructionProjection99([q.context EXCEPT !.state.effects[1].payload.kind="OtherTemplate"],q.s.p,q.s.p.payload,FALSE) FullBarrierInstructionCoherentClearanceChecks99 == LET q == FullBarrierInstructionFixture99 clear(before,world,history,beforeStack,afterStack,route,clearance,after) == ClearPreparedBarrierInstruction99(before,after,q.origin,q.afterOrigin,world,history,q.ledger,beforeStack,afterStack,route,q.s.p.payload,FALSE,clearance,CardFacts9) IN /\ FullBarrierInstructionValid99(q) /\ ~clear([q.noWindow EXCEPT !.phase="Prepared"],q.world,q.history,<<>>,<<>>,"NoModifiers",q.clearance,q.returned) /\ ~clear(q.noWindow,q.world,q.history,<<>>,<<>>,"UnknownRoute",q.clearance,q.returned) /\ LET other == PaidWindowFixture95(9960,"Paid","SideB") IN ~clear(q.noWindow,q.world,q.history,<<>>,<>,"NoModifiers",q.clearance,q.returned) /\ LET world == [q.world EXCEPT !.id=999,!.conditional.id=999] current == [q.noWindow EXCEPT !.currentWorld=999] receipt == RuleWouldReceiptFixture99(9953,current,world,<<1>>) history == RuleWouldAfterFixture99(q.history,current,world,<<1>>,receipt) IN /\ ObserveCurrentExpectedWould99(q.history,history,current,q.origin,world,<<1>>,receipt) /\ ~clear(q.noWindow,world,history,<<>>,<<>>,"NoModifiers",q.clearance,q.returned) /\ LET world == [q.world EXCEPT !.conditional.id=999] IN ~clear(q.noWindow,world,q.history,<<>>,<<>>,"NoModifiers",q.clearance,q.returned) /\ LET receipt == [q.history.latest[q.noWindow.id] EXCEPT !.effects=Empty9] history == [q.history EXCEPT !.latest[q.noWindow.id]=receipt] IN ~clear(q.noWindow,q.world,history,<<>>,<<>>,"NoModifiers",q.clearance,q.returned) FullBarrierInstructionWholePreventionHistoryChecks99 == LET q == FullBarrierInstructionFixture99 f == FullBarrierInstructionPreventedFixture99(q) noHistory == [f.context EXCEPT !.modifications= <<>>,!.modificationIds={}] retiredOnly == [noHistory EXCEPT !.removedEffects={},!.retiredEffects={1}] blueprint == [id |-> 9966,source |-> RuleAbilitySource9("StructuralEmptySubReplacement99"),sourceSHA |-> "SyntheticNormalizedRuleControl99", pattern |-> [kind |-> "BarrierInstruction"],behavior |-> [mode |-> "Replace",results |-> <<>>],wouldGrouping |-> "Preserve"] replacements == [id \in {9966} |-> blueprint] decision == ReplacementDecision99(q.context.state,1,replacements,q.world,9966,<<>>) replacedState == ReplacementNextState99(q.context.state,1,replacements,9966,<<>>,decision) replaced == [retiredOnly EXCEPT !.state=replacedState] IN /\ FullBarrierInstructionValid99(q) /\ PreventExpectedWhole99(q.context.state.effects,f.context.state.effects,1) /\ WouldContextValid99(f.modification.modifier) /\ BarrierInstructionWasPrevented99(f.context,f.p) /\ ExpectedBarrierInstructionProjection99(f.context,f.p,f.p.payload,TRUE) /\ ~ExpectedBarrierInstructionProjection99(noHistory,f.p,f.p.payload,TRUE) /\ ~ExpectedBarrierInstructionProjection99(retiredOnly,f.p,f.p.payload,TRUE) /\ ApplyReplacementStep99(q.context.state,replacedState,1,replacements,q.world,decision) /\ DOMAIN replaced.state.effects={} /\ replaced.retiredEffects={1} /\ replaced.removedEffects={} /\ ~ExpectedBarrierInstructionProjection99(replaced,f.p,f.p.payload,TRUE) /\ LET source == RuleAbilitySource9("StructuralWholeBarrierInstructionPrevention99") plan == [OpenInstruction93(9964,"Rule",0,source,"NoValue",0,source.rule,<<"PreventBarrierInstruction">>,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] modifier == InstructionWindowRef93(plan) context == [f.context EXCEPT !.modifications[1].modifier=modifier] IN /\ WouldContextValid99(modifier) /\ ~ExpectedBarrierInstructionProjection99(context,f.p,f.p.payload,TRUE) /\ \A row \in {[f.modification EXCEPT !.kind="Replacement"],[f.modification EXCEPT !.operation.kind="AddExpectedValue"], [f.modification EXCEPT !.operation.parentContextId=999],[f.modification EXCEPT !.operation.parentImminenceId=999], [f.modification EXCEPT !.operation.parentReference.id=999],[f.modification EXCEPT !.afterEffects=f.modification.beforeEffects], [f.modification EXCEPT !.beforeEffects[1].kind="ExposureMarkers"],[f.modification EXCEPT !.beforeEffects[1].barrierInstruction=999], [f.modification EXCEPT !.beforeEffects[1].baseOrigin=ObjectAbilitySource9(4)], [f.modification EXCEPT !.modifier.abilityInstance=0]} : LET context == [f.context EXCEPT !.modifications= <>] IN ~ExpectedBarrierInstructionProjection99(context,f.p,f.p.payload,TRUE) TraversalPeriodFrameFixture99 == LET pre == [OpenTraversal6(6100,6110,"StructuralTraversalCaller") EXCEPT !.step="ProcedureCode4d6bd06d2c9f",!.attacked="SchemaAtom082"] initiation == [traversal |-> pre,announced |-> TRUE,costsPaid |-> TRUE,badPubAdded |-> TRUE] begun == [initiation EXCEPT !.traversal.formalBegun=TRUE] ending == [begun.traversal EXCEPT !.phase="TraversalEnds",!.step="ProcedureCode9606a4cd52b4",!.ending=TRUE,!.phaseId=6111,!.usedPhaseIds={6110,6111}] endControl == [traversal |-> ending,windowsDone |-> TRUE,windows |-> <<>>,fundReturned |-> TRUE,resultDeclared |-> TRUE,phaseEndedIds |-> {6110}] complete == [endControl EXCEPT !.traversal.complete=TRUE,!.phaseEndedIds={6110,6111}] IN [pre |-> pre,initiation |-> initiation,begun |-> begun,ending |-> ending,endControl |-> endControl,complete |-> complete] TraversalPeriodEntryFixture99(stage,traversal) == LET s == StaticProjectionFixture99 beforePlan == [s.entry.beforePlan EXCEPT !.id=4100+stage] afterPlan == [beforePlan EXCEPT !.announced=TRUE,!.phase="Imminent"] entry == [s.entry EXCEPT !.id=4300+stage,!.snapshotId=501+stage,!.beforePlan=beforePlan,!.afterPlan=afterPlan, !.targets.instruction=beforePlan.id] stated == TimingRef9("StatedPeriod",6200) world == [s.world EXCEPT !.id=501+stage,!.traversalControl.traversal=traversal,!.entries=[id \in {entry.id} |-> entry], !.activePeriods=[ref \in {stated} |-> [tag |-> "TimingPeriodInstance",period |-> ref,procedureId |-> 4200]]] origin == [s.origin EXCEPT !.plan=afterPlan] description == [s.description EXCEPT !.context=OriginReference99(origin),!.snapshotId=world.id] projection == [s.projection EXCEPT !.description=description,!.snapshotId=world.id] context == NewExpectedContext99(4500+stage,entry.id,origin,world,description,s.initial,entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {context.id} |-> context],!.entryIds={entry.id},!.usedContextIds={context.id}] IN [entry |-> entry,world |-> world,origin |-> origin,description |-> description,projection |-> projection, initial |-> s.initial,context |-> context,registry |-> registry,receipt |-> RuleWouldReceiptFixture99(6300+stage,context,world,<<1>>)] TraversalPeriodEntryValid99(s) == /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,s.context.id,s.origin,s.world,s.entry,s.description,s.projection,s.initial,s.entry.owner,CardFacts9,NewWouldAccounting99,InitialCaptureAfterFixture99(NewWouldAccounting99,s.context,s.receipt),s.receipt) /\ ExpectedWorldValid99(s.world) /\ s.context.currentRef.origin="Rule" /\ s.context.currentRef.abilityInstance=0 /\ s.context.currentRef.index=0 TraversalPeriodMembershipFixture99(s) == [ref \in ActualWouldPeriods99(s.world) |-> [tag |-> "WouldPeriodMembership",openingId |-> s.context.id, context |-> WouldContextKey99(s.context.currentRef),period |-> ref,procedureId |-> 4200, frame |-> CASE ref.kind="Turn" -> s.world.turn [] ref.kind="SchemaAtom138" -> s.world.traversalControl.traversal [] OTHER -> s.world.activePeriods[ref]]] TraversalPeriodBoundaryChecks99 == LET f == TraversalPeriodFrameFixture99 scenarios == <> turn == TimingRef9("Turn",scenarios[1].world.turn.id) traversal == TimingRef9("SchemaAtom138",6100) stated == TimingRef9("StatedPeriod",6200) event == [tag |-> "TraversalEnds",traversalId |-> 6100] IN /\ FormalTraversalBegin6(f.initiation,f.begun,{TraversalBeginEvent6(f.pre)}) /\ CompleteTraversal6(f.endControl,f.complete,TRUE,{event,TraversalPhaseEndEvent6(f.ending)},{6100}) /\ TraversalTimingPresent6(f.pre) /\ ~DuringTraversal6(f.pre) /\ DuringTraversal6(f.begun.traversal) /\ DuringTraversal6(f.ending) /\ f.ending.ending /\ ~DuringTraversal6(f.complete.traversal) /\ f.complete.traversal.id=6100 /\ \A index \in 1..4 : LET s == scenarios[index] opening == [id |-> s.context.id,context |-> s.context.currentRef] IN /\ TraversalPeriodEntryValid99(s) /\ ActualWouldMembership99(opening,s.world,TraversalPeriodMembershipFixture99(s)) /\ ActualWouldPeriods99(s.world)={turn,stated} \cup IF index \in {2,3} THEN {traversal} ELSE {} /\ \A index \in {1,4} : LET s == scenarios[index] opening == [id |-> s.context.id,context |-> s.context.currentRef] forced == ReplacementOverlay99(TraversalPeriodMembershipFixture99(s),[ref \in {traversal} |-> [tag |-> "WouldPeriodMembership",openingId |-> s.context.id,context |-> WouldContextKey99(s.context.currentRef), period |-> traversal,procedureId |-> 4200,frame |-> s.world.traversalControl.traversal]]) IN ~ActualWouldMembership99(opening,s.world,forced) TraversalPeriodOrdinalChecks99 == LET f == TraversalPeriodFrameFixture99 pre == TraversalPeriodEntryFixture99(1,f.pre) begun == TraversalPeriodEntryFixture99(2,f.begun.traversal) ending == TraversalPeriodEntryFixture99(3,f.ending) complete == TraversalPeriodEntryFixture99(4,f.complete.traversal) h1 == RuleWouldAfterFixture99(NewWouldAccounting99,pre.context,pre.world,<<1>>,pre.receipt) h2 == RuleWouldAfterFixture99(h1,begun.context,begun.world,<<1>>,begun.receipt) h3 == RuleWouldAfterFixture99(h2,ending.context,ending.world,<<1>>,ending.receipt) h4 == RuleWouldAfterFixture99(h3,complete.context,complete.world,<<1>>,complete.receipt) criterion == [kind |-> "Damage",subtype |-> "HarmClassA",actor |-> "SideA",minimumPresent |-> TRUE,minimum |-> 1,targetSitePresent |-> TRUE,targetSite |-> "SchemaAtom082"] period == TimingRef9("SchemaAtom138",6100) clause == [mode |-> "WouldTrigger",pattern |-> [kind |-> "Damage",damageType |-> "HarmClassA",actor |-> "SideA",targetSite |-> "SchemaAtom082",minValue |-> 1], ordinal |-> 1,period |-> period,criterion |-> criterion] IN /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,h1,pre.context,pre.origin,pre.world,<<1>>,pre.receipt) /\ ObserveCurrentExpectedWould99(h1,h2,begun.context,begun.origin,begun.world,<<1>>,begun.receipt) /\ ObserveCurrentExpectedWould99(h2,h3,ending.context,ending.origin,ending.world,<<1>>,ending.receipt) /\ ObserveCurrentExpectedWould99(h3,h4,complete.context,complete.origin,complete.world,<<1>>,complete.receipt) /\ <>= <<0,1,2,2>> /\ WouldOrdinalCountCurrent99(h4,TimingRef9("Turn",pre.world.turn.id),criterion)=4 /\ WouldOrdinalCountCurrent99(h4,TimingRef9("StatedPeriod",6200),criterion)=4 /\ ~CapabilityRelevant99(clause,pre.context.state.effects[1],pre.context,pre.world,h1) /\ CapabilityRelevant99(clause,begun.context.state.effects[1],begun.context,begun.world,h2) /\ ~CapabilityRelevant99(clause,ending.context.state.effects[1],ending.context,ending.world,h3) /\ CapabilityRelevant99([clause EXCEPT !.ordinal=0],ending.context.state.effects[1],ending.context,ending.world,h3) /\ ~CapabilityRelevant99([clause EXCEPT !.ordinal=0],complete.context.state.effects[1],complete.context,complete.world,h4) /\ WouldOrdinalCountCurrent99(h4,TimingRef9("SchemaAtom138",6101),criterion)=0 TraversalWouldPeriodChecks99 == /\ TraversalPeriodBoundaryChecks99 /\ TraversalPeriodOrdinalChecks99 ProcessCardFixture99(zone) == ReplacementOverlay99(CardObject9("Specimen0185",zone,FALSE,IF zone="SideBHand" THEN "Down" ELSE "Up"), [playCost |-> 0,playX |-> FALSE,subtypes |-> {}]) ProcessSourceTextFixture99 == LET syntax == SyntaxFixture93(9930,"Play","SideB","Action",<>) d == [syntax |-> syntax,activity |-> AbilityDefinition9(9930,"Play",syntax.source,"Printed"),instructions |-> <<9901>>, optionalParts |-> {},partsByInstruction |-> [id \in {9901} |-> {1}]] IN [tag |-> "NormalizedPrintedAbilities",playId |-> 9700,object |-> 1,card |-> "Specimen0185", sourceSHA |-> CardFacts9["Specimen0185"].sourceSHA,order |-> <<9930>>,definitions |-> [id \in {9930} |-> d]] ProcessSpecimen0133ObservationFixture99(f,turn) == [tag |-> "CompiledPriorRestrictionObservation",id |-> 9920,card |-> "Specimen0133",sourceSHA |-> CardFacts9["Specimen0133"].sourceSHA, cardKind |-> "Barrier",abilityKind |-> "BarrierInstruction",source |-> f.returned.ability.source,procedure |-> f.returned, instruction |-> InstructionWindowRef93(f.completePlan),restriction |-> "SideBCannotDrawCards", scope |-> [kind |-> "RemainderOfTurn",turnId |-> turn.id],affected |-> "SideB"] ProcessSpecimen0133ObservationBound99(observation,f,turn) == /\ observation.tag="CompiledPriorRestrictionObservation" /\ observation.id \in Nat \ {0} /\ observation.card="Specimen0133" /\ observation.sourceSHA=CardFacts9["Specimen0133"].sourceSHA /\ observation.cardKind="Barrier" /\ observation.abilityKind="BarrierInstruction" /\ CardFacts9["Specimen0133"].kind="Barrier" /\ CardFacts9["Specimen0133"].side="SideA" /\ observation.procedure=f.returned /\ BarrierInstructionBarrierInstructionBound98(f.returned) /\ f.returned.phase="Returned" /\ f.returned.ability.returned /\ f.returned.ability.complete /\ observation.source=f.returned.ability.source /\ f.start.objects[f.returned.barrierCard].card="Specimen0133" /\ observation.instruction=InstructionWindowRef93(f.completePlan) /\ f.completePlan.phase="Complete" /\ f.completePlan.steps= <<"SideBCannotDrawCardsForRemainderTurn">> /\ observation.restriction="SideBCannotDrawCards" /\ observation.affected="SideB" /\ observation.scope=[kind |-> "RemainderOfTurn",turnId |-> turn.id] ProcessSpecimen0133Active99(observation,turn) == observation.scope.kind="RemainderOfTurn" /\ observation.scope.turnId=turn.id /\ ~turn.formalEnded ProcessStartFixture99(Specimen0133) == LET turn == TurnFixture92("SideB") lockStart == SubStartFixture98("Specimen0133",<<"SideBCannotDrawCardsForRemainderTurn">>,<<>>) lockSingle == SubSingleFixture98(lockStart,lockStart.p,lockStart.selected,"SideBCannotDrawCardsForRemainderTurn",SubSeedFixture98(lockStart.objects),1) action == ReadyFixture92(WindowFixture92(600,"NeutralValue00001",TurnSiteFixture92("SideB","ProcedureCode484be3e50aa9",1),Empty9,0,NoTimingRef9)) option == [SyntheticOption92(9970,"NeutralValue00001","SideB") EXCEPT !.target=10,!.source=RuleAbilitySource9("SideBBasicPlay")] busy == StartedFixture92(action,option) objects == ReplacementOverlay99(lockStart.objects,[id \in {10} |-> ProcessCardFixture99("SideBHand")]) played == ReplacementOverlay99([id \in DOMAIN objects \ {10} |-> objects[id]],[id \in {1} |-> PlayedPlacementRow8(objects[10],TRUE)]) start == OpenPlay8(9700,10,"SideB",600) b == [start EXCEPT !.object=1,!.stage="ProcedureCode0f076861472c",!.kind="Action",!.subtypes={}] transaction == [id |-> 9701,procedureId |-> 9700,object |-> 1,allPaid |-> TRUE,basePart |-> PlayInherentPart8(played[1],0), playCostIgnored |-> FALSE,paidSomething |-> TRUE,checkpointRequired |-> TRUE] cost == [b EXCEPT !.stage="CostBarrier",!.transaction=9701,!.checkpointRequired=TRUE] c == [cost EXCEPT !.stage="ProcedureCodecbf6b11f0ae0"] d == [c EXCEPT !.stage="ProcedureCode7647b901fcb1",!.activationReached=TRUE] e == [d EXCEPT !.stage="ProcedureCodebddd9a1a600b"] f == [e EXCEPT !.stage="ProcedureCode3d7f756d78f7"] text == ProcessSourceTextFixture99 initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,played) EXCEPT !.usedObjects=DOMAIN objects \cup {1}] seed == NewConditionalLedger96(initial) cp1 == PlayEmptyCheckpointFixture97(seed,1,Empty9,played,FALSE,0,[kind |-> "PlayCost",playId |-> 9700,transactionId |-> 9701]) costLedger == ConditionalCommittedFixture96(seed,Empty9,cp1,Empty9,Empty9,Empty9) cp2 == PlayEmptyCheckpointFixture97(costLedger,2,Empty9,played,TRUE,0,PlayActivationCaller97(e)) ledger == ConditionalCommittedFixture96(costLedger,Empty9,cp2,Empty9,Empty9,Empty9) invocation == [tag |-> "PlayInvocation",playId |-> 9700,object |-> 1,caller |-> 600,transactionId |-> 9701,origin |-> "NeutralValue00001", owner |-> [windowId |-> 600,option |-> busy.busy,transaction |-> busy.busyTransaction]] cohort == NewPlayCohort97(f,text,invocation) definition == text.definitions[9930] plan == OpenInstruction93(9901,"Ability",9940,ObjectAbilitySource9(1),"Play",1,"NoValue",<<"Gain2ResourceUnitsAndDraw1Card">>,FALSE) afterPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] afterAbility == [OpenAbilityResolution9(9940,"Play",ObjectAbilitySource9(1),"Play",<<9901>>,9700) EXCEPT !.phase="Imminent",!.firstImminent=TRUE] imminent == [cohort EXCEPT !.id=9940,!.ability=afterAbility,!.phase="Imminent",!.usedInstances={9940}] observation == ProcessSpecimen0133ObservationFixture99(lockSingle,turn) observations == IF Specimen0133 THEN [id \in {observation.id} |-> observation] ELSE Empty9 snapshot == [SnapshotWithConditionalRegistry96(ledger.lastSnapshot,ledger) EXCEPT !.id=21,!.present={9930}] entry == [tag |-> "ActualInstructionEntry",id |-> 9950,snapshotId |-> 21,kind |-> "PlayFirst",beforePlan |-> plan,afterPlan |-> afterPlan, before |-> cohort,after |-> imminent,play |-> f,stackBefore |-> <>,stackAfter |-> <>,owner |-> cohort.owner, present |-> {9930},activity |-> ActivityContext9,points |-> [p \in SetupPlayers |-> 0],instance |-> 9940,usedInstances |-> {}, targets |-> [InstructionTargetsFixture93(plan) EXCEPT !.targets={}],receipt |-> InstructionEntryFixture93(plan), restrictions |-> [tag |-> "AbilityRestrictions",ability |-> 9930,source |-> ObjectAbilitySource9(1),results |-> Empty9]] world == [tag |-> "CurrentInterruptWorld",id |-> 21,turn |-> turn,traversalControl |-> [traversal |-> NoTraversal6],objects |-> played, controllers |-> [id \in DOMAIN played |-> played[id].side],activePeriods |-> Empty9,conditional |-> snapshot, paidDefinitions |-> Empty9,lexemes |-> Empty9,capabilities |-> Empty9,paidContexts |-> Empty9,turnUses |-> Empty9, entries |-> [id \in {9950} |-> entry],ruleInvocations |-> Empty9,restrictionObservations |-> observations, replacementDefinitions |-> Empty9,liveReplacementIds |-> {}] origin == [kind |-> "Instruction",plan |-> afterPlan,parent |-> afterAbility,ruleStep |-> "NoValue"] effects == [id \in {1,2} |-> [id |-> id,lineage |-> id,kind |-> IF id=1 THEN "GainResourceUnits" ELSE "Draw", value |-> IF id=1 THEN 2 ELSE 1,actor |-> "SideB",targetSite |-> "NoValue",baseController |-> "SideB",baseOrigin |-> ObjectAbilitySource9(1), targeted |-> FALSE,targetCard |-> 0,preventable |-> TRUE]] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> ObjectAbilitySource9(1),snapshotId |-> 21, effects |-> effects,order |-> <<1,2>>,card |-> "Specimen0185",sourceSHA |-> text.sourceSHA,definition |-> definition, instructionText |-> "SyntheticText1328c2095018"] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> 21, forbiddenIds |-> IF Specimen0133 THEN {2} ELSE {},values |-> Empty9,restrictionOrigins |-> observations] expected == [id \in IF Specimen0133 THEN {1} ELSE {1,2} |-> effects[id]] context == NewExpectedContext99(9960,9950,origin,world,description,expected,cohort.owner) registry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {9960} |-> context],!.entryIds={9950},!.usedContextIds={9960}] IN [Specimen0133 |-> Specimen0133,turn |-> turn,lockStart |-> lockStart,lockSingle |-> lockSingle,observation |-> observation,observations |-> observations, action |-> action,option |-> option,busy |-> busy,objects |-> objects,played |-> played,start |-> start,b |-> b,transaction |-> transaction, cost |-> cost,c |-> c,d |-> d,e |-> e,f |-> f,text |-> text,seed |-> seed,cp1 |-> cp1,costLedger |-> costLedger,cp2 |-> cp2,ledger |-> ledger, invocation |-> invocation,cohort |-> cohort,plan |-> plan,afterPlan |-> afterPlan,imminent |-> imminent,entry |-> entry,world |-> world,origin |-> origin, description |-> description,projection |-> projection,expected |-> expected,context |-> context,registry |-> registry] ProcessStartValid99(s) == /\ BeginPriorityOption9(<>,<>,s.option,s.objects,LegalityFixture92(s.action,s.option),Empty9) /\ BeginPlay8(s.start,s.b,s.objects,s.played,1,DOMAIN s.objects,TRUE) /\ PayPlayStep8(s.b,s.cost,s.played,s.transaction,FALSE,0,TRUE) /\ ProcessConditionalCheckpoint96(s.seed,s.costLedger,<>,<>,Empty9,s.cp1,Empty9,Empty9,Empty9,Empty9,Empty9,{600}) /\ DrainPlayCostBarrier8(s.cost,s.c,9701,1,TRUE) /\ ActivatePlayedCard8(s.c,s.d) /\ MeetPlayedConditions8(s.d,s.e,{PlayedCondition8(s.d)}) /\ ProcessConditionalCheckpoint96(s.costLedger,s.ledger,<>,<>,Empty9,s.cp2,Empty9,Empty9,Empty9,Empty9,Empty9,{600}) /\ EnterPlayCohort97(s.e,s.f,s.cohort,s.played,s.text,s.invocation,s.ledger,<>,2,CardFacts9) /\ ActualImminenceEntry99(s.entry,s.origin,s.world,CardFacts9) /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,9960,s.origin,s.world,s.entry,s.description,s.projection,s.expected,s.cohort.owner,CardFacts9,NewWouldAccounting99,InitialHistoryFixture99(s.context),InitialWouldObservation99(s.context,s.context.id)) /\ IF s.Specimen0133 THEN /\ SubStartValid98(s.lockStart) /\ SubSingleValid98(s.lockSingle) /\ ProcessSpecimen0133ObservationBound99(s.observation,s.lockSingle,s.turn) /\ ProcessSpecimen0133Active99(s.observation,s.turn) /\ s.world.restrictionObservations=s.projection.restrictionOrigins /\ s.projection.forbiddenIds={2} ELSE s.world.restrictionObservations=Empty9 /\ s.projection.forbiddenIds={} Specimen0185Checks99 == LET ordinary == ProcessStartFixture99(FALSE) restricted == ProcessStartFixture99(TRUE) IN /\ CardFacts9["Specimen0185"].kind="Action" /\ CardFacts9["Specimen0185"].side="SideB" /\ ProcessStartValid99(ordinary) /\ ProcessStartValid99(restricted) /\ ordinary.cohort.order= <<9930>> /\ ordinary.plan.steps=restricted.plan.steps /\ DOMAIN ordinary.context.initialEffects={1,2} /\ DOMAIN restricted.context.initialEffects={1} /\ ordinary.expected[1]=restricted.expected[1] /\ restricted.expected[1].value=2 /\ ordinary.expected[2].kind="Draw" /\ ordinary.expected[2].value=1 /\ restricted.context.description.effects[2]=ordinary.context.description.effects[2] /\ ~InitialExpectedProjection99(restricted.origin,restricted.world,restricted.description,restricted.projection,ordinary.expected) /\ ~InitialExpectedProjection99(ordinary.origin,ordinary.world,ordinary.description,ordinary.projection,restricted.expected) /\ ~InitialExpectedProjection99(restricted.origin,restricted.world,restricted.description,[restricted.projection EXCEPT !.snapshotId=20],restricted.expected) /\ ~InitialExpectedProjection99(ordinary.origin,ordinary.world,ordinary.description,[ordinary.projection EXCEPT !.forbiddenIds={3}],ordinary.expected) /\ ~InitialExpectedProjection99(restricted.origin,restricted.world,restricted.description, [restricted.projection EXCEPT !.description.sourceSHA=CardFacts9["Specimen0133"].sourceSHA],restricted.expected) /\ LET foreign == [restricted.description EXCEPT !.source=ObjectAbilitySource9(2)] IN ~InitialExpectedProjection99(restricted.origin,restricted.world,foreign,[restricted.projection EXCEPT !.description=foreign],restricted.expected) /\ LET bad == [restricted.text EXCEPT !.sourceSHA=CardFacts9["Specimen0133"].sourceSHA] badCohort == NewPlayCohort97(restricted.f,bad,restricted.invocation) IN ~EnterPlayCohort97(restricted.e,restricted.f,badCohort,restricted.played,bad,restricted.invocation,restricted.ledger,<>,2,CardFacts9) /\ LET badContext == NewExpectedContext99(9960,9950,restricted.origin,restricted.world,restricted.description,ordinary.expected,restricted.cohort.owner) badRegistry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {9960} |-> badContext],!.entryIds={9950},!.usedContextIds={9960}] IN ~BeginExpectedContext99(NewExpectedRegistry99,badRegistry,9960,restricted.origin,restricted.world,restricted.entry, restricted.description,restricted.projection,ordinary.expected,restricted.cohort.owner,CardFacts9,NewWouldAccounting99,InitialHistoryFixture99(badContext),InitialWouldObservation99(badContext,badContext.id)) /\ LET badEntry == [restricted.entry EXCEPT !.receipt.sourceEligible=FALSE] badWorld == [restricted.world EXCEPT !.entries[9950]=badEntry] badContext == NewExpectedContext99(9960,9950,restricted.origin,badWorld,restricted.description,restricted.expected,restricted.cohort.owner) badRegistry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {9960} |-> badContext],!.entryIds={9950},!.usedContextIds={9960}] IN ~BeginExpectedContext99(NewExpectedRegistry99,badRegistry,9960,restricted.origin,badWorld,badEntry, restricted.description,restricted.projection,restricted.expected,restricted.cohort.owner,CardFacts9,NewWouldAccounting99,InitialHistoryFixture99(badContext),InitialWouldObservation99(badContext,badContext.id)) /\ ~ProcessSpecimen0133ObservationBound99([restricted.observation EXCEPT !.abilityKind="Static"],restricted.lockSingle,restricted.turn) /\ ~ProcessSpecimen0133ObservationBound99([restricted.observation EXCEPT !.source=ObjectAbilitySource9(1)],restricted.lockSingle,restricted.turn) /\ ~ProcessSpecimen0133ObservationBound99([restricted.observation EXCEPT !.sourceSHA=CardFacts9["Specimen0185"].sourceSHA],restricted.lockSingle,restricted.turn) /\ ~ProcessSpecimen0133Active99(restricted.observation,[restricted.turn EXCEPT !.id=2]) InitialOccurrenceGroupsChecks99 == LET s == StaticProjectionFixture99 one == [s.description.effects[1] EXCEPT !.value=1] two == [one EXCEPT !.id=2,!.lineage=2,!.damageType="PersistentCapacityHarm"] effects == [id \in {1,2} |-> IF id=1 THEN one ELSE two] criterion == [alternatives |-> {RelevanceCriterion99("Damage","HarmClassA","SideA",0,FALSE,"NoValue",FALSE), RelevanceCriterion99("Damage","PersistentCapacityHarm","SideA",0,FALSE,"NoValue",FALSE)}] period == TimingRef9("Turn",s.world.turn.id) IN /\ \A shared \in BOOLEAN : LET description == ReplacementOverlay99([s.description EXCEPT !.effects=effects],[occurrenceGroups |-> [id \in {1,2} |-> IF shared THEN 71 ELSE 70+id]]) projection == [s.projection EXCEPT !.description=description,!.forbiddenIds={},!.values=Empty9] context == NewExpectedContext99(4500,s.entry.id,s.origin,s.world,description,effects,s.entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={s.entry.id},!.usedContextIds={context.id},!.contexts=[id \in {context.id} |-> context]] receipt == RuleWouldReceiptFixture99(6400,context,s.world,<<1,2>>) history == RuleWouldAfterFixture99(NewWouldAccounting99,context,s.world,<<1,2>>,receipt) IN /\ BeginExpectedContext99(NewExpectedRegistry99,registry,4500,s.origin,s.world,s.entry,description,projection,effects,s.entry.owner,CardFacts9,NewWouldAccounting99,history,receipt) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,history,context,s.origin,s.world,<<1,2>>,receipt) /\ WouldOrdinalCountCurrent99(history,period,criterion)=IF shared THEN 1 ELSE 2 /\ context.wouldGroups[1]= <> /\ context.wouldGroups[2]= <> /\ DOMAIN context.state.ancestry={1,2} /\ context.state.effects[1].lineage # context.state.effects[2].lineage /\ LET wrong == [description EXCEPT !.occurrenceGroups=[id \in {1} |-> 71]] IN ~InitialExpectedProjection99(s.origin,s.world,wrong,[projection EXCEPT !.description=wrong],effects) /\ LET wrong == [description EXCEPT !.occurrenceGroups[2]=0] IN ~InitialExpectedProjection99(s.origin,s.world,wrong,[projection EXCEPT !.description=wrong],effects) OperandReturnFixture99(mode,pattern,parentFields,missing) == LET q == FullSpecimen0070CallbackFixture99 patch == [id |-> 6100,source |-> RuleAbilitySource9("StructuralParentDescriptorRewrite99"),sourceSHA |-> "StructuralRule99", pattern |-> [kind |-> "ExposureMarkers"],behavior |-> [mode |-> "Patch",fields |-> parentFields]] rs == [id \in {6100} |-> patch] decision == ReplacementDecision99(q.parent.state,401,rs,q.world,6100,<<401>>) patched == ReplacementNextState99(q.parent.state,401,rs,6100,<<401>>,decision) parentState == IF missing THEN [patched EXCEPT !.effects=Empty9,!.ancestry=Empty9] ELSE patched parentOrigin == [q.parentOrigin EXCEPT !.plan.revision=2] parent == [q.parent EXCEPT !.state=parentState,!.currentRef=OriginReference99(parentOrigin), !.templates=ReplacementOverlay99(@,parentState.effects),!.ancestryArchive=ReplacementOverlay99(@,parentState.ancestry)] ownR == [id |-> 6200,source |-> RuleAbilitySource9("StructuralOwnOperationRewrite99"),sourceSHA |-> "StructuralRule99", pattern |-> [kind |-> "PreventAmount"],behavior |-> [mode |-> "Patch",fields |-> [kind |-> mode,pattern |-> pattern]]] ownRs == [id \in {6200} |-> ownR] ownDecision == ReplacementDecision99(q.atomic.state,51,ownRs,q.world,6200,<<51>>) ownState == ReplacementNextState99(q.atomic.state,51,ownRs,6200,<<51>>,ownDecision) operation == ownState.effects[51] plan == [q.call.beforePlan EXCEPT !.revision=1] modifier == [q.atomic EXCEPT !.currentRef=InstructionWindowRef93(plan),!.openingRef=InstructionWindowRef93([plan EXCEPT !.phase="Imminent"]), !.state=ownState,!.actualEffects=ActualExpectedEffects99(ownState.effects),!.preparedEffects=ownState.effects, !.templates=ReplacementOverlay99(@,ownState.effects),!.ancestryArchive=ReplacementOverlay99(@,ownState.ancestry), !.clearance.revision=1,!.clearance.openingRevision=1] actualReturn == [q.actualReturn EXCEPT !.instruction=modifier.currentRef,!.effects=modifier.actualEffects] call == [q.call EXCEPT !.beforePlan=plan,!.afterPlan.revision=1,!.step.expectedControl=operation,!.step.expectedReturn=actualReturn] IN [q |-> q,patch |-> patch,replacements |-> rs,decision |-> decision,patched |-> patched,parent |-> parent,parentOrigin |-> parentOrigin, ownReplacements |-> ownRs,ownDecision |-> ownDecision,ownState |-> ownState,operation |-> operation,modifier |-> modifier,call |-> call, actualReturn |-> actualReturn,returned |-> [modifier EXCEPT !.phase="Returned"]] OperandReturnAfter99(f,effects) == LET origin == [f.parentOrigin EXCEPT !.plan.revision=3] IN [f.parent EXCEPT !.currentRef=OriginReference99(origin),!.state.effects=effects, !.state.ancestry=[id \in DOMAIN effects |-> f.parent.state.ancestry[id]],!.ancestryArchive=ReplacementOverlay99(@,f.parent.state.ancestry), !.removedEffects=@ \cup (DOMAIN f.parent.state.effects \ DOMAIN effects),!.modificationIds=@ \cup {f.operation.operationId}, !.modifications=Append(@,[kind |-> f.operation.kind,operation |-> f.operation,modifier |-> f.modifier.currentRef, beforeEffects |-> f.parent.state.effects,afterEffects |-> effects,from |-> f.parent.currentRef,to |-> OriginReference99(origin)])] OperandReturnValid99(f,effects) == LET after == OperandReturnAfter99(f,effects) origin == [f.parentOrigin EXCEPT !.plan.revision=3] resolved == ResolvedControlReceipt99(f.parent,after,f.modifier,f.call.before,f.operation) IN /\ FullSpecimen0070CallbackValid99(f.q) /\ ApplyReplacementStep99(f.q.parent.state,f.patched,401,f.replacements,f.q.world,f.decision) /\ ApplyReplacementStep99(f.q.atomic.state,f.ownState,51,f.ownReplacements,f.q.world,f.ownDecision) /\ ReplacementStateValid99(f.parent.state) /\ ReplacementStateValid99(f.modifier.state) /\ ResolvePaidInterruptAndReturn99(f.parent,after,f.parentOrigin,origin,f.modifier,f.returned,f.q.world,f.q.selected,f.call, f.operation,effects,resolved,f.actualReturn,CardFacts9) OperandReturnMismatchChecks99 == LET wrongKind == OperandReturnFixture99("PreventAmount",[kind |-> "ExposureMarkers"],[kind |-> "Damage",damageType |-> "HarmClassB"],FALSE) wrongSubtype == OperandReturnFixture99("PreventAmount",[kind |-> "Damage",damageType |-> "HarmClassA"],[kind |-> "Damage",damageType |-> "HarmClassB"],FALSE) unpreventable == OperandReturnFixture99("PreventAmount",[kind |-> "ExposureMarkers"],[preventable |-> FALSE],FALSE) absent == OperandReturnFixture99("PreventAmount",[kind |-> "ExposureMarkers"],Empty9,TRUE) IN /\ \A f \in {wrongKind,wrongSubtype,unpreventable,absent} : /\ ~ExpectedControlApplies99(f.parent.state.effects,f.operation) /\ OperandReturnValid99(f,f.parent.state.effects) /\ IF DOMAIN f.parent.state.effects={} THEN TRUE ELSE ~OperandReturnValid99(f,[f.parent.state.effects EXCEPT ![401].value=@-1]) /\ wrongKind.parent.state.effects[401].id=wrongKind.q.parent.state.effects[401].id /\ wrongKind.parent.state.effects[401].kind="Damage" /\ wrongKind.operation.pattern.kind="ExposureMarkers" OperandReturnIntrinsicChecks99 == LET low == OperandReturnFixture99("ExampleFamily091HarmClassAToOne",[kind |-> "Damage",damageType |-> "HarmClassA"],[kind |-> "Damage",damageType |-> "HarmClassA",value |-> 1],FALSE) zero == OperandReturnFixture99("ExampleFamily091HarmClassAToOne",[kind |-> "Damage",damageType |-> "HarmClassA"],[kind |-> "Damage",damageType |-> "HarmClassA",value |-> 0],FALSE) protected == OperandReturnFixture99("PreventWhole",[kind |-> "Damage",damageType |-> "HarmClassA"],[kind |-> "Damage",damageType |-> "HarmClassA",preventable |-> FALSE],FALSE) IN /\ \A f \in {low,zero,protected} : /\ ~ExpectedControlApplies99(f.parent.state.effects,f.operation) /\ OperandReturnValid99(f,f.parent.state.effects) /\ ~OperandReturnValid99(protected,Empty9) OperandReturnChangedOwnInstructionChecks99 == LET damage == OperandReturnFixture99("PreventAmount",[kind |-> "Damage",damageType |-> "HarmClassB"],[kind |-> "Damage",damageType |-> "HarmClassB"],FALSE) bmn == OperandReturnFixture99("ExampleFamily091HarmClassAToOne",[kind |-> "Damage",damageType |-> "HarmClassA"],[kind |-> "Damage",damageType |-> "HarmClassA",value |-> 3],FALSE) whole == OperandReturnFixture99("PreventWhole",[kind |-> "Damage",damageType |-> "HarmClassA"],[kind |-> "Damage",damageType |-> "HarmClassA"],FALSE) IN /\ damage.q.operation.pattern.kind="ExposureMarkers" /\ damage.operation.pattern.kind="Damage" /\ damage.modifier.actualEffects[51]=damage.operation /\ ExpectedControlApplies99(damage.parent.state.effects,damage.operation) /\ OperandReturnValid99(damage,[damage.parent.state.effects EXCEPT ![401].value=1]) /\ OperandReturnValid99(bmn,[bmn.parent.state.effects EXCEPT ![401].value=1]) /\ OperandReturnValid99(whole,Empty9) InitialCaptureAtomicChecks99 == LET s == RuleEmptyRouteFixture99 before == NewWouldAccounting99 omitted == before IN /\ RuleEmptyRouteValid99(s) /\ BeginExpectedContext99(NewExpectedRegistry99,s.beforeRegistry,4500,s.base.origin,s.world,s.base.entry, s.base.description,s.base.projection,s.base.initial,s.base.entry.owner,CardFacts9,before,s.history0,s.receipt0) /\ InitialWouldCaptured99(s.before,s.history0) /\ ~BeginExpectedContext99(NewExpectedRegistry99,s.beforeRegistry,4500,s.base.origin,s.world,s.base.entry, s.base.description,s.base.projection,s.base.initial,s.base.entry.owner,CardFacts9,before,omitted,s.receipt0) /\ s.history0.observations[s.receipt0.id]=s.receipt0 /\ InitialWouldCaptured99(s.finished,s.history1) /\ s.history1.latest[s.before.id].effects=Empty9 /\ s.history1.observations[s.receipt0.id].effects=s.before.initialEffects /\ s.history1.observations[s.receipt0.id].reference=s.before.initialRef InitialCaptureOmissionTrace99(s) == LET absent == NewWouldAccounting99 late == RuleWouldAfterFixture99(absent,s.replaced,s.world,<<>>,s.receipt1) IN /\ BeginExpectedContext99(NewExpectedRegistry99,s.beforeRegistry,4500,s.base.origin,s.world,s.base.entry, s.base.description,s.base.projection,s.base.initial,s.base.entry.owner,CardFacts9,absent,absent,s.receipt0) /\ ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,s.world,s.states,s.steps,CardFacts9,absent) /\ ObserveCurrentExpectedWould99(absent,late,s.replaced,s.origin1,s.world,<<>>,s.receipt1) /\ PrepareOpeningInterrupts99(s.replaced,s.prepared,s.ledger,s.ledger,s.origin1,s.world,late,4900,49,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(s.prepared,s.noWindow,s.origin1,s.world,late,s.ledger,<<>>,s.site,CardFacts9) /\ ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin1,s.world,late,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ BeginClearedRuleInstruction99(s.cleared,s.atomic,s.origin1,s.atomicOrigin,s.world,<<>>,s.clearance,s.atomicPlan) /\ FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,s.actualReturn,s.step,s.finishedPlan) InitialCaptureOmissionChecks99 == LET s == RuleEmptyRouteFixture99 absent == NewWouldAccounting99 late == RuleWouldAfterFixture99(absent,s.replaced,s.world,<<>>,s.receipt1) net == RelevanceCriterion99("Damage","HarmClassA","SideA",1,TRUE,"NoValue",FALSE) IN /\ RuleEmptyRouteValid99(s) /\ ~InitialCaptureOmissionTrace99(s) /\ ~ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,s.world,s.states,s.steps,CardFacts9,absent) /\ ObserveCurrentExpectedWould99(absent,late,s.replaced,s.origin1,s.world,<<>>,s.receipt1) /\ WouldViewCurrent99(late,s.replaced,s.world) /\ ~InitialWouldCaptured99(s.replaced,late) /\ WouldOrdinalCountCurrent99(late,TimingRef9("Turn",s.world.turn.id),net)=0 /\ ~PrepareOpeningInterrupts99(s.replaced,s.prepared,s.ledger,s.ledger,s.origin1,s.world,late,4900,49,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(s.prepared,s.noWindow,s.origin1,s.world,late,s.ledger,<<>>,s.site,CardFacts9) /\ ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin1,s.world,late,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ BeginClearedRuleInstruction99(s.cleared,s.atomic,s.origin1,s.atomicOrigin,s.world,<<>>,s.clearance,s.atomicPlan) /\ FinishExpectedRuleInstruction99(s.atomic,s.finished,s.atomicOrigin,s.finishedOrigin,s.world,Empty9,s.actualReturn,s.step,s.finishedPlan) InitialCaptureRefreshChecks99 == LET s == StaticProjectionFixture99 origin == [s.origin EXCEPT !.plan.revision=1] projection == StaticRefreshReceiptFixture99(s.context,s.world,Empty9) after == StaticRefreshAfterFixture99(s.context,origin,s.world,Empty9) history == InitialHistoryFixture99(s.context) IN /\ InitialWouldCaptured99(s.context,history) /\ RefreshExpectedWorld99(s.context,after,s.origin,origin,s.world,projection,history) /\ ~RefreshExpectedWorld99(s.context,after,s.origin,origin,s.world,projection,NewWouldAccounting99) /\ after.state.effects=Empty9 /\ InitialWouldCaptured99(after,history) InitialCaptureEmptyChecks99 == LET s == StaticProjectionFixture99 projection == [s.projection EXCEPT !.forbiddenIds={1,2}] context == NewExpectedContext99(4500,s.entry.id,s.origin,s.world,s.description,Empty9,s.entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={s.entry.id},!.usedContextIds={4500},!.contexts=[id \in {4500} |-> context]] receipt == InitialWouldObservation99(context,6500) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,receipt) IN /\ BeginExpectedContext99(NewExpectedRegistry99,registry,4500,s.origin,s.world,s.entry,s.description,projection,Empty9,s.entry.owner,CardFacts9, NewWouldAccounting99,history,receipt) /\ InitialWouldCaptured99(context,history) /\ history.evidence= <<>> /\ history.serial=0 /\ history.observations[receipt.id].effects=Empty9 /\ history.latest[4500]=receipt /\ ~BeginExpectedContext99(NewExpectedRegistry99,registry,4500,s.origin,s.world,s.entry,s.description,projection,Empty9,s.entry.owner,CardFacts9, NewWouldAccounting99,NewWouldAccounting99,receipt) InitialCaptureNestedFixture99 == LET s == StaticProjectionFixture99 parentReceipt == InitialWouldObservation99(s.context,6510) parentHistory == InitialCaptureAfterFixture99(NewWouldAccounting99,s.context,parentReceipt) plan == [s.entry.beforePlan EXCEPT !.id=4101] imminent == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] structure == [s.entry.sourceProcedure EXCEPT !.id=4201] entry == [s.entry EXCEPT !.id=4301,!.beforePlan=plan,!.afterPlan=imminent,!.targets.instruction=4101, !.ruleInvocation=4401,!.sourceProcedure=structure] invocation == [s.world.ruleInvocations[4400] EXCEPT !.structure=structure] world == [s.world EXCEPT !.entries=ReplacementOverlay99(@,[id \in {4301} |-> entry]), !.ruleInvocations=ReplacementOverlay99(@,[id \in {4401} |-> invocation])] origin == [s.origin EXCEPT !.plan=imminent] description == [s.description EXCEPT !.context=OriginReference99(origin)] projection == [s.projection EXCEPT !.description=description] context == NewExpectedContext99(4501,entry.id,origin,world,description,s.initial,entry.owner) receipt == InitialWouldObservation99(context,6511) afterHistory == InitialCaptureAfterFixture99(parentHistory,context,receipt) childOnly == InitialCaptureAfterFixture99(NewWouldAccounting99,context,receipt) registry == [s.registry EXCEPT !.entryIds=@ \cup {entry.id},!.usedContextIds=@ \cup {context.id}, !.contexts=ReplacementOverlay99(@,[id \in {4501} |-> context])] IN [s |-> s,parentReceipt |-> parentReceipt,parentHistory |-> parentHistory,entry |-> entry,world |-> world,origin |-> origin, description |-> description,projection |-> projection,context |-> context,receipt |-> receipt,afterHistory |-> afterHistory,childOnly |-> childOnly,registry |-> registry] InitialCaptureNestedChronologyChecks99 == LET n == InitialCaptureNestedFixture99 s == n.s net == RelevanceCriterion99("Damage","HarmClassA","SideA",1,TRUE,"NoValue",FALSE) period == TimingRef9("Turn",s.world.turn.id) IN /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,4500,s.origin,s.world,s.entry,s.description,s.projection,s.initial,s.entry.owner,CardFacts9, NewWouldAccounting99,n.parentHistory,n.parentReceipt) /\ BeginExpectedContext99(s.registry,n.registry,4501,n.origin,n.world,n.entry,n.description,n.projection,s.initial,n.entry.owner,CardFacts9, n.parentHistory,n.afterHistory,n.receipt) /\ WouldOrdinalAtCurrent99(n.afterHistory,s.context.wouldGroups[1],period,net)=1 /\ WouldOrdinalAtCurrent99(n.afterHistory,n.context.wouldGroups[1],period,net)=2 /\ ~BeginExpectedContext99(s.registry,n.registry,4501,n.origin,n.world,n.entry,n.description,n.projection,s.initial,n.entry.owner,CardFacts9, NewWouldAccounting99,n.childOnly,n.receipt) InitialCaptureEvidenceBindingChecks99 == LET s == RuleEmptyRouteFixture99 missingRows == [s.history0 EXCEPT !.evidence= <<>>,!.serial=0] missingId == [s.history0 EXCEPT !.observationIds={}] wrongRow == [s.history0 EXCEPT !.evidence[1].descriptor.subtype="PersistentCapacityHarm"] IN /\ RuleEmptyRouteValid99(s) /\ \A history \in {missingRows,missingId,wrongRow} : /\ history.observations[s.receipt0.id]=s.receipt0 /\ ~InitialWouldCaptured99(s.before,history) /\ ~ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,s.world,s.states,s.steps,CardFacts9,history) InitialCaptureReceiptBindingChecks99 == LET s == RuleEmptyRouteFixture99 receipt == s.receipt0 IN /\ RuleEmptyRouteValid99(s) /\ \A bad \in {[receipt EXCEPT !.contextId=999],[receipt EXCEPT !.imminenceId=999],[receipt EXCEPT !.reference.revision=1], [receipt EXCEPT !.snapshotId=999],[receipt EXCEPT !.effects=Empty9],[receipt EXCEPT !.groups=Empty9], [receipt EXCEPT !.periods={}],[receipt EXCEPT !.order= <<>>]} : LET history == [s.history0 EXCEPT !.observations[receipt.id]=bad] IN /\ ~InitialWouldCaptured99(s.before,history) /\ ~ApplyAutomaticReplacements99(s.before,s.replaced,s.base.origin,s.origin1,s.world,s.states,s.steps,CardFacts9,history) RecognitionReplayChecks99 == LET s == RelevanceOpeningFixture99("ExampleFamily068") allocation == [key \in DOMAIN s.allocation |-> 6003] again == RelevancePreparedFixture99(s.before,s.prepared.ledger,s.postWorld,allocation,4901,50) IN /\ RelevanceOpeningValid99(s) /\ s.before.phase="Replacing" /\ InitialWouldCaptured99(s.before,s.history) /\ CurrentInterruptWorld99(s.postWorld,s.prepared.ledger,CardFacts9) /\ 6003 \notin DOMAIN s.prepared.ledger.instances /\ DOMAIN again.ledger.instances=DOMAIN s.prepared.ledger.instances \cup {6003} /\ \A id \in DOMAIN s.prepared.ledger.instances : again.ledger.instances[id]=s.prepared.ledger.instances[id] /\ again.context.windowId=4901 /\ again.context.group=50 /\ ~PrepareOpeningInterrupts99(s.before,again.context,s.prepared.ledger,again.ledger,s.base.origin, s.postWorld,s.history,4901,50,allocation,{4900},CardFacts9) CompletedEntryReplayChecks99 == LET s == RuleEmptyRouteFixture99 old == [s.beforeRegistry EXCEPT !.contexts[4500]=s.finished] context == NewExpectedContext99(4501,s.base.entry.id,s.base.origin,s.world,s.base.description,s.base.initial,s.base.entry.owner) after == [old EXCEPT !.usedContextIds=@ \cup {4501},!.contexts=ReplacementOverlay99(@,[id \in {4501} |-> context])] observation == InitialWouldObservation99(context,4802) afterWould == InitialCaptureAfterFixture99(s.history1,context,observation) IN /\ RuleEmptyRouteValid99(s) /\ old.contexts[4500].phase="Returned" /\ InitialWouldCaptured99(old.contexts[4500],s.history1) /\ s.base.entry.id \in old.entryIds /\ 4501 \notin old.usedContextIds /\ observation.id \notin s.history1.observationIds /\ InitialWouldCaptured99(context,afterWould) /\ after.contexts[4500]=s.finished /\ after.contexts[4501]=context /\ ~BeginExpectedContext99(old,after,4501,s.base.origin,s.world,s.base.entry,s.base.description, s.base.projection,s.base.initial,s.base.entry.owner,CardFacts9,s.history1,afterWould,observation) R3ReplayChecks99 == /\ RecognitionReplayChecks99 /\ CompletedEntryReplayChecks99 InterruptReplacementChecks9 == /\ ValueSpecimen0147Checks99 /\ ValueWholePreventionChecks99 /\ ValueSpecimen0039AndSpecimen0091Checks99 /\ ValueExampleFamily091Checks99 /\ ValueExampleFamily025AndPositiveObservationChecks99 /\ ValueCostEscalatingResourceContestAndOpaqueChecks99 /\ ReplacementExampleFamily073Checks99 /\ ReplacementExampleFamily068Checks99 /\ ReplacementInspectionChecks99 /\ ReplacementLineageChecks99 /\ ReplacementControllerChecks99 /\ ReplacementSiblingAncestryChecks99 /\ ReplacementEmptyResultChecks99 /\ Specimen0100ContinuousChecks99 /\ ContinuousStaticChecks99 /\ WouldExampleFamily068HistoryChecks99 /\ WouldProfilePeriodChecks99 /\ LexicalNamedClassChecks99 /\ LexicalRoleAndBoundaryChecks99 /\ LexicalSourceBindingChecks99 /\ LexicalActualOccurrenceDeliveryChecks99 /\ LexicalImplicitReactionExclusionChecks99 /\ LexicalPaidEligibilityChecks99 /\ StaticProjectionChecks99 /\ RuleClearanceChecks99 /\ WouldAccountingStableGroupChecks99 /\ WouldAccountingFirstMatchOrderChecks99 /\ WouldAccountingThresholdChecks99 /\ WouldAccountingProfileAndPeriodsChecks99 /\ WouldAccountingGroupingPathsChecks99 /\ ExampleFamily021Checks99 /\ FullRelevanceChecks99 /\ FullExampleFamily021Checks99 /\ FullSpecimen0070RouteChecks99 /\ FullSpecimen0070CallbackBoundariesChecks99 /\ FullSpecimen0070CoherentControlChecks99 /\ FullGenericAbilityReturnChecks99 /\ FullSpecimen0070ControlExecutionChecks99 /\ FullSpecimen0070SelectedRecordChecks99 /\ FullPaidEntrySelectionChecks99 /\ FullGenericAbilityCallerBindingsChecks99 /\ FullModifierReturnReceiptProfileChecks99 /\ FullGenericReturnTagChecks99 /\ FullSpecimen0070UnpaidControlChecks99 /\ FullExampleFamily068ImmediateChecks99 /\ FullExampleFamily068InitialObservationChecks99 /\ FullExampleFamily068CoherentCreationChecks99 /\ FullExampleFamily068OperationAuthorityChecks99 /\ FullExampleFamily068ReturnCompositionChecks99 /\ FullExampleFamily068PreparedEmptyObservationChecks99 /\ FullExampleFamily068DuplicateGuardControlsChecks99 /\ FullExampleFamily021CallbackPaidChecks99 /\ FullExampleFamily021CallbackNoExampleFamily026Checks99 /\ FullPublicPaidRouteChecks99 /\ FullPublicMidItemInspectionChecks99 /\ FullExampleFamily068EntrySnapshotChecks99 /\ FullPublicNormalPositiveChecks99 /\ FullBarrierInstructionRouteChecks99 /\ FullBarrierInstructionProjectionChecks99 /\ FullBarrierInstructionCoherentProjectionChecks99 /\ FullBarrierInstructionCoherentClearanceChecks99 /\ FullBarrierInstructionWholePreventionHistoryChecks99 /\ TraversalWouldPeriodChecks99 /\ Specimen0185Checks99 /\ InitialOccurrenceGroupsChecks99 /\ OperandReturnMismatchChecks99 /\ OperandReturnIntrinsicChecks99 /\ OperandReturnChangedOwnInstructionChecks99 /\ InitialCaptureAtomicChecks99 /\ InitialCaptureOmissionChecks99 /\ InitialCaptureRefreshChecks99 /\ InitialCaptureEmptyChecks99 /\ InitialCaptureNestedChronologyChecks99 /\ InitialCaptureEvidenceBindingChecks99 /\ InitialCaptureReceiptBindingChecks99 /\ RecognitionReplayChecks99 /\ CompletedEntryReplayChecks99 /\ R3ReplayChecks99 LifetimeWorldFixture910 == LET e == [OpenEncounter6(20,2,0,TRUE,700,<<>>) EXCEPT !.stage="Paid"] IN [id |-> 1,objects |-> [id \in {1,2,3} |-> IF id=1 THEN CardObject9("Specimen0088","Play",TRUE,"Up") ELSE IF id=2 THEN [CardObject9("NeutralValue00016","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE [CardObject9("Specimen0100","Play",TRUE,"Up") EXCEPT !.host=1]], gameStarted |-> TRUE,cardFacts |-> CardFacts9,playActivated |-> {}, turn |-> OpenTurn5("SideB",10,[p \in SetupPlayers |-> 0]),turnPhase |-> [id |-> 11,ended |-> FALSE], control |-> [traversal |-> NoTraversal6,phaseEndedIds |-> {}],encounters |-> [id \in {20} |-> e],currentEncounter |-> 20, siteInspections |-> Empty9,itemInspections |-> Empty9,finishedInstances |-> {},finishedDelayedEffects |-> {},statedDurations |-> Empty9, durationComparisons |-> Empty9,extenders |-> Empty9,present |-> {},activity |-> ActivityContext9,points |-> [p \in SetupPlayers |-> 0],barrierResponseCards |-> {1}] BlueprintFixture910(kind,duration) == [kind |-> kind,source |-> ObjectAbilitySource9(1),originKind |-> "Paid",target |-> 1,value |-> 2, baseDuration |-> duration,durationMode |-> "Specified",durationClass |-> "Encounter",choiceKey |-> "ChosenBarrier",lingeringConsumers |-> {},otherConsumers |-> {}, definitionId |-> 0,whenYourTurnBegins |-> FALSE,onlyChoice |-> FALSE] LifetimeContextFixture910(source) == LET creator == DelayedCreatorFixture96(source,"Paid") IN [context |-> [id |-> 9000,imminenceId |-> 9001,currentRef |-> InstructionWindowRef93(creator.resolving),currentWorld |-> 1, phase |-> "Resolving",actualEffects |-> Empty9], origin |-> [kind |-> "Instruction",plan |-> creator.resolving,parent |-> creator.parentResolving,ruleStep |-> "NoValue"],creator |-> creator] LifetimeRegistryFixture910(blueprints,world) == LET c == LifetimeContextFixture910(ObjectAbilitySource9(1)) effects == [id \in DOMAIN blueprints |-> NewLingeringEffect910(id,blueprints[id],c.context,1,world)] IN [NewLingeringRegistry910 EXCEPT !.effects=ObserveLingeringEffects910(effects,world),!.usedEffects=DOMAIN effects, !.creations={LingeringCreationKey910(c.context,1)}] LifetimeAfterObservationFixture910(before,world) == [before EXCEPT !.effects=ObserveLingeringEffects910(@,world)] ExtensionCreationFromFixture910(source,kind,blueprints,world) == LET creator == DelayedCreatorFixture96(source,kind) c == [LifetimeContextFixture910(source) EXCEPT !.creator=creator,!.origin.plan=creator.resolving,!.origin.parent=creator.parentResolving] operation == [kind |-> "CreateLingering",blueprints |-> blueprints] context == [c.context EXCEPT !.currentWorld=world.id,!.actualEffects=[id \in {1} |-> operation]] execution == [tag |-> "LingeringEffectExecution",contextId |-> context.id,instruction |-> context.currentRef, operation |-> 1,snapshotId |-> world.id,source |-> context.currentRef.source,blueprints |-> blueprints,carriedOut |-> TRUE] created == [id \in DOMAIN blueprints |-> NewLingeringEffect910(id,blueprints[id],context,1,world)] registry == [NewLingeringRegistry910 EXCEPT !.effects=ObserveLingeringEffects910(created,world),!.usedEffects=DOMAIN blueprints, !.creations={LingeringCreationKey910(context,1)}] IN [c |-> c,context |-> context,execution |-> execution,registry |-> registry] ExtensionCreationFixture910(blueprints,world) == ExtensionCreationFromFixture910(ObjectAbilitySource9(1),"Paid",blueprints,world) ExtensionCreationValid910(f,world) == /\ DelayedCreatorEntered96(f.c.creator) /\ CreateLingeringEffects910(NewLingeringRegistry910,f.registry,f.context,f.c.origin,1,f.execution,world) ExtensionGebrFixture910 == LET syntax == [SyntaxFixture93(10100,"Static","SideB","Equipment",<>) EXCEPT !.source=ObjectAbilitySource9(3)] IN [id |-> 10101,kind |-> "Specimen0100Duration",definition |-> AbilityDefinition9(10100,"Static",syntax.source,"Printed"), syntax |-> syntax,sourceSHA |-> CardFacts9["Specimen0100"].sourceSHA] ExtensionNaWorldFixture910 == LET objects == [id \in {1,2,3,4,5,6} |-> IF id=1 THEN CardObject9("Specimen0149","Play",TRUE,"Up") ELSE IF id=6 THEN CardObject9("Specimen0145","Play",TRUE,"Up") ELSE IF id=3 THEN [CardObject9("Specimen0100","Play",TRUE,"Up") EXCEPT !.host=1] ELSE [CardObject9(IF id=2 THEN "NeutralValue00016" ELSE IF id=4 THEN "Specimen0204" ELSE "Specimen0013","Play",TRUE,"Up") EXCEPT !.area="Protecting",!.targetSite="SchemaAtom082",!.targetSiteKind="SchemaAtom033",!.activated=TRUE]] traversal == TraversalFixture92("ProcedureCode8b3260c0010f") e == [OpenEncounter6(20,2,traversal.id,FALSE,700,<<>>) EXCEPT !.stage="Paid"] IN [LifetimeWorldFixture910 EXCEPT !.objects=objects,!.control=PaidTraversalControlFixture95(traversal),!.encounters=[id \in {20} |-> e], !.extenders=[id \in {10101} |-> ExtensionGebrFixture910],!.present={10100,10102},!.barrierResponseCards={1,6}] ExtensionNaStaticFixture910(world) == LET syntax == SyntaxFixture93(10102,"Static","SideB","Technique",<>) definition == AbilityDefinition9(10102,"Static",syntax.source,"Printed") parts == [id \in {10} |-> StaticPartFixture94(id,10102,1,"Strength",{1})] count == Cardinality({id \in DOMAIN world.objects : world.objects[id].form="Card" /\ world.objects[id].kind="Barrier" /\ world.objects[id].deployed /\ world.objects[id].area="Protecting" /\ world.objects[id].targetSite=world.control.traversal.attacked}) receipt == [tag |-> "ConditionEvaluation",ability |-> 10102,unit |-> 1,kind |-> "Static",paid |-> FALSE,eventOccurred |-> FALSE, propertyHolds |-> DuringTraversal6(world.control.traversal)] conditions == StaticSnapshotFixture94(syntax,[id \in {1} |-> receipt]) values == [id \in {10} |-> count] projection == IF DuringTraversal6(world.control.traversal) THEN [id \in {10} |-> StaticProjection94(syntax,parts[id],count)] ELSE Empty9 IN [syntax |-> syntax,definition |-> definition,parts |-> parts,conditions |-> conditions,values |-> values,projection |-> projection] ExtensionNaStaticValid910(world) == LET s == ExtensionNaStaticFixture910(world) IN ObserveCurrentStaticDeclarations94(s.definition,s.syntax,world.objects,world.present,LingeringObjectActive910(s.syntax.source,world), world.activity,world.points,s.parts,s.conditions,s.values,s.projection) ExtensionNaStrength910(registry,world) == 1+SumMap([id \in DOMAIN ExtensionNaStaticFixture910(world).projection |-> ExtensionNaStaticFixture910(world).projection[id].value])+ LingeringStrength910(registry,world,1) ExtensionNaEndFixture910(world) == LET traversal == [world.control.traversal EXCEPT !.phase="TraversalEnds",!.step="ProcedureCode9606a4cd52b4",!.phaseId=21,!.usedPhaseIds=@ \cup {21},!.ending=TRUE] before == [traversal |-> traversal,windowsDone |-> TRUE,windows |-> <<>>,fundReturned |-> TRUE,resultDeclared |-> TRUE,phaseEndedIds |-> {20}] after == [before EXCEPT !.traversal.complete=TRUE,!.phaseEndedIds=@ \cup {21}] ended == [world EXCEPT !.id=2,!.control=[world.control EXCEPT !.traversal=after.traversal,!.phaseEndedIds=after.phaseEndedIds], !.encounters[20].stage="Complete"] IN [before |-> before,after |-> after,world |-> ended] ExtensionNaArithmeticChecks910 == LET world == ExtensionNaWorldFixture910 duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),world) blueprint == [BlueprintFixture910("Strength",duration) EXCEPT !.choiceKey="NoValue",!.durationMode="ImplicitSelfStrength"] creation == ExtensionCreationFixture910([id \in {10200} |-> blueprint],world) registry == creation.registry ending == ExtensionNaEndFixture910(world) afterEnd == LifetimeAfterObservationFixture910(registry,ending.world) nextTraversal == [OpenTraversal6(3,30,"SecondSideBAction") EXCEPT !.step="ProcedureCode4d6bd06d2c9f",!.attacked="SchemaAtom129"] nextInitiation == [traversal |-> nextTraversal,announced |-> TRUE,costsPaid |-> TRUE,badPubAdded |-> TRUE] nextBegun == [nextInitiation EXCEPT !.traversal.formalBegun=TRUE] nextWorld == [ending.world EXCEPT !.id=3,!.control=[PaidTraversalControlFixture95(nextBegun.traversal) EXCEPT !.phaseEndedIds=ending.after.phaseEndedIds],!.objects[2].targetSite="SchemaAtom129"] afterNext == LifetimeAfterObservationFixture910(afterEnd,nextWorld) IN /\ CardFacts9["Specimen0149"].kind="Technique" /\ CardFacts9["Specimen0100"].kind="Equipment" /\ CardFacts9["Specimen0149"].sourceSHA="cb94f2d3feb2a918fb1ed55deb9f27a63376a5c0176c2967053a8de06667e54a" /\ ExtensionGebrFixture910.sourceSHA="668a24dd331f84edfef6a84dce095a2e489c14d1c24c084084644838271e1ff0" /\ world.objects[1].card="Specimen0149" /\ world.objects[3].card="Specimen0100" /\ world.objects[3].host=1 /\ blueprint.originKind="Paid" /\ blueprint.value=2 /\ blueprint.baseDuration=duration /\ ExtensionCreationValid910(creation,world) /\ ExtensionNaStaticValid910(world) /\ LET wrong == [blueprint EXCEPT !.baseDuration=[kind |-> "Timing",ref |-> TimingRef9("Turn",world.turn.id)]] IN ~ExtensionCreationValid910(ExtensionCreationFixture910([id \in {10200} |-> wrong],world),world) /\ ExtensionNaStaticFixture910(world).projection[10].value=3 /\ ExtensionNaStrength910(registry,world)=6 /\ CompleteTraversal6(ending.before,ending.after,TRUE,{[tag |-> "TraversalEnds",traversalId |-> 2],TraversalPhaseEndEvent6(ending.before.traversal)},{2}) /\ ~DuringTraversal6(ending.world.control.traversal) /\ ~LingeringBaseAlive910(registry.effects[10200],ending.world) /\ ObserveLingering910(registry,afterEnd,ending.world) /\ ExtensionNaStaticValid910(ending.world) /\ ExtensionNaStaticFixture910(ending.world).projection=Empty9 /\ ExtensionNaStrength910(afterEnd,ending.world)=3 /\ afterEnd.effects[10200].status="Active" /\ GebrMaintenance910(afterEnd.effects[10200],ending.world)={10101} /\ FormalTraversalBegin6(nextInitiation,nextBegun,{TraversalBeginEvent6(nextTraversal)}) /\ ObserveLingering910(afterEnd,afterNext,nextWorld) /\ ExtensionNaStaticValid910(nextWorld) /\ ExtensionNaStaticFixture910(nextWorld).projection[10].value=1 /\ ExtensionNaStrength910(afterNext,nextWorld)=4 /\ afterNext.effects[10200].baseDuration=duration /\ afterEnd.effects[10200]=registry.effects[10200] /\ DOMAIN afterEnd.effects={10200} /\ afterNext.effects[10200].creationTurn=world.turn.id ExtensionGebrExpiryChecks910 == LET world == ExtensionNaWorldFixture910 duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),world) creation == ExtensionCreationFixture910([id \in {10200} |-> [BlueprintFixture910("Strength",duration) EXCEPT !.durationMode="ImplicitSelfStrength"]],world) registry == creation.registry ended == ExtensionNaEndFixture910(world).world maintained == LifetimeAfterObservationFixture910(registry,ended) unhosted == [ended EXCEPT !.id=3,!.objects[3].host=0] movedHost == [ended EXCEPT !.id=4,!.objects[3].host=6] faceDown == [ended EXCEPT !.id=5,!.objects[3].face="Down"] notDeployed == [ended EXCEPT !.id=6,!.objects[3].deployed=FALSE] textLost == [ended EXCEPT !.id=7,!.present={10102}] turnBefore == [ended.turn EXCEPT !.phase="Discard"] turnAfter == [turnBefore EXCEPT !.formalEnded=TRUE] turnEnded == [ended EXCEPT !.id=9,!.turn=turnAfter] IN /\ ExtensionCreationValid910(creation,world) /\ ObserveLingering910(registry,maintained,ended) /\ ~LingeringBaseAlive910(registry.effects[10200],ended) /\ ActiveLingeringIds910(maintained,ended)={10200} /\ TurnFormalEnd5(turnBefore,turnAfter,TRUE,TurnEndEvents5(turnBefore)) /\ \A changed \in {unhosted,movedHost,faceDown,notDeployed,textLost,turnEnded} : LET expired == LifetimeAfterObservationFixture910(maintained,changed) IN /\ GebrMaintenance910(maintained.effects[10200],changed)={} /\ ObserveLingering910(maintained,expired,changed) /\ expired.effects[10200].status="Expired" /\ DOMAIN expired.effects={10200} /\ ActiveLingeringIds910(expired,changed)={} /\ LingeringStrength910(expired,changed,1)=0 /\ expired.effects[10200].baseDuration=duration /\ ~ObserveLingering910(maintained,maintained,changed) /\ LET restored == [ended EXCEPT !.id=10] stillExpired == LifetimeAfterObservationFixture910(expired,restored) IN /\ ObserveLingering910(expired,stillExpired,restored) /\ stillExpired.effects[10200].status="Expired" /\ ActiveLingeringIds910(stillExpired,restored)={} /\ ~ObserveLingering910(expired,maintained,restored) /\ LET liveBaseUnhosted == [world EXCEPT !.id=11,!.objects[3].host=0] unchanged == LifetimeAfterObservationFixture910(registry,liveBaseUnhosted) IN /\ ObserveLingering910(registry,unchanged,liveBaseUnhosted) /\ unchanged.effects[10200].status="Active" /\ GebrMaintenance910(unchanged.effects[10200],liveBaseUnhosted)={} /\ LingeringBaseAlive910(unchanged.effects[10200],liveBaseUnhosted) ExtensionStaticDurationChecks910 == LET world == ExtensionNaWorldFixture910 s == ExtensionNaStaticFixture910(world) definition == ExtensionGebrFixture910.definition syntax == ExtensionGebrFixture910.syntax staticEffect == [mode |-> "Continuous",originKind |-> "Static",property |-> "Strength",boost |-> BarrierResponseCardBoost(1,3,20,FALSE,NoTimingRef9)] duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),world) invalidTimedStatic == NewLingeringEffect910(10300,[BlueprintFixture910("Strength",duration) EXCEPT !.originKind="Static"], LifetimeContextFixture910(ObjectAbilitySource9(1)).context,1,world) IN /\ ExtensionNaStaticValid910(world) /\ s.projection[10].mode="Continuous" /\ ~s.projection[10].lingering /\ ~s.projection[10].resolving /\ s.projection[10].duration=NoTimingRef9 /\ s.projection[10].window=NoTimingRef9 /\ Specimen0100CurrentPaidDuration94(definition,syntax,world.objects,world.present,TRUE,world.activity,world.points, staticEffect,world.turn.id,TRUE)=staticEffect /\ GebrMaintenance910(invalidTimedStatic,world)={} /\ GebrMaintenance910([invalidTimedStatic EXCEPT !.originKind="Rule"],world)={} /\ \A originKind \in {"Paid","Conditional","Play","BarrierInstruction"} : GebrMaintenance910([invalidTimedStatic EXCEPT !.originKind=originKind],world)={10101} /\ \A value \in {-1,0} : GebrMaintenance910([invalidTimedStatic EXCEPT !.originKind="Paid",!.value=value],world)={} /\ GebrMaintenance910([invalidTimedStatic EXCEPT !.originKind="Paid",!.durationClass="Turn"],world)={} /\ GebrMaintenance910([invalidTimedStatic EXCEPT !.originKind="Paid",!.target=2],world)={} /\ LET paidEffect == [invalidTimedStatic EXCEPT !.originKind="Paid"] IN /\ GebrMaintenance910(paidEffect,world)={10101} /\ GebrMaintenance910([paidEffect EXCEPT !.kind="Subtype"],world)={} /\ GebrMaintenance910([paidEffect EXCEPT !.creationTurn=world.turn.id+1],world)={} /\ GebrMaintenance910(paidEffect,[world EXCEPT !.extenders[10101].sourceSHA="ForeignCardRecord"])={} /\ GebrMaintenance910(paidEffect,[world EXCEPT !.objects[3]=[CardObject9("Specimen0189","Play",TRUE,"Up") EXCEPT !.host=1]])={} ExtensionSpecimen0177Fixture910 == LET world == [LifetimeWorldFixture910 EXCEPT !.objects=[id \in {1,2} |-> IF id=1 THEN CardObject9("Specimen0177","Play",TRUE,"Up") ELSE @ [id]],!.extenders=Empty9,!.barrierResponseCards={}] duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),world) choice == [BlueprintFixture910("Choice",duration) EXCEPT !.value="Sentry",!.choiceKey="ChosenSubtype",!.lingeringConsumers={10401}] subtype == [BlueprintFixture910("Subtype",duration) EXCEPT !.target=2,!.value="Sentry",!.choiceKey="NoValue"] blueprints == [id \in {10400,10401} |-> IF id=10400 THEN choice ELSE subtype] creation == ExtensionCreationFixture910(blueprints,world) IN [world |-> world,duration |-> duration,blueprints |-> blueprints,creation |-> creation] ExtensionSpecimen0177FollowChecks910 == LET f == ExtensionSpecimen0177Fixture910 world == f.world registry == f.creation.registry inactive == [world EXCEPT !.id=2,!.objects[1].face="Down"] textLost == [world EXCEPT !.id=3,!.present={}] beforeEnd == [world.encounters[20] EXCEPT !.stage="BarrierInstructions"] afterEnd == [beforeEnd EXCEPT !.stage="Complete"] ended == [world EXCEPT !.id=4,!.encounters[20]=afterEnd] expired == LifetimeAfterObservationFixture910(registry,ended) nextEncounter == [world.encounters[20] EXCEPT !.id=21] later == [world EXCEPT !.id=5,!.encounters=[id \in {21} |-> nextEncounter],!.currentEncounter=21] gone == [world EXCEPT !.id=6,!.objects=[id \in {2,11} |-> IF id=11 THEN CardObject9("Specimen0177","SideBDiscard",FALSE,"Up") ELSE @[id]]] IN /\ CardFacts9["Specimen0177"].kind="Technique" /\ world.objects[1].card="Specimen0177" /\ CardFacts9["Specimen0177"].sourceSHA="515df38b868570a253e8ebcdbadfc6eb11029e844e24ff8d0239dbdc9871c130" /\ world.control.traversal=NoTraversal6 /\ world.encounters[20].forced /\ world.encounters[20].traversalId=0 /\ ExtensionCreationValid910(f.creation,world) /\ f.duration=[kind |-> "Timing",ref |-> TimingRef9("TraversalPhase",20)] /\ ChoicePolicy910(f.blueprints[10400])="Follow" /\ registry.effects[10400].choicePolicy="Follow" /\ registry.effects[10400].source=registry.effects[10401].source /\ registry.effects[10400].baseDuration=registry.effects[10401].baseDuration /\ RememberedChoices910(registry,world,ObjectAbilitySource9(1),"ChosenSubtype")={"Sentry"} /\ ActiveLingeringIds910(registry,world)={10400,10401} /\ registry.effects[10401].target=2 /\ registry.effects[10401].value="Sentry" /\ CardBatchTransfer8(world.objects,gone.objects,{1},[id \in {1} |-> 11],DOMAIN world.objects,"SideBDiscard","Up",[id \in {1} |-> "SideBDiscard"]) /\ \A changed \in {inactive,textLost,gone} : LET after == LifetimeAfterObservationFixture910(registry,changed) IN /\ ObserveLingering910(registry,after,changed) /\ ActiveLingeringIds910(after,changed)={10400,10401} /\ RememberedChoices910(after,changed,ObjectAbilitySource9(1),"ChosenSubtype")={"Sentry"} /\ CompleteEncounter6(beforeEnd,afterEnd,TRUE) /\ ObserveLingering910(registry,expired,ended) /\ DOMAIN expired.effects={10400,10401} /\ ActiveLingeringIds910(expired,ended)={} /\ RememberedChoices910(expired,ended,ObjectAbilitySource9(1),"ChosenSubtype")={} /\ \A id \in {10400,10401} : expired.effects[id].status="Expired" /\ ~ObserveLingering910(registry,registry,ended) /\ ~LingeringBaseAlive910(registry.effects[10401],later) /\ ~LingeringWantsActive910(registry.effects[10400],registry.effects,later) /\ ObserveLingering910(expired,LifetimeAfterObservationFixture910(expired,later),later) /\ ActiveLingeringIds910(LifetimeAfterObservationFixture910(expired,later),later)={} /\ RememberedChoices910(registry,world,ObjectAbilitySource9(2),"ChosenSubtype")={} /\ RememberedChoices910(registry,world,ObjectAbilitySource9(1),"AnotherChoice")={} ExtensionAbsentEncounterChecks910 == LET absent == [ExtensionNaWorldFixture910 EXCEPT !.objects=[id \in {1,2} |-> @[id]],!.extenders=Empty9,!.present={10102}, !.control=PaidTraversalControlFixture95(NoTraversal6),!.currentEncounter=0,!.encounters=Empty9] duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),absent) blueprint == [BlueprintFixture910("Strength",duration) EXCEPT !.durationMode="ImplicitSelfStrength"] creation == ExtensionCreationFixture910([id \in {10200} |-> blueprint],absent) later == [absent EXCEPT !.id=2,!.currentEncounter=20, !.encounters=[id \in {20} |-> [OpenEncounter6(20,2,0,TRUE,700,<<>>) EXCEPT !.stage="Paid"]]] retained == LifetimeAfterObservationFixture910(creation.registry,later) itemInspectionCard == CardObject9("NeutralValue00016","SideADeck",FALSE,"Down") sameNumberItemInspection == [absent EXCEPT !.objects[2]=itemInspectionCard, !.itemInspections=[id \in {20} |-> [OpenItemInspection7(20,2,itemInspectionCard,0,0,"StructuralItemInspectionCaller",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE]]] IN /\ absent.objects[1].card="Specimen0149" /\ duration=[kind |-> "Timing",ref |-> NoTimingRef9] /\ ExtensionCreationValid910(creation,absent) /\ DOMAIN creation.registry.effects={10200} /\ creation.registry.effects[10200].status="Expired" /\ ActiveLingeringIds910(creation.registry,absent)={} /\ ObserveLingering910(creation.registry,retained,later) /\ ActiveLingeringIds910(retained,later)={} /\ BindTimingDuration910(TimingRef9("TraversalPhase",20),later).ref=TimingRef9("TraversalPhase",20) /\ BindTimingDuration910(TimingRef9("ItemInspection",20),later).ref=NoTimingRef9 /\ BindTimingDuration910(TimingRef9("SchemaAtom138",20),later).ref=NoTimingRef9 /\ BindTimingDuration910(TimingRef9("ItemInspection",20),sameNumberItemInspection).ref=TimingRef9("ItemInspection",20) /\ BindTimingDuration910(TimingRef9("TraversalPhase",20),sameNumberItemInspection).ref=NoTimingRef9 /\ ImplicitStrengthBinding910(ObjectAbilitySource9(1),1,absent,NoTimingRef9,duration) ExtensionOtherSourceDurationChecks910 == LET initial == [ExtensionNaWorldFixture910 EXCEPT !.objects[4]=CardObject9("Specimen0234","Play",TRUE,"Up")] ended == ExtensionNaEndFixture910(initial).world encounterBlueprint == [BlueprintFixture910("Strength",[kind |-> "Timing",ref |-> TimingRef9("TraversalPhase",20)]) EXCEPT !.source=ObjectAbilitySource9(4),!.target=1,!.value=3] exampleFamily066Creation == ExtensionCreationFromFixture910(ObjectAbilitySource9(4),"Paid",[id \in {10500} |-> encounterBlueprint],initial) other == exampleFamily066Creation.registry.effects[10500] structuralSource == RuleAbilitySource9("StructuralConditionalExternalStrength910") conditionalBlueprint == [encounterBlueprint EXCEPT !.source=structuralSource,!.originKind="Conditional"] conditionalCreation == ExtensionCreationFromFixture910(structuralSource,"Conditional",[id \in {10502} |-> conditionalBlueprint],initial) conditional == conditionalCreation.registry.effects[10502] c == LifetimeContextFixture910(structuralSource) statedBlueprint == [conditionalBlueprint EXCEPT !.baseDuration=[kind |-> "Stated",specification |-> "StructuralNextCheckpointDuration"],!.durationClass="Stated"] stated == NewLingeringEffect910(10501,statedBlueprint,c.context,1,initial) comparison == [tag |-> "LingeringDurationComparison",effect |-> stated,base |-> stated.baseDuration,snapshotId |-> ended.id, turn |-> TimingRef9("Turn",ended.turn.id),shorterThanTurn |-> TRUE] evaluated == [receipt |-> StatedDurationReceipt910(stated,ended),active |-> FALSE] world == [ended EXCEPT !.durationComparisons=[id \in {10501} |-> comparison],!.statedDurations=[id \in {10501} |-> evaluated]] statedCreation == ExtensionCreationFromFixture910(structuralSource,"Conditional",[id \in {10501} |-> statedBlueprint],world) registry == statedCreation.registry IN /\ CardFacts9["Specimen0234"].kind="Technique" /\ initial.objects[4].card="Specimen0234" /\ CardFacts9["Specimen0234"].sourceSHA="4274b1f84574af6f988f3836f62aa242f5913378f52cc6fcf3bfcb5a1e493863" /\ ExtensionCreationValid910(exampleFamily066Creation,initial) /\ other.value=3 /\ other.originKind="Paid" /\ other.source=ObjectAbilitySource9(4) /\ other.target=1 /\ other.source # ObjectAbilitySource9(other.target) /\ ~LingeringBaseAlive910(other,ended) /\ GebrMaintenance910(other,ended)={10101} /\ OrdinaryLingeringAlive910(other,ended) /\ ExtensionCreationValid910(conditionalCreation,initial) /\ conditional.originKind="Conditional" /\ conditional.source=structuralSource /\ conditional.target=1 /\ GebrMaintenance910(conditional,ended)={10101} /\ GebrMaintenance910([other EXCEPT !.originKind="Static"],ended)={} /\ ExtensionCreationValid910(statedCreation,world) /\ registry.effects[10501]=stated /\ ~LingeringBaseAlive910(stated,world) /\ LingeringShorterThanTurn910(stated,world) /\ GebrMaintenance910(stated,world)={10101} /\ ObserveLingering910(registry,registry,world) /\ \A bad \in {[comparison EXCEPT !.snapshotId=999],[comparison EXCEPT !.turn=TimingRef9("Turn",999)], [comparison EXCEPT !.base.specification="ForeignSpecification"],[comparison EXCEPT !.effect.target=6], [comparison EXCEPT !.shorterThanTurn=FALSE],[comparison EXCEPT !.tag="UnboundComparison"]} : LET changed == [world EXCEPT !.durationComparisons[10501]=bad] expired == LifetimeAfterObservationFixture910(registry,changed) IN /\ ~LingeringShorterThanTurn910(stated,changed) /\ GebrMaintenance910(stated,changed)={} /\ ObserveLingering910(registry,expired,changed) /\ expired.effects[10501].status="Expired" /\ ~LingeringShorterThanTurn910(stated,[world EXCEPT !.durationComparisons=Empty9]) /\ stated.baseDuration=[kind |-> "Stated",specification |-> "StructuralNextCheckpointDuration"] ExtensionChecks910 == /\ ExtensionNaArithmeticChecks910 /\ ExtensionGebrExpiryChecks910 /\ ExtensionStaticDurationChecks910 /\ ExtensionSpecimen0177FollowChecks910 /\ ExtensionAbsentEncounterChecks910 /\ ExtensionOtherSourceDurationChecks910 LifetimeTimingChecks910 == LET w == LifetimeWorldFixture910 duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),w) bp == [BlueprintFixture910("Strength",duration) EXCEPT !.durationMode="ImplicitSelfStrength"] r == LifetimeRegistryFixture910([id \in {800} |-> bp],w) ended == [w EXCEPT !.id=2,!.control.phaseEndedIds={20}] expired == LifetimeAfterObservationFixture910(r,ended) resumed == [ended EXCEPT !.id=3,!.control.phaseEndedIds={}] noEncounter == [w EXCEPT !.currentEncounter=0,!.encounters=Empty9] absent == [bp EXCEPT !.baseDuration=BindTimingDuration910(TimingRef9("TraversalPhase",20),noEncounter)] immediate == LifetimeRegistryFixture910([id \in {800} |-> absent],noEncounter) IN /\ w.control.traversal.id=0 /\ TimingRef9("TraversalPhase",20) \in LingeringTimingRefs910(w) /\ ImplicitStrengthBinding910(bp.source,1,w,TimingRef9("TraversalPhase",20),duration) /\ ~ImplicitStrengthBinding910(bp.source,2,w,TimingRef9("TraversalPhase",20),duration) /\ ~ImplicitStrengthBinding910(bp.source,1,w,TimingRef9("TraversalPhase",20),[kind |-> "Timing",ref |-> TimingRef9("Turn",10)]) /\ r.effects[800].status="Active" /\ LingeringStrength910(r,w,1)=2 /\ ObserveLingering910(r,expired,ended) /\ expired.effects[800].status="Expired" /\ DOMAIN expired.effects={800} /\ LingeringStrength910(r,ended,1)=0 /\ LingeringStrength910(expired,resumed,1)=0 /\ ObserveLingeringEffects910(expired.effects,resumed)=expired.effects /\ absent.baseDuration.ref=NoTimingRef9 /\ immediate.effects[800].status="Expired" /\ LingeringStrength910(immediate,w,1)=0 /\ BindTimingDuration910(TimingRef9("ItemInspection",20),w).ref=NoTimingRef9 /\ BindTimingDuration910(TimingRef9("TraversalPhase",21),w).ref=NoTimingRef9 /\ ~ObserveLingering910(r,[expired EXCEPT !.effects=Empty9],ended) LifetimeSourceChecks910 == LET w == LifetimeWorldFixture910 bp == BlueprintFixture910("Ordinary",BindTimingDuration910(TimingRef9("Turn",10),w)) r == LifetimeRegistryFixture910([id \in {801} |-> bp],w) moved == [w EXCEPT !.id=2,!.objects=[id \in {2,3,11} |-> IF id=11 THEN CardObject9("Specimen0088","SideBDiscard",FALSE,"Up") ELSE w.objects[id]]] after == LifetimeAfterObservationFixture910(r,moved) t == [w.turn EXCEPT !.phase="Discard"] endTurn == [t EXCEPT !.formalEnded=TRUE] afterEnd == [w EXCEPT !.id=3,!.turn=endTurn] IN /\ ~LingeringObjectActive910(bp.source,moved) /\ ObserveLingering910(r,after,moved) /\ after=r /\ 801 \in ActiveLingeringIds910(after,moved) /\ TurnFormalEnd5(t,endTurn,TRUE,TurnEndEvents5(t)) /\ ObserveLingeringEffects910(r.effects,afterEnd)[801].status="Expired" /\ TimingRef9("Turn",10) \notin LingeringTimingRefs910(afterEnd) /\ r.effects[801].source=ObjectAbilitySource9(1) /\ 1 \notin DOMAIN moved.objects /\ moved.objects[11].card="Specimen0088" LifetimeTypedBoundaryChecks910 == LET w == LifetimeWorldFixture910 traversal == [OpenTraversal6(30,31,700) EXCEPT !.phase="Approach",!.step="ProcedureCode3a6daf593ad4",!.formalBegun=TRUE] control == [w.control EXCEPT !.traversal=traversal] active == [w EXCEPT !.control=control,!.encounters=Empty9,!.currentEncounter=0] ended == [active EXCEPT !.control.phaseEndedIds={31}] completeTraversal == [traversal EXCEPT !.complete=TRUE] complete == [active EXCEPT !.control.traversal=completeTraversal] turnPhaseEnded == [w EXCEPT !.turnPhase.ended=TRUE] stated == [BlueprintFixture910("Ordinary",[kind |-> "Stated",specification |-> [event |-> "UntilNextSpecificOccurrence",source |-> ObjectAbilitySource9(1)]]) EXCEPT !.durationClass="Stated"] c == LifetimeContextFixture910(stated.source) row == NewLingeringEffect910(802,stated,c.context,1,w) sw == [w EXCEPT !.statedDurations=[id \in {802} |-> [receipt |-> StatedDurationReceipt910(row,w),active |-> TRUE]]] stale == [sw EXCEPT !.statedDurations[802].receipt.snapshotId=999] IN /\ TimingRef9("SchemaAtom138",30) \in LingeringTimingRefs910(active) /\ TimingRef9("TraversalPhase",31) \in LingeringTimingRefs910(active) /\ TimingRef9("TraversalPhase",31) \notin LingeringTimingRefs910(ended) /\ TimingRef9("SchemaAtom138",30) \notin LingeringTimingRefs910(complete) /\ TimingRef9("TraversalPhase",31) \notin LingeringTimingRefs910(complete) /\ TimingRef9("TurnPhase",11) \notin LingeringTimingRefs910(turnPhaseEnded) /\ LingeringBaseAlive910(row,sw) /\ ~LingeringBaseAlive910(row,stale) /\ ~LingeringBaseAlive910(row,[sw EXCEPT !.statedDurations[802].active=FALSE]) LifetimeItemInspectionInspectionEndChecks910 == LET w == LifetimeWorldFixture910 a0 == OpenItemInspection7(40,2,w.objects[2],0,41,700,{20}) a == [a0 EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] b == [OpenInspection7(41,"SchemaAtom082","SchemaAtom082",0,"Standalone",700,{20},Empty9) EXCEPT !.active=TRUE,!.beginMet=TRUE] aw == [w EXCEPT !.itemInspections=[id \in {40} |-> a],!.siteInspections=[id \in {41} |-> b]] ad == BindTimingDuration910(TimingRef9("ItemInspection",40),aw) bd == BindTimingDuration910(TimingRef9("Inspection",41),aw) reg == LifetimeRegistryFixture910([id \in {840,841} |-> BlueprintFixture910("Ordinary",IF id=840 THEN ad ELSE bd)],aw) ae == [a EXCEPT !.active=FALSE,!.complete=TRUE,!.step="Complete",!.completionReason="Normal"] be == [b EXCEPT !.active=FALSE,!.complete=TRUE,!.step="Complete",!.completionReason="Normal"] afterItemInspection == [aw EXCEPT !.id=2,!.itemInspections[40]=ae] afterInspection == [afterItemInspection EXCEPT !.id=3,!.siteInspections[41]=be] ra == LifetimeAfterObservationFixture910(reg,afterItemInspection) rb == LifetimeAfterObservationFixture910(ra,afterInspection) IN /\ EndItemInspection7(a,ae,"Normal",TRUE,{ItemInspectionEndEvent7(a)}) /\ EndInspection7(b,be,"Normal",TRUE,{InspectionEndEvent7(b)}) /\ ActiveLingeringIds910(reg,aw)={840,841} /\ ObserveLingering910(reg,ra,afterItemInspection) /\ ActiveLingeringIds910(ra,afterItemInspection)={841} /\ ObserveLingering910(ra,rb,afterInspection) /\ ActiveLingeringIds910(rb,afterInspection)={} /\ DOMAIN rb.effects={840,841} /\ ae.id=40 /\ be.id=41 /\ BindTimingDuration910(TimingRef9("Inspection",40),aw).ref=NoTimingRef9 /\ BindTimingDuration910(TimingRef9("ItemInspection",41),aw).ref=NoTimingRef9 LifetimeImplicitOtherTargetChecks910 == LET w == LifetimeWorldFixture910 twoBreakers == [w EXCEPT !.objects[2]=CardObject9("Specimen0145","Play",TRUE,"Up"),!.barrierResponseCards={1,2}] IN /\ ImplicitBarrierResponseCardStrengthDuration910(ObjectAbilitySource9(1),1,twoBreakers) /\ ~ImplicitBarrierResponseCardStrengthDuration910(ObjectAbilitySource9(1),2,twoBreakers) /\ ~ImplicitBarrierResponseCardStrengthDuration910(ObjectAbilitySource9(1),1,[twoBreakers EXCEPT !.barrierResponseCards={2}]) LifetimeBirthMaintenanceChecks910 == LET w == [ExtensionNaWorldFixture910 EXCEPT !.control.traversal=NoTraversal6,!.encounters=Empty9,!.currentEncounter=0] duration == BindTimingDuration910(NoTimingRef9,w) bp == [BlueprintFixture910("Strength",duration) EXCEPT !.durationMode="ImplicitSelfStrength"] created == ExtensionCreationFixture910([id \in {10800} |-> bp],w) row == created.registry.effects[10800] noExtension == [w EXCEPT !.objects[3].host=0] expired == LifetimeAfterObservationFixture910(created.registry,noExtension) IN /\ ExtensionCreationValid910(created,w) /\ row.baseDuration.ref=NoTimingRef9 /\ ~LingeringBaseAlive910(row,w) /\ GebrMaintenance910(row,w)={10101} /\ row.status="Active" /\ ObserveLingering910(created.registry,expired,noExtension) /\ expired.effects[10800].status="Expired" /\ LingeringStrength910(expired,w,1)=0 /\ GebrMaintenance910([row EXCEPT !.originKind="Rule"],w)={} /\ GebrMaintenance910([row EXCEPT !.originKind="Static"],w)={} LifetimeMultipleConsumerBoundaryChecks910 == LET w == LifetimeWorldFixture910 source == RuleAbilitySource9("StructuralMultipleConsumers910") duration == BindTimingDuration910(TimingRef9("TraversalPhase",20),w) choice == [BlueprintFixture910("Choice",duration) EXCEPT !.source=source,!.lingeringConsumers={10802,10803}] subtype == [BlueprintFixture910("Subtype",duration) EXCEPT !.source=source,!.target=2,!.value="Sentry"] blueprints == [id \in {10801,10802,10803} |-> IF id=10801 THEN choice ELSE subtype] f == ExtensionCreationFromFixture910(source,"Paid",blueprints,w) IN /\ ChoicePolicy910(choice)="Follow" /\ f.registry.effects[10801].status="Expired" /\ ~ExtensionCreationValid910(f,w) /\ ~LingeringWantsActive910(f.registry.effects[10801],f.registry.effects,w) ChoiceFixture910(card,value,key,turnBegins,onlyChoice,consumers,others,world) == LET w == [world EXCEPT !.objects[1]=CardObject9(card,"Play",TRUE,"Up")] bp == [BlueprintFixture910("Choice",BindTimingDuration910(TimingRef9("Turn",10),w)) EXCEPT !.originKind="Conditional",!.value=value,!.choiceKey=key, !.whenYourTurnBegins=turnBegins,!.onlyChoice=onlyChoice,!.lingeringConsumers=consumers,!.otherConsumers=others] IN [world |-> w,blueprint |-> bp] Specimen0214ChoicesChecks910 == LET s == ChoiceFixture910("Specimen0214","SchemaAtom082","ChosenTargetSite",TRUE,TRUE,{}, {901},LifetimeWorldFixture910) w == s.world before == LifetimeRegistryFixture910([id \in {800} |-> s.blueprint],w) turn == [w.turn EXCEPT !.phase="Discard"] ended == [turn EXCEPT !.formalEnded=TRUE] endWorld == [w EXCEPT !.id=2,!.turn=ended] expired == LifetimeAfterObservationFixture910(before,endWorld) nextTurn == [w EXCEPT !.id=3,!.turn=OpenTurn5("SideB",12,[p \in SetupPlayers |-> 1])] inactive == [w EXCEPT !.id=4,!.objects[1].face="Down"] lost == LifetimeAfterObservationFixture910(before,inactive) abilityLost == [w EXCEPT !.id=5,!.present={}] generic == [s.blueprint EXCEPT !.whenYourTurnBegins=FALSE] otherEffect == [s.blueprint EXCEPT !.onlyChoice=FALSE] paid == [s.blueprint EXCEPT !.originKind="Paid"] IN /\ CardFacts9["Specimen0214"].kind="Support" /\ w.objects[1].card="Specimen0214" /\ ChoicePolicy910(s.blueprint)="TurnOrSource" /\ ChoicePolicy910(generic)="SchemaAtom149" /\ ChoicePolicy910(otherEffect)="SchemaAtom149" /\ ChoicePolicy910(paid)="SchemaAtom149" /\ RememberedChoices910(before,w,ObjectAbilitySource9(1),"ChosenTargetSite")={"SchemaAtom082"} /\ TurnFormalEnd5(turn,ended,TRUE,TurnEndEvents5(turn)) /\ ObserveLingering910(before,expired,endWorld) /\ DOMAIN expired.effects={800} /\ expired.effects[800].status="Expired" /\ RememberedChoices910(expired,nextTurn,ObjectAbilitySource9(1),"ChosenTargetSite")={} /\ RememberedChoices910(before,nextTurn,ObjectAbilitySource9(1),"ChosenTargetSite")={} /\ ObserveLingering910(before,lost,inactive) /\ RememberedChoices910(lost,w,ObjectAbilitySource9(1),"ChosenTargetSite")={} /\ ObserveLingeringEffects910(lost.effects,w)=lost.effects /\ RememberedChoices910(before,abilityLost,ObjectAbilitySource9(1),"ChosenTargetSite")={"SchemaAtom082"} /\ ~ObserveLingering910(before,[lost EXCEPT !.effects=Empty9],inactive) ExampleFamily018ChoicesChecks910 == LET s == ChoiceFixture910("Specimen0088",2,"ChosenBarrier",FALSE,FALSE,{}, {902},LifetimeWorldFixture910) w == s.world before == LifetimeRegistryFixture910([id \in {801} |-> s.blueprint],w) nextTurn == [w EXCEPT !.id=2,!.turn=OpenTurn5("SideB",12,[p \in SetupPlayers |-> 1])] targetMoved == [w EXCEPT !.id=3,!.objects=[id \in {1,3,12} |-> IF id=12 THEN [w.objects[2] EXCEPT !.zone="SideADiscard",!.loc="SideADiscard",!.deployed=FALSE] ELSE w.objects[id]]] newBarrier == [targetMoved EXCEPT !.objects[12].zone="Play",!.objects[12].loc="Play",!.objects[12].deployed=TRUE] newExampleFamily018 == [w EXCEPT !.id=4,!.objects=[id \in {2,3,11} |-> IF id=11 THEN w.objects[1] ELSE w.objects[id]]] lost == LifetimeAfterObservationFixture910(before,newExampleFamily018) IN /\ CardFacts9["Specimen0088"].kind="Technique" /\ w.objects[2].card="NeutralValue00016" /\ ChoicePolicy910(s.blueprint)="SchemaAtom149" /\ RememberedChoices910(before,w,ObjectAbilitySource9(1),"ChosenBarrier")={2} /\ RememberedChoices910(before,nextTurn,ObjectAbilitySource9(1),"ChosenBarrier")={2} /\ RememberedChoices910(before,newBarrier,ObjectAbilitySource9(1),"ChosenBarrier")={2} /\ 12 \notin RememberedChoices910(before,newBarrier,ObjectAbilitySource9(1),"ChosenBarrier") /\ RememberedChoices910(before,w,ObjectAbilitySource9(3),"ChosenBarrier")={} /\ ObserveLingering910(before,lost,newExampleFamily018) /\ lost.effects[801].status="Expired" /\ RememberedChoices910(lost,newExampleFamily018,ObjectAbilitySource9(11),"ChosenBarrier")={} /\ RememberedChoices910(lost,w,ObjectAbilitySource9(1),"ChosenBarrier")={} ChoicePolicyPrecedenceChecks910 == LET w == LifetimeWorldFixture910 bp == [BlueprintFixture910("Choice",BindTimingDuration910(TimingRef9("Turn",10),w)) EXCEPT !.originKind="Conditional",!.whenYourTurnBegins=TRUE,!.onlyChoice=TRUE,!.lingeringConsumers={802}] mixed == [bp EXCEPT !.otherConsumers={901}] IN /\ ChoicePolicy910(bp)="Follow" /\ ChoicePolicy910(mixed)="TurnOrSource" /\ ChoicePolicy910([mixed EXCEPT !.whenYourTurnBegins=FALSE])="SchemaAtom149" ExampleFamily055ReplacementLifetimeChecks910 == LET s == ChoiceFixture910("Specimen0214","SchemaAtom082","ChosenTargetSite",TRUE,TRUE,{}, {901},LifetimeWorldFixture910) traversal == [OpenTraversal6(30,31,700) EXCEPT !.phase="Success",!.step="ProcedureCoded75d879e00ff",!.formalBegun=TRUE] w == [s.world EXCEPT !.control.traversal=traversal] c == LifetimeContextFixture910(ObjectAbilitySource9(1)) choice == NewLingeringEffect910(800,s.blueprint,c.context,1,w) rb == [BlueprintFixture910("Replacement",BindTimingDuration910(TimingRef9("SchemaAtom138",30),w)) EXCEPT !.originKind="Conditional",!.durationClass="SchemaAtom138"] replacement == NewLingeringEffect910(810,rb,c.context,2,w) registry == [NewLingeringRegistry910 EXCEPT !.effects=[id \in {800,810} |-> IF id=800 THEN choice ELSE replacement],!.usedEffects={800,810}] r == [id |-> 810,provider |-> "Maintained",blueprint |-> [source |-> ObjectAbilitySource9(1)],scope |-> [kind |-> "SchemaAtom138",id |-> 30], creation |-> [replacement |-> 810,instruction |-> replacement.creation[2]]] expected == [id |-> w.id,objects |-> w.objects,replacementDefinitions |-> [id \in {810} |-> r],liveReplacementIds |-> {},traversalControl |-> w.control] projected == [expected EXCEPT !.liveReplacementIds={810}] inactive == [w EXCEPT !.id=2,!.objects[1].face="Down"] after == LifetimeAfterObservationFixture910(registry,inactive) expectedInactive == [expected EXCEPT !.id=2,!.objects=inactive.objects] projectedInactive == [expectedInactive EXCEPT !.liveReplacementIds={810}] ended == [inactive EXCEPT !.id=3,!.control.traversal.complete=TRUE] expired == LifetimeAfterObservationFixture910(after,ended) expectedEnded == [expectedInactive EXCEPT !.id=3,!.traversalControl=ended.control] IN /\ ProjectLingeringReplacements910(registry,w,expected,projected) /\ ReplacementRecordActive99(r,[initialRef |-> replacement.creation[2]],projected) /\ ObserveLingering910(registry,after,inactive) /\ after.effects[800].status="Expired" /\ after.effects[810].status="Active" /\ RememberedChoices910(after,inactive,ObjectAbilitySource9(1),"ChosenTargetSite")={} /\ ProjectLingeringReplacements910(after,inactive,expectedInactive,projectedInactive) /\ ReplacementRecordActive99(r,[initialRef |-> replacement.creation[2]],[projectedInactive EXCEPT !.traversalControl=inactive.control]) /\ ObserveLingering910(after,expired,ended) /\ expired.effects[810].status="Expired" /\ ProjectLingeringReplacements910(expired,ended,expectedEnded,expectedEnded) /\ ~ProjectLingeringReplacements910(after,inactive,expectedInactive,[projectedInactive EXCEPT !.liveReplacementIds={}]) /\ LET bad == [expected EXCEPT !.replacementDefinitions[810].blueprint.source=ObjectAbilitySource9(3)] IN ~ProjectLingeringReplacements910(registry,w,bad,[bad EXCEPT !.liveReplacementIds={810}]) /\ LET bad == [expected EXCEPT !.replacementDefinitions[810].creation.instruction.source=ObjectAbilitySource9(3)] IN ~ProjectLingeringReplacements910(registry,w,bad,[bad EXCEPT !.liveReplacementIds={810}]) CleanupFixture910 == LET w == [LifetimeWorldFixture910 EXCEPT !.control.phaseEndedIds={20}] liveWorld == [w EXCEPT !.control.phaseEndedIds={}] blueprints == [id \in {800,801} |-> BlueprintFixture910(IF id=800 THEN "Strength" ELSE "Ordinary", BindTimingDuration910(IF id=800 THEN TimingRef9("TraversalPhase",20) ELSE TimingRef9("Turn",10),liveWorld))] beforeObservation == LifetimeRegistryFixture910(blueprints,liveWorld) before == LifetimeAfterObservationFixture910(beforeObservation,w) initial == ConditionalSnapshotFixture96(100,0,"ProcedureCodee605a78f5d5e",Empty9,w.objects) ledger0 == NewConditionalLedger96(initial) snapshot == ConditionalSnapshotFixture96(w.id,50,"ProcedureCodee605a78f5d5e",Empty9,w.objects) cp == ConditionalCheckpointFixture96(ledger0,50,[snapshot EXCEPT !.point="CheckpointBeginning"],snapshot,Empty9) ledger == ConditionalCommittedFixture96(ledger0,Empty9,cp,Empty9,Empty9,Empty9) frame == LingeringCheckpointFrame910(ledger,cp,w) receipt == [tag |-> "LingeringCheckpointCleanup",frame |-> frame,expired |-> {800},complete |-> TRUE] after == [before EXCEPT !.effects=[id \in {801} |-> before.effects[id]],!.cleanupIds={50}] returned == [frame EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"] IN [world |-> w,liveWorld |-> liveWorld,blueprints |-> blueprints,beforeObservation |-> beforeObservation, before |-> before,ledger0 |-> ledger0,ledger |-> ledger,snapshot |-> snapshot,cp |-> cp,frame |-> frame, receipt |-> receipt,after |-> after,returned |-> returned] CleanupCheckpointChecks910 == LET s == CleanupFixture910 wrongPoint == [s.frame EXCEPT !.point="ProcedureCodee605a78f5d5e"] wrongPointReceipt == [s.receipt EXCEPT !.frame=wrongPoint] incomplete == [s.receipt EXCEPT !.complete=FALSE] wrongSet == [s.receipt EXCEPT !.expired={800,801}] wrongSetAfter == [s.before EXCEPT !.effects=Empty9,!.cleanupIds={50}] stale == [s.frame EXCEPT !.snapshotId=100] IN /\ ProcessConditionalCheckpoint99(s.ledger0,s.ledger,<<>>,<<>>,Empty9,Empty9,s.cp,Empty9,Empty9,Empty9,Empty9,Empty9,{},CardFacts9) /\ ObserveLingering910(s.beforeObservation,s.before,s.world) /\ DOMAIN s.before.effects={800,801} /\ s.before.effects[800].status="Expired" /\ s.before.effects[801].status="Active" /\ LingeringStrength910(s.before,s.world,1)=0 /\ OpenLingeringCheckpoint910(s.ledger,s.cp,s.world,s.frame) /\ CleanupLingering910(s.before,s.after,s.ledger,s.world,s.frame,s.returned,s.receipt) /\ DOMAIN s.after.effects={801} /\ s.after.usedEffects={800,801} /\ ~CleanupLingering910(s.before,s.after,s.ledger,s.world,wrongPoint,[s.returned EXCEPT !.point="ProcedureCodeb681cc249a04"],wrongPointReceipt) /\ ~CleanupLingering910(s.before,s.after,s.ledger,s.world,s.frame,s.returned,incomplete) /\ ~CleanupLingering910(s.before,wrongSetAfter,s.ledger,s.world,s.frame,s.returned,wrongSet) /\ ~CleanupLingering910(s.before,s.after,s.ledger,s.world,stale,[stale EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"],[s.receipt EXCEPT !.frame=stale]) /\ ~CleanupLingering910(s.before,s.after,s.ledger,s.world,s.returned,s.returned,[s.receipt EXCEPT !.frame=s.returned]) /\ ~CleanupLingering910([s.before EXCEPT !.cleanupIds={50}],s.after,s.ledger,s.world,s.frame,s.returned,s.receipt) CleanupProfileChecks910 == LET s == CleanupFixture910 wrongCaller == [s.cp EXCEPT !.caller=[kind |-> "ForeignObservation"]] wrongCallerFrame == [s.frame EXCEPT !.recognition=wrongCaller] wrongSnapshot == [s.cp EXCEPT !.processingSnapshot.exposureMarkers["SideB"]=1] wrongSnapshotFrame == [s.frame EXCEPT !.recognition=wrongSnapshot] wrongSerial == [s.cp EXCEPT !.serial=@+1] wrongSerialFrame == [s.frame EXCEPT !.recognition=wrongSerial] staleLedger == [s.ledger EXCEPT !.lastCheckpoint=49] unobserved == s.beforeObservation unobservedAfter == [unobserved EXCEPT !.cleanupIds={50}] IN /\ ~OpenLingeringCheckpoint910(s.ledger,wrongCaller,s.world,wrongCallerFrame) /\ ~OpenLingeringCheckpoint910(s.ledger,wrongSnapshot,s.world,wrongSnapshotFrame) /\ ~OpenLingeringCheckpoint910(s.ledger,wrongSerial,s.world,wrongSerialFrame) /\ ~OpenLingeringCheckpoint910(staleLedger,s.cp,s.world,s.frame) /\ ~CleanupLingering910(unobserved,unobservedAfter,s.ledger,s.world,s.frame,s.returned,[s.receipt EXCEPT !.expired={}]) /\ ~CleanupLingering910(s.before,s.after,s.ledger,[s.world EXCEPT !.objects=Empty9],s.frame,s.returned,s.receipt) CleanupWorldSnapshotChecks910 == LET s == CleanupFixture910 newerWorld == [s.world EXCEPT !.id=2] frame == LingeringCheckpointFrame910(s.ledger,s.cp,newerWorld) IN /\ ~OpenLingeringCheckpoint910(s.ledger,s.cp,newerWorld,frame) DelayedLifetimeCreationFixture910(card,eventKind,duration,trigger,thisTraversal,traversal) == LET s == DelayedScenarioFixture96(card,eventKind,duration,trigger,thisTraversal) origin == [kind |-> "Instruction",plan |-> s.creator.resolving,parent |-> s.creator.parentResolving,ruleStep |-> "NoValue"] world == [LifetimeWorldFixture910 EXCEPT !.objects=s.objects,!.control.traversal=traversal,!.encounters=Empty9,!.currentEncounter=0] omitted == DelayedCreationOmitted910(s.template,traversal) created == IF omitted THEN s.before ELSE DelayedCreatedFixture96(s.before,6200,6300,s.template,s.creator.resolving,s.creation,traversal) blueprints == IF omitted THEN Empty9 ELSE [id \in {6200} |-> DelayedLifetimeBlueprint910(created.effects[id],origin,world)] context == [id |-> 9000,imminenceId |-> 9001,currentRef |-> InstructionWindowRef93(origin.plan),currentWorld |-> world.id, phase |-> "Resolving",actualEffects |-> [id \in {1} |-> [kind |-> "CreateLingering",blueprints |-> blueprints]]] execution == [tag |-> "LingeringEffectExecution",contextId |-> context.id,instruction |-> context.currentRef,operation |-> 1, snapshotId |-> world.id,source |-> origin.plan.source,blueprints |-> blueprints,carriedOut |-> TRUE] rows == [id \in DOMAIN blueprints |-> NewLingeringEffect910(id,blueprints[id],context,1,world)] registry == [NewLingeringRegistry910 EXCEPT !.effects=ObserveLingeringEffects910(rows,world),!.usedEffects=DOMAIN rows, !.creations={LingeringCreationKey910(context,1)}] definitions == DelayedConditionalDefinitions96(created.effects) afterSnapshot == LingeringConditionalSnapshot910( SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(2,0,"CreatedDelayed",definitions,world.objects),created),registry,created,world) published == [created EXCEPT !.activationEpoch=afterSnapshot.activationEpoch,!.activationSerial=afterSnapshot.activationSerial] IN [s |-> s,origin |-> origin,world |-> world,omitted |-> omitted,created |-> created,blueprints |-> blueprints, context |-> context,execution |-> execution,registry |-> registry,definitions |-> definitions,afterSnapshot |-> afterSnapshot,published |-> published] DelayedLifetimeCreationValid910(f) == /\ DelayedCreatorEntered96(f.s.creator) /\ PublishCreatedDelayedLingering910(NewLingeringRegistry910,f.registry,f.s.before,f.created,f.published,<<>>,<<>>,f.s.initial, f.afterSnapshot,6200,6300,f.s.template,f.context,f.origin,1,f.execution,f.s.creation,f.world,{6100}) DelayedLifetimeCreationChecks910 == LET j == DelayedLifetimeCreationFixture910("Specimen0126","TurnEnds",NoTimingRef9,TimingRef9("Turn",10),FALSE,NoTraversal6) m == DelayedLifetimeCreationFixture910("Specimen0142","TraversalEnds",NoTimingRef9,NoTimingRef9,TRUE,TraversalFixture92("ProcedureCode8b3260c0010f")) g == DelayedLifetimeCreationFixture910("Specimen0117","Deployed",TimingRef9("Turn",10),NoTimingRef9,FALSE,NoTraversal6) IN /\ \A f \in {j,m,g} : /\ DelayedLifetimeCreationValid910(f) /\ DelayedLifetimeBound910(f.registry,f.published) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,f.registry,f.context,f.origin,1,f.execution,f.world) /\ f.registry.effects[6200].source=f.created.effects[6200].source /\ f.registry.effects[6200].definitionId=6300 /\ f.registry.effects[6200].status="Active" /\ ConditionalActive96(f.created.effects[6200].definition,f.afterSnapshot) /\ ~CreateDelayedLingering910(NewLingeringRegistry910,f.registry,f.s.before,f.created,6200,6300,f.s.template, f.context,f.origin,1,[f.execution EXCEPT !.instruction.source=ObjectAbilitySource9(99)],f.s.creation,f.world,{6100}) /\ ~CreateDelayedLingering910(NewLingeringRegistry910,f.registry,f.s.before,f.created,6200,6300,f.s.template, f.context,f.origin,1,[f.execution EXCEPT !.carriedOut=FALSE],f.s.creation,f.world,{6100}) /\ ~CreateDelayedLingering910(NewLingeringRegistry910,f.registry,f.s.before,f.created,6200,6300,f.s.template, f.context,f.origin,1,f.execution,[f.s.creation EXCEPT !.instruction.source=ObjectAbilitySource9(99)],f.world,{6100}) /\ j.registry.effects[6200].baseDuration=[kind |-> "DelayedResolution",effectId |-> 6200] /\ g.registry.effects[6200].baseDuration.ref=TimingRef9("Turn",10) /\ m.created.effects[6200].triggerStructure=TimingRef9("SchemaAtom138",m.world.control.traversal.id) DelayedLifetimeNoTraversalChecks910 == LET f == DelayedLifetimeCreationFixture910("Specimen0142","TraversalEnds",NoTimingRef9,NoTimingRef9,TRUE,NoTraversal6) later == DelayedLifetimeCreationFixture910("Specimen0142","TraversalEnds",NoTimingRef9,NoTimingRef9,TRUE,TraversalFixture92("ProcedureCode8b3260c0010f")) proposed == [later.registry EXCEPT !.creations=f.registry.creations] IN /\ DelayedLifetimeCreationValid910(f) /\ f.created=f.s.before /\ DOMAIN f.registry.effects={} /\ f.registry.usedEffects={} /\ f.registry.creations={LingeringCreationKey910(f.context,1)} /\ ~CreateDelayedLingering910(f.registry,proposed,f.created,later.created,6200,6300,later.s.template, later.context,later.origin,1,later.execution,later.s.creation,later.world,{6100}) DelayedLifetimeAbsentTimingChecks910 == LET f == DelayedLifetimeCreationFixture910("Specimen0117","Deployed",TimingRef9("TraversalPhase",99),NoTimingRef9,FALSE,NoTraversal6) laterWorld == [f.world EXCEPT !.encounters=[id \in {99} |-> [OpenEncounter6(99,2,0,TRUE,700,<<>>) EXCEPT !.stage="Paid"]],!.currentEncounter=99] IN /\ DelayedLifetimeCreationValid910(f) /\ f.registry.effects[6200].baseDuration.requested=TimingRef9("TraversalPhase",99) /\ f.registry.effects[6200].baseDuration.ref=NoTimingRef9 /\ f.registry.effects[6200].status="Expired" /\ DOMAIN f.published.effects={6200} /\ ~ConditionalActive96(f.created.effects[6200].definition,f.afterSnapshot) /\ ActiveLingeringIds910(f.registry,laterWorld)={} /\ ObserveLingeringEffects910(f.registry.effects,laterWorld)=f.registry.effects DelayedLifetimeResolutionFixture910(oneShot) == LET f == DelayedLifetimeCreationFixture910(IF oneShot THEN "Specimen0126" ELSE "Specimen0117",IF oneShot THEN "TurnEnds" ELSE "Deployed", IF oneShot THEN NoTimingRef9 ELSE TimingRef9("Turn",10),IF oneShot THEN TimingRef9("Turn",10) ELSE NoTimingRef9,FALSE,NoTraversal6) eventKind == IF oneShot THEN "TurnEnds" ELSE "Deployed" r == DelayedRecognitionFixture96([f.s EXCEPT !.after=f.published,!.initial=f.afterSnapshot],eventKind,103,1,6502) d == f.created.effects[6200].definition turn == [f.world.turn EXCEPT !.phase=IF oneShot THEN "Discard" ELSE "NeutralValue00001"] endedTurn == IF oneShot THEN [turn EXCEPT !.formalEnded=TRUE] ELSE turn siteStep == IF oneShot THEN "ProcedureCode8f113080e47f" ELSE "ProcedureCode989abc27e0c6" site == TurnPrioritySite9(endedTurn,siteStep,10,3,TurnContextFixture92(endedTurn,siteStep)) members == ConditionalWindowMembers96(r.after.instances,6502) open == WindowFixture92(6502,"Reaction",site,members,64,NoTimingRef9) begin2 == [SnapshotWithConditionalRegistry96(r.current,r.after) EXCEPT !.id=20,!.checkpointId=2,!.point="CheckpointBeginning"] current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(r.after,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] received == ConditionalCommittedFixture96(r.after,r.definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,6400) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(6400,d,ready,option,LegalityFixture92(ready,option).transactionId,"NoValue") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received EXCEPT !.instances[6400].status="Imminent"] stepName == IF oneShot THEN "TakeOneExposureMarker" ELSE "DrawOneOrGainOne" plan == OpenInstruction93(700,"Ability",6400,d.syntax.source,"NoValue",1,"NoValue",<>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.targets={},!.phase="Imminent"] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {stepName}] resolving == [selected EXCEPT !.instances[6400].status="Resolving",!.instances[6400].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> {stepName}]]] completeP == [resolvingP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <>] core == [resolving EXCEPT !.instances[6400].status="Complete",!.effects=IF oneShot THEN Empty9 ELSE @] retained == [core EXCEPT !.effects=resolving.effects] complete == IF oneShot THEN [retained EXCEPT !.activationEpoch=[key \in DOMAIN @ |-> 1],!.activationSerial=1] ELSE retained beforeWorld == [f.world EXCEPT !.id=21,!.objects=current2.objects,!.turn=endedTurn] afterWorld == [beforeWorld EXCEPT !.id=30,!.finishedDelayedEffects=IF oneShot THEN {6200} ELSE {}] expired == LifetimeAfterObservationFixture910(f.registry,afterWorld) beforeSnapshot == SnapshotWithConditionalRegistry96(current2,resolving) afterSnapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(current2,retained) EXCEPT !.id=30, !.activationEpoch=complete.activationEpoch,!.activationSerial=complete.activationSerial],expired,retained,afterWorld) actualStep == [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> stepName,complete |-> TRUE] begin3 == [SnapshotWithConditionalRegistry96(afterSnapshot,complete) EXCEPT !.id=40,!.checkpointId=3,!.point="CheckpointBeginning"] current3 == [begin3 EXCEPT !.id=41,!.point="ProcedureCodee605a78f5d5e"] cp3 == [ConditionalCheckpointFixture96(complete,3,begin3,current3,Empty9) EXCEPT !.caller=ConditionalInstructionCaller96(completeP)] received3 == ConditionalCommittedFixture96(complete,r.definitions,cp3,Empty9,Empty9,Empty9) cleanupWorld == [afterWorld EXCEPT !.id=41] frame == LingeringCheckpointFrame910(received3,cp3,cleanupWorld) expiredIds == IF oneShot THEN {6200} ELSE {} cleanup == [tag |-> "LingeringCheckpointCleanup",frame |-> frame,expired |-> expiredIds,complete |-> TRUE] cleanedRegistry == [expired EXCEPT !.effects=[id \in DOMAIN @ \ expiredIds |-> @[id]],!.cleanupIds={3}] cleanupCandidate == [received3 EXCEPT !.effects=[id \in DOMAIN @ \ expiredIds |-> @[id]]] cleanupSnapshot == LingeringConditionalSnapshot910(SnapshotWithConditionalRegistry96(current3,cleanupCandidate),cleanedRegistry,cleanupCandidate,cleanupWorld) returnedFrame == [frame EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"] IN [f |-> f,r |-> r,d |-> d,turn |-> turn,endedTurn |-> endedTurn,site |-> site,members |-> members,open |-> open, current2 |-> current2,cp2 |-> cp2,received |-> received,ready |-> ready,option |-> option,busy |-> busy,p |-> p,imminentP |-> imminentP, selected |-> selected,plan |-> plan,imminentPlan |-> imminentPlan,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan, expected |-> expected,resolving |-> resolving,completeP |-> completeP,completePlan |-> completePlan,core |-> core,retained |-> retained, complete |-> complete,beforeWorld |-> beforeWorld,afterWorld |-> afterWorld,expired |-> expired,beforeSnapshot |-> beforeSnapshot, afterSnapshot |-> afterSnapshot,actualStep |-> actualStep,cp3 |-> cp3,received3 |-> received3,cleanupWorld |-> cleanupWorld, frame |-> frame,cleanup |-> cleanup,cleanedRegistry |-> cleanedRegistry,cleanupCandidate |-> cleanupCandidate, cleanupSnapshot |-> cleanupSnapshot,returnedFrame |-> returnedFrame] DelayedLifetimeResolutionValid910(q) == /\ DelayedLifetimeCreationValid910(q.f) /\ IF q.f.s.template.syntax.cardKind="Support" THEN TurnFormalEnd5(q.turn,q.endedTurn,TRUE,TurnEndEvents5(q.turn)) ELSE q.turn=q.endedTurn /\ ProcessConditionalCheckpoint96(q.f.published,q.r.after,<<>>,<<>>,q.r.definitions,q.r.cp,DelayedConditionsFixture96(q.r.definitions,q.r.events),q.r.allocation,q.r.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,q.r.after,6502,q.site,OpeningFixture92(6502,"Reaction",q.site,q.members,64,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(q.r.after,q.received,<>,<>,q.r.definitions,q.cp2,ConditionalConditionsFixture96(q.r.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{6502}) /\ CheckpointPriorityWithConditionals96(q.received,<>,<>,[CheckpointFixture92(q.open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(q.received,q.selected,<>,<>,q.p,q.imminentP,q.d,SnapshotWithConditionalRegistry96(q.current2,q.received),6400,q.option, LegalityFixture92(q.ready,q.option),Empty9,q.plan,q.imminentPlan,[InstructionTargetsFixture93(q.plan) EXCEPT !.targets={}],InstructionEntryFixture93(q.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> q.d.syntax.id,source |-> q.d.syntax.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(q.selected,q.resolving,<>,q.imminentP,q.resolvingP,q.imminentPlan,q.resolvingPlan, NoModifiersFixture95(q.imminentPlan),InstructionClearanceFixture93(q.imminentPlan,0,0),q.expected) /\ CarryDelayedLingeringInstruction910(q.f.registry,q.expired,q.resolving,q.core,q.retained,q.complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld) /\ ProcessConditionalCheckpoint96(q.complete,q.received3,<>,<>,q.r.definitions,q.cp3,ConditionalConditionsFixture96(q.r.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{6502}) /\ CleanupLingeringConditionals910(q.expired,q.cleanedRegistry,q.received3,q.cleanupCandidate,q.cleanupCandidate,<>,<>, SnapshotWithConditionalRegistry96(q.cp3.processingSnapshot,q.received3),q.cleanupSnapshot,q.cleanupWorld,q.frame,q.returnedFrame,q.cleanup) DelayedUntilResolutionCarryChecks910 == LET q == DelayedLifetimeResolutionFixture910(TRUE) IN /\ DelayedLifetimeResolutionValid910(q) /\ q.core.effects=Empty9 /\ q.retained.effects=q.resolving.effects /\ q.complete.effects=q.resolving.effects /\ q.expired.effects[6200].status="Expired" /\ q.afterWorld.finishedDelayedEffects={6200} /\ q.complete.instances[6400].status="Complete" /\ q.completeP.ability.lastFinished /\ ~q.completeP.ability.returned /\ q.completeP.phase="InstructionCheckpoint" /\ q.completeP.checkpoint=0 /\ ~ConditionalActive96(q.d,q.afterSnapshot) /\ q.complete.activationEpoch[ConditionalKey96(q.d)]=1 /\ q.received3.effects=q.complete.effects /\ q.cleanupCandidate.effects=Empty9 /\ q.cleanedRegistry.effects=Empty9 /\ q.cleanedRegistry.usedEffects={6200} /\ q.cleanupCandidate.usedDelayedEffects={6200} /\ q.cleanupCandidate.usedDelayedDefinitions={6300} /\ ~CarryDelayedLingeringInstruction910(q.f.registry,q.expired,q.resolving,q.core,q.core,q.complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld) /\ ~CleanupLingeringConditionals910(q.expired,q.cleanedRegistry,q.received3,q.cleanupCandidate,q.cleanupCandidate,<>,<>, SnapshotWithConditionalRegistry96(q.cp3.processingSnapshot,q.received3),q.cleanupSnapshot,q.cleanupWorld, [q.frame EXCEPT !.point="ProcedureCodee605a78f5d5e"],q.returnedFrame,[q.cleanup EXCEPT !.frame.point="ProcedureCodee605a78f5d5e"]) DelayedExplicitRepeatCarryChecks910 == LET q == DelayedLifetimeResolutionFixture910(FALSE) IN /\ DelayedLifetimeResolutionValid910(q) /\ q.core.effects=q.resolving.effects /\ q.complete.effects=q.resolving.effects /\ q.afterWorld.finishedDelayedEffects={} /\ q.expired.effects[6200].status="Active" /\ ConditionalActive96(q.d,q.afterSnapshot) /\ q.complete.activationEpoch[ConditionalKey96(q.d)]=0 /\ q.cleanupCandidate.effects=q.complete.effects /\ DOMAIN q.cleanedRegistry.effects={6200} DelayedExpiryPublicationFixture910(isResolving) == LET q == DelayedLifetimeResolutionFixture910(FALSE) before == IF isResolving THEN q.resolving ELSE q.r.after window == IF isResolving THEN q.busy ELSE q.open snapshot0 == SnapshotWithConditionalRegistry96(IF isResolving THEN q.current2 ELSE q.r.current,before) turn == [q.f.world.turn EXCEPT !.phase="Discard"] world0 == [q.f.world EXCEPT !.id=snapshot0.id,!.objects=snapshot0.objects,!.turn=turn] world == [world0 EXCEPT !.id=31,!.turn.formalEnded=TRUE] registry == LifetimeAfterObservationFixture910(q.f.registry,world) after == [before EXCEPT !.instances=[id \in DOMAIN @ |-> IF @[id].status="Pending" THEN [@[id] EXCEPT !.status="Lost"] ELSE @[id]], !.activationEpoch=[key \in DOMAIN @ |-> 1],!.activationSerial=1] snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(snapshot0,before) EXCEPT !.id=31, !.activationEpoch=after.activationEpoch,!.activationSerial=1],registry,before,world) afterWindow == IF isResolving THEN window ELSE [window EXCEPT !.pending={},!.lostPending={6400}] IN [q |-> q,before |-> before,window |-> window,snapshot0 |-> snapshot0,world0 |-> world0,world |-> world, registry |-> registry,after |-> after,snapshot |-> snapshot,afterWindow |-> afterWindow] DelayedExpiryPublicationValid910(f) == /\ DelayedLifetimeResolutionValid910(f.q) /\ ConditionalActive96(f.q.d,f.snapshot0) /\ 1 \notin DOMAIN f.world0.objects /\ TurnFormalEnd5(f.world0.turn,f.world.turn,TRUE,TurnEndEvents5(f.world0.turn)) /\ PublishLingeringActivity910(f.q.f.registry,f.registry,f.before,f.after,<>,<>, f.snapshot0,f.snapshot,f.world0,f.world) DelayedPendingExpiryChecks910 == LET f == DelayedExpiryPublicationFixture910(FALSE) IN /\ DelayedExpiryPublicationValid910(f) /\ f.before.instances[6400].status="Pending" /\ f.window.members[6400].mandatory /\ f.after.instances[6400].status="Lost" /\ f.after.activationEpoch[ConditionalKey96(f.q.d)]=1 /\ f.after.effects=f.before.effects /\ f.registry.effects[6200].status="Expired" /\ f.afterWindow.pending={} /\ f.afterWindow.lostPending={6400} /\ f.afterWindow.members=f.window.members /\ f.afterWindow.open /\ ~ConditionalActive96(f.q.d,f.snapshot) /\ ~PublishLingeringActivity910(f.q.f.registry,f.registry,f.before,[f.after EXCEPT !.instances=f.before.instances],<>,<>, f.snapshot0,f.snapshot,f.world0,f.world) /\ ~PublishLingeringActivity910(f.q.f.registry,f.registry,f.before,f.after,<>,<>, f.snapshot0,f.snapshot,f.world0,f.world) DelayedDetachedExpiryChecks910 == LET f == DelayedExpiryPublicationFixture910(TRUE) q == f.q core == [f.after EXCEPT !.instances[6400].status="Complete"] world == [f.world EXCEPT !.id=32] afterSnapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(f.snapshot,core) EXCEPT !.id=32],f.registry,core,world) IN /\ DelayedExpiryPublicationValid910(f) /\ f.before.instances[6400].status="Resolving" /\ q.resolvingP.ability.detached /\ f.after.instances[6400]=f.before.instances[6400] /\ f.afterWindow=f.window /\ 1 \notin DOMAIN f.world.objects /\ ~LingeringObjectActive910(ObjectAbilitySource9(1),f.world) /\ ~ConditionalActive96(q.d,f.snapshot) /\ f.after.effects=f.before.effects /\ CarryDelayedLingeringInstruction910(f.registry,f.registry,f.after,core,core,core,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,SnapshotWithConditionalRegistry96(f.snapshot,f.after), afterSnapshot,f.world,world) /\ core.instances[6400].status="Complete" /\ core.effects=f.after.effects DelayedCompletionProofChecks910 == LET q == DelayedLifetimeResolutionFixture910(TRUE) world == [q.beforeWorld EXCEPT !.id=30] registry == LifetimeAfterObservationFixture910(q.f.registry,world) ledger == [q.retained EXCEPT !.activationEpoch=q.resolving.activationEpoch,!.activationSerial=q.resolving.activationSerial] snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(q.afterSnapshot,ledger) EXCEPT !.activationEpoch=ledger.activationEpoch,!.activationSerial=ledger.activationSerial],registry,ledger,world) IN /\ DelayedLifetimeResolutionValid910(q) /\ registry.effects[6200].status="Active" /\ ConditionalActive96(q.d,snapshot) /\ ~CarryDelayedLingeringInstruction910(q.f.registry,registry,q.resolving,q.core,q.retained,ledger,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,snapshot,q.beforeWorld,world) /\ ~CarryDelayedLingeringInstruction910(q.f.registry,q.f.registry,q.resolving,q.core,q.retained,q.complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld) /\ LET retained == [q.retained EXCEPT !.throttle=[key \in {ConditionalKey96(q.d)} |-> 999]] complete == [q.complete EXCEPT !.throttle=retained.throttle] IN ~CarryDelayedLingeringInstruction910(q.f.registry,q.expired,q.resolving,q.core,retained,complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld) /\ ~CarryDelayedLingeringInstruction910(q.f.registry,q.expired,q.resolving,q.core,q.retained,q.complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,q.afterSnapshot, [q.beforeWorld EXCEPT !.finishedDelayedEffects={999}],[q.afterWorld EXCEPT !.finishedDelayedEffects={999,6200}]) /\ \A step \in {[q.actualStep EXCEPT !.complete=FALSE],[q.actualStep EXCEPT !.instruction=701],[q.actualStep EXCEPT !.step="ForeignInstruction"]} : ~CarryDelayedLingeringInstruction910(q.f.registry,q.expired,q.resolving,q.core,q.retained,q.complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,step,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld) DelayedCreationBlueprintBindingChecks910 == LET f == DelayedLifetimeCreationFixture910("Specimen0117","Deployed",TimingRef9("Turn",10),NoTimingRef9,FALSE,NoTraversal6) changed == [f.blueprints EXCEPT ![6200].baseDuration=[kind |-> "DelayedResolution",effectId |-> 6200]] context == [f.context EXCEPT !.actualEffects[1].blueprints=changed] execution == [f.execution EXCEPT !.blueprints=changed] registry == [f.registry EXCEPT !.effects[6200]=NewLingeringEffect910(6200,changed[6200],context,1,f.world)] IN /\ DelayedLifetimeCreationValid910(f) /\ CreateLingeringEffectsCore910(NewLingeringRegistry910,registry,context,f.origin,1,execution,f.world) /\ DelayedLifetimeBound910(registry,f.created) /\ ~CreateDelayedLingering910(NewLingeringRegistry910,registry,f.s.before,f.created,6200,6300,f.s.template, context,f.origin,1,execution,f.s.creation,f.world,{6100}) DelayedExplicitNextOccurrenceChecks910 == LET q == DelayedLifetimeResolutionFixture910(FALSE) before == q.cleanupCandidate definitions == q.r.definitions objects == ReplacementOverlay99(q.cleanupSnapshot.objects,[id \in {21} |-> CardObject9("Specimen0079","Play",TRUE,"Up")]) begin == [SnapshotWithConditionalRegistry96(q.cleanupSnapshot,before) EXCEPT !.id=50,!.checkpointId=4,!.point="CheckpointBeginning",!.objects=objects, !.cardActivity=[id \in DOMAIN objects |-> ConditionalCardActivityFixture96(objects[id])],!.usedObjects=@ \cup {21}] current == [begin EXCEPT !.id=51,!.point="ProcedureCodee605a78f5d5e"] event == DelayedDeployEventFixture96(ConditionalEventFixture96(104,"Deployed",21,"SideB","SideB",q.cleanupSnapshot,6003),3) events == [id \in {104} |-> event] cp == ConditionalCheckpointFixture96(before,4,begin,current,events) key == [definition |-> ConditionalKey96(q.d),occurrence |-> 104] allocation == [k \in {key} |-> 6401] bindings == ConditionalBindingsFixture96({key},4,6503,65) after == ConditionalCommittedFixture96(before,definitions,cp,allocation,bindings,Empty9) IN /\ DelayedLifetimeResolutionValid910(q) /\ ProcessConditionalCheckpoint96(before,after,<>,<>,definitions,cp,DelayedConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{6502}) /\ after.instances[6400].status="Complete" /\ after.instances[6401].status="Pending" /\ after.instances[6401].activationEpoch=0 /\ after.effects=q.complete.effects DelayedFinishedHistoryBindingChecks910 == LET f == DelayedLifetimeCreationFixture910("Specimen0126","TurnEnds",NoTimingRef9,TimingRef9("Turn",10),FALSE,NoTraversal6) world == [f.world EXCEPT !.finishedDelayedEffects={6200}] registry == [f.registry EXCEPT !.effects=ObserveLingeringEffects910(@,world)] IN /\ DelayedLifetimeCreationValid910(f) /\ CreateLingeringEffectsCore910(NewLingeringRegistry910,registry,f.context,f.origin,1,f.execution,world) /\ registry.effects[6200].status="Expired" /\ ~CreateDelayedLingering910(NewLingeringRegistry910,registry,f.s.before,f.created,6200,6300,f.s.template, f.context,f.origin,1,f.execution,f.s.creation,world,{6100}) DelayedWorldProjectionBindingChecks910 == LET q == DelayedLifetimeResolutionFixture910(TRUE) added == ReplacementOverlay99(q.afterSnapshot.objects,[id \in {21} |-> CardObject9("Specimen0079","Play",TRUE,"Up")]) foreignObjects == [q.afterSnapshot EXCEPT !.objects=added,!.cardActivity=[id \in DOMAIN added |-> ConditionalCardActivityFixture96(added[id])]] IN /\ DelayedLifetimeResolutionValid910(q) /\ \A snapshot \in {foreignObjects,[q.afterSnapshot EXCEPT !.points["SideA"]=1], [q.afterSnapshot EXCEPT !.activity.activeRules={"ForeignRule"}],[q.afterSnapshot EXCEPT !.present=@ \cup {12345}]} : ~CarryDelayedLingeringInstruction910(q.f.registry,q.expired,q.resolving,q.core,q.retained,q.complete,<>,<>, q.resolvingP,q.completeP,q.resolvingPlan,q.completePlan,q.actualStep,q.beforeSnapshot,snapshot,q.beforeWorld,q.afterWorld) DelayedStatedDurationChecks910 == LET duration == [kind |-> "Stated",id |-> 7000,condition |-> "NextOwnDrawComplete",player |-> "SideB",createdBy |-> 6001] f == DelayedLifetimeCreationFixture910("Specimen0117","Deployed",duration,NoTimingRef9,FALSE,NoTraversal6) row == NewLingeringEffect910(6200,f.blueprints[6200],f.context,1,f.world) world == [f.world EXCEPT !.id=2,!.statedDurations=[id \in {6200} |-> [receipt |-> StatedDurationReceipt910(row,[f.world EXCEPT !.id=2]),active |-> TRUE]]] creationWorld == [world EXCEPT !.id=1,!.statedDurations[6200].receipt.snapshotId=1] registry == [f.registry EXCEPT !.effects=[id \in {6200} |-> row]] snapshot0 == LingeringConditionalSnapshot910(f.afterSnapshot,registry,f.created,world) expiredWorld == [world EXCEPT !.id=3,!.statedDurations[6200]=[receipt |-> StatedDurationReceipt910(row,[world EXCEPT !.id=3]),active |-> FALSE]] expired == LifetimeAfterObservationFixture910(registry,expiredWorld) after == [f.published EXCEPT !.activationEpoch=[key \in DOMAIN @ |-> 1],!.activationSerial=1] snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(snapshot0,f.published) EXCEPT !.id=3, !.activationEpoch=after.activationEpoch,!.activationSerial=1],expired,f.published,expiredWorld) againWorld == [expiredWorld EXCEPT !.id=4,!.statedDurations[6200]=[receipt |-> StatedDurationReceipt910(row,[world EXCEPT !.id=4]),active |-> TRUE]] IN /\ PublishCreatedDelayedLingering910(NewLingeringRegistry910,registry,f.s.before,f.created,f.published,<<>>,<<>>,f.s.initial, snapshot0,6200,6300,f.s.template,f.context,f.origin,1,f.execution,f.s.creation,creationWorld,{6100}) /\ registry.effects[6200].baseDuration.specification=duration /\ f.created.effects[6200].duration=duration /\ ConditionalActive96(f.created.effects[6200].definition,snapshot0) /\ PublishLingeringActivity910(registry,expired,f.published,after,<<>>,<<>>,snapshot0,snapshot,world,expiredWorld) /\ expired.effects[6200].status="Expired" /\ DOMAIN after.effects={6200} /\ ~ConditionalActive96(f.created.effects[6200].definition,snapshot) /\ LingeringBaseAlive910(row,againWorld) /\ ObserveLingeringEffects910(expired.effects,againWorld)=expired.effects /\ ActiveLingeringIds910(expired,againWorld)={} DelayedFullReturnFixture910 == LET q == DelayedLifetimeResolutionFixture910(TRUE) origin == [kind |-> "Instruction",plan |-> q.resolvingPlan,parent |-> q.resolvingP.ability,ruleStep |-> "NoValue"] effects == [id \in {1} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id,"ExposureMarkers",FALSE,0), [value |-> 1,baseOrigin |-> q.d.syntax.source,baseController |-> "SideB",actor |-> "SideB",targetSite |-> "NoValue",preventable |-> TRUE])] context == [id |-> 9900,imminenceId |-> 9901,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(q.resolvingPlan), currentWorld |-> q.beforeWorld.id,actualEffects |-> effects,initialRef |-> InstructionWindowRef93(q.imminentPlan),initialEffects |-> effects] recorded == [instruction |-> InstructionWindowRef93(q.imminentPlan),effects |-> ExpectedObservationSet99(effects)] beforeLedger == [q.resolving EXCEPT !.instances[6400].expected=[index \in {1} |-> recorded]] coreLedger == [q.core EXCEPT !.instances[6400].expected=beforeLedger.instances[6400].expected] retainedLedger == [q.retained EXCEPT !.instances[6400].expected=beforeLedger.instances[6400].expected] afterLedger == [q.complete EXCEPT !.instances[6400].expected=beforeLedger.instances[6400].expected] expected == [q.expected EXCEPT !.effects=ExpectedObservationSet99(effects)] returned == [context EXCEPT !.phase="Returned"] afterOrigin == [origin EXCEPT !.plan=q.completePlan,!.parent=q.completeP.ability] eager == [coreLedger EXCEPT !.activationEpoch=afterLedger.activationEpoch,!.activationSerial=afterLedger.activationSerial] eagerSnapshot == [SnapshotWithConditionalRegistry96(q.afterSnapshot,coreLedger) EXCEPT !.activationEpoch=eager.activationEpoch,!.activationSerial=eager.activationSerial] world == ReplacementOverlay99(q.beforeWorld,[tag |-> "CurrentInterruptWorld",conditional |-> q.beforeSnapshot, traversalControl |-> q.beforeWorld.control,controllers |-> [id \in DOMAIN q.beforeWorld.objects |-> q.beforeWorld.objects[id].side],activePeriods |-> Empty9]) actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> world.id,effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE] step == ReplacementOverlay99(q.actualStep,[expectedReturn |-> actualReturn]) call == [kind |-> "Conditional",before |-> q.resolvingP,after |-> q.completeP,beforePlan |-> q.resolvingPlan,afterPlan |-> q.completePlan, beforeLedger |-> beforeLedger,candidateLedger |-> coreLedger,afterLedger |-> eager,beforeStack |-> <>,afterStack |-> <>, step |-> step,beforeSnapshot |-> q.beforeSnapshot,afterSnapshot |-> eagerSnapshot] IN [q |-> q,origin |-> origin,effects |-> effects,context |-> context,returned |-> returned,afterOrigin |-> afterOrigin, eager |-> eager,eagerSnapshot |-> eagerSnapshot,world |-> world,actualReturn |-> actualReturn,call |-> call, beforeLedger |-> beforeLedger,coreLedger |-> coreLedger,retainedLedger |-> retainedLedger,afterLedger |-> afterLedger,expected |-> expected] DelayedFullReturnValid910(f,call,receipt) == LET q == f.q IN /\ DelayedLifetimeResolutionValid910(q) /\ ResolveConditionalWithoutInterrupt96(q.selected,f.beforeLedger,<>,q.imminentP,q.resolvingP,q.imminentPlan,q.resolvingPlan, NoModifiersFixture95(q.imminentPlan),InstructionClearanceFixture93(q.imminentPlan,0,0),f.expected) /\ ContextInitialObservationBound99(f.beforeLedger,q.resolvingP,f.context) /\ FinishExpectedDelayedInstruction910(q.f.registry,q.expired,f.context,f.returned,f.origin,f.afterOrigin,f.world,call, f.retainedLedger,f.afterLedger,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld,receipt) DelayedFullReturnChecks910 == LET f == DelayedFullReturnFixture910 IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ f.context.actualEffects[1].kind="ExposureMarkers" /\ f.context.actualEffects[1].value=1 /\ f.context.actualEffects[1].baseOrigin=ObjectAbilitySource9(1) /\ f.call.afterLedger.effects=Empty9 /\ f.q.complete.effects=f.q.resolving.effects /\ f.returned.phase="Returned" /\ ~f.q.completeP.ability.returned /\ \A receipt \in {[f.actualReturn EXCEPT !.tag="OtherReturn"],[f.actualReturn EXCEPT !.contextId=999], [f.actualReturn EXCEPT !.instruction.id=999],[f.actualReturn EXCEPT !.snapshotId=999], [f.actualReturn EXCEPT !.effects=Empty9],[f.actualReturn EXCEPT !.complete=FALSE],[f.actualReturn EXCEPT !.childrenReturned=FALSE]} : ~DelayedFullReturnValid910(f,[f.call EXCEPT !.step.expectedReturn=receipt],receipt) /\ ~DelayedFullReturnValid910(f,[f.call EXCEPT !.step.expectedReturn.contextId=999],f.actualReturn) DelayedFullReturnProjectionChecks910 == LET f == DelayedFullReturnFixture910 q == f.q IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ \A context \in {[f.context EXCEPT !.currentWorld=999],[f.context EXCEPT !.initialEffects=Empty9]} : ~FinishExpectedDelayedInstruction910(q.f.registry,q.expired,context,[context EXCEPT !.phase="Returned"],f.origin,f.afterOrigin,f.world,f.call, f.retainedLedger,f.afterLedger,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld,f.actualReturn) /\ ~FinishExpectedDelayedInstruction910(q.f.registry,q.expired,f.context,f.returned,f.origin,f.afterOrigin, [f.world EXCEPT !.conditional.id=999],f.call,f.retainedLedger,f.afterLedger,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld,f.actualReturn) DelayedNoGenericCompletionInjectionChecks910 == LET q == DelayedLifetimeResolutionFixture910(TRUE) proposed == [q.resolving EXCEPT !.activationEpoch=q.complete.activationEpoch,!.activationSerial=q.complete.activationSerial] snapshot == [q.afterSnapshot EXCEPT !.activity.instances=ConditionalActivityRows96(q.resolving.instances)] IN /\ DelayedLifetimeResolutionValid910(q) /\ ObserveLingering910(q.f.registry,q.expired,q.afterWorld) /\ ObserveConditionalActivity96(q.resolving,q.resolving,proposed,<>,<>,q.beforeSnapshot,snapshot) /\ ~PublishLingeringActivity910(q.f.registry,q.expired,q.resolving,proposed,<>,<>, q.beforeSnapshot,snapshot,q.beforeWorld,q.afterWorld) RuleLingeringSource910 == RuleAbilitySource9("StructuralLingeringCreation910") RuleLingeringCreationFixture910(blueprintSource,blueprintOrigin) == LET world10 == [LifetimeWorldFixture910 EXCEPT !.objects=Empty9,!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}] source == RuleLingeringSource910 owner == [windowId |-> 0,option |-> NoPriorityOption9,transaction |-> 0] plan == OpenInstruction93(91000,"Rule",0,source,"NoValue",0,source.rule,<<"CreateOrdinaryLingeringSpecimen0139">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] structure == [tag |-> "StructuralRuleProcedure",id |-> 91002,step |-> source.rule] entry == [tag |-> "ActualInstructionEntry",id |-> 91001,snapshotId |-> world10.id,kind |-> "Rule", beforePlan |-> plan,afterPlan |-> imminentPlan,stackBefore |-> <<>>,stackAfter |-> <<>>, ruleInvocation |-> 91003,ruleStep |-> source.rule,sourceProcedure |-> structure,owner |-> owner, targets |-> [InstructionTargetsFixture93(plan) EXCEPT !.targets={}]] snapshot == ConditionalSnapshotFixture96(world10.id,0,"ProcedureCodee605a78f5d5e",Empty9,world10.objects) ledger == NewConditionalLedger96(snapshot) world99 == [tag |-> "CurrentInterruptWorld",id |-> world10.id,turn |-> world10.turn,traversalControl |-> world10.control, objects |-> world10.objects,controllers |-> Empty9,activePeriods |-> Empty9,conditional |-> snapshot, paidDefinitions |-> Empty9,lexemes |-> Empty9,capabilities |-> Empty9,paidContexts |-> Empty9,turnUses |-> Empty9, replacementDefinitions |-> Empty9,liveReplacementIds |-> {},entries |-> [id \in {91001} |-> entry], ruleInvocations |-> [id \in {91003} |-> [tag |-> "ActualRuleInvocation",step |-> source.rule,returned |-> FALSE,structure |-> structure,owner |-> owner]]] blueprint == [BlueprintFixture910("Ordinary",BindTimingDuration910(TimingRef9("Turn",world10.turn.id),world10)) EXCEPT !.source=blueprintSource,!.originKind=blueprintOrigin,!.target=0,!.durationClass="Turn",!.choiceKey="NoValue"] blueprints == [id \in {7101} |-> blueprint] operation == [id |-> 1,kind |-> "CreateLingering",lineage |-> 1,actor |-> "SideB",targetSite |-> "NoValue",value |-> 0, baseController |-> "SideB",baseOrigin |-> source,targeted |-> FALSE,targetCard |-> 0,blueprints |-> blueprints] effects == [id \in {1} |-> operation] origin == [kind |-> "Instruction",plan |-> imminentPlan,parent |-> Empty9,ruleStep |-> source.rule] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> source, snapshotId |-> world99.id,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world99.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(91010,entry.id,origin,world99,description,effects,owner) registry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {91010} |-> context],!.entryIds={entry.id},!.usedContextIds={91010}] observation == InitialWouldObservation99(context,92000) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,observation) prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=91020,!.group=912] site == PrioritySite9("Turn",source.rule,world99.turn.phase,TimingRef9("TurnPhase",world10.turnPhase.id),world99.turn.owner, world99.turn.id,0,0,3,0,FALSE,ActualImminenceEntry99(entry,origin,world99,CardFacts9),~world99.turn.formalEnded) noWindow == [prepared EXCEPT !.phase="Cleared",!.site=site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomicPlan == [imminentPlan EXCEPT !.phase="Resolving"] atomicOrigin == [origin EXCEPT !.plan=atomicPlan] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] execution == [tag |-> "LingeringEffectExecution",contextId |-> atomic.id,instruction |-> atomic.currentRef,operation |-> 1, snapshotId |-> world10.id,source |-> source,blueprints |-> blueprints,carriedOut |-> TRUE] effect == NewLingeringEffect910(7101,blueprint,atomic,1,world10) after == [NewLingeringRegistry910 EXCEPT !.effects=[id \in {7101} |-> effect],!.usedEffects={7101}, !.creations={LingeringCreationKey910(atomic,1)}] IN [world10 |-> world10,world99 |-> world99,owner |-> owner,entry |-> entry,plan |-> plan,origin |-> origin,ledger |-> ledger, blueprint |-> blueprint,blueprints |-> blueprints,operation |-> operation,effects |-> effects,description |-> description,projection |-> projection, context |-> context,registry |-> registry,observation |-> observation,history |-> history,prepared |-> prepared,site |-> site, noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared,atomicPlan |-> atomicPlan,atomicOrigin |-> atomicOrigin, atomic |-> atomic,execution |-> execution,after |-> after] RuleLingeringPrefixValid910(s) == /\ s.world99.id=s.world10.id /\ s.world99.turn=s.world10.turn /\ s.world99.objects=s.world10.objects /\ s.world99.traversalControl.traversal=s.world10.control.traversal /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,91010,s.origin,s.world99,s.entry,s.description,s.projection,s.effects,s.owner, CardFacts9,NewWouldAccounting99,s.history,s.observation) /\ ApplyAutomaticReplacements99(s.context,s.context,s.origin,s.origin,s.world99,<>,<<>>,CardFacts9,s.history) /\ PrepareOpeningInterrupts99(s.context,s.prepared,s.ledger,s.ledger,s.origin,s.world99,s.history,91020,912,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(s.prepared,s.noWindow,s.origin,s.world99,s.history,s.ledger,<<>>,s.site,CardFacts9) /\ ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin,s.world99,s.history,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ BeginClearedRuleInstruction99(s.cleared,s.atomic,s.origin,s.atomicOrigin,s.world99,<<>>,s.clearance,s.atomicPlan) RuleLingeringCreationChecks910 == LET s == RuleLingeringCreationFixture910(RuleLingeringSource910,"Rule") replayBlueprint == s.blueprint replayBlueprints == [id \in {7102} |-> replayBlueprint] replayContext == [s.atomic EXCEPT !.actualEffects[1].blueprints=replayBlueprints] replayExecution == [s.execution EXCEPT !.blueprints=replayBlueprints] wrongBlueprintExecution == [s.execution EXCEPT !.blueprints[7101].value=3] wrongBlueprintAfter == [s.after EXCEPT !.effects[7101].value=3] replayAfter == [s.after EXCEPT !.effects=ReplacementOverlay99(@,[id \in {7102} |-> NewLingeringEffect910(id,replayBlueprint,replayContext,1,s.world10)]), !.usedEffects=@ \cup {7102}] IN /\ RuleLingeringPrefixValid910(s) /\ CreateLingeringEffects910(NewLingeringRegistry910,s.after,s.atomic,s.atomicOrigin,1,s.execution,s.world10) /\ s.after.effects[7101].source=RuleLingeringSource910 /\ s.after.effects[7101].originKind="Rule" /\ s.after.effects[7101].status="Active" /\ s.after.effects[7101].baseDuration=BindTimingDuration910(TimingRef9("Turn",s.world10.turn.id),s.world10) /\ s.context.initialRef.origin="Rule" /\ s.context.initialRef.abilityInstance=0 /\ s.context.initialRef.index=0 /\ LingeringCreationKey910(replayContext,1)=LingeringCreationKey910(s.atomic,1) /\ 7102 \notin s.after.usedEffects /\ ~CreateLingeringEffects910(s.after,replayAfter,replayContext,s.atomicOrigin,1,replayExecution,s.world10) /\ \A field \in {"contextId","operation","snapshotId"} : LET bad == [s.execution EXCEPT ![field]=IF field="contextId" THEN 91011 ELSE IF field="operation" THEN 2 ELSE 2] IN ~CreateLingeringEffects910(NewLingeringRegistry910,s.after,s.atomic,s.atomicOrigin,1,bad,s.world10) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,s.after,s.atomic,s.atomicOrigin,1,[s.execution EXCEPT !.source=ObjectAbilitySource9(1)],s.world10) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,s.after,s.atomic,s.atomicOrigin,1,[s.execution EXCEPT !.instruction.id=91004],s.world10) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,wrongBlueprintAfter,s.atomic,s.atomicOrigin,1,wrongBlueprintExecution,s.world10) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,s.after,s.atomic,s.atomicOrigin,1,[s.execution EXCEPT !.carriedOut=FALSE],s.world10) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,s.after,[s.atomic EXCEPT !.phase="Imminent"],s.atomicOrigin,1,s.execution,s.world10) /\ LET bad == RuleLingeringCreationFixture910(ObjectAbilitySource9(1),"Rule") IN /\ RuleLingeringPrefixValid910(bad) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,bad.after,bad.atomic,bad.atomicOrigin,1,bad.execution,bad.world10) /\ LET bad == RuleLingeringCreationFixture910(RuleLingeringSource910,"Paid") IN /\ RuleLingeringPrefixValid910(bad) /\ ~CreateLingeringEffects910(NewLingeringRegistry910,bad.after,bad.atomic,bad.atomicOrigin,1,bad.execution,bad.world10) LingeringCleanupWorldChecks910 == LET q == DelayedLifetimeResolutionFixture910(TRUE) added == ReplacementOverlay99(q.cleanupSnapshot.objects,[id \in {21} |-> CardObject9("Specimen0079","Play",TRUE,"Up")]) foreignObjects == [q.cleanupSnapshot EXCEPT !.objects=added,!.cardActivity=[id \in DOMAIN added |-> ConditionalCardActivityFixture96(added[id])]] IN /\ DelayedLifetimeResolutionValid910(q) /\ \A snapshot \in {foreignObjects,[q.cleanupSnapshot EXCEPT !.points["SideA"]=1], [q.cleanupSnapshot EXCEPT !.activity.activeRules={"ForeignRule"}],[q.cleanupSnapshot EXCEPT !.present=@ \cup {12345}]} : ~CleanupLingeringConditionals910(q.expired,q.cleanedRegistry,q.received3,q.cleanupCandidate,q.cleanupCandidate,<>,<>, SnapshotWithConditionalRegistry96(q.cp3.processingSnapshot,q.received3),snapshot,q.cleanupWorld,q.frame,q.returnedFrame,q.cleanup) FrontierExampleFamily018Fixture910(withSpecimen0139) == LET s == ChoiceFixture910("Specimen0088",2,"ChosenBarrier",FALSE,FALSE,{}, {902},LifetimeWorldFixture910) w == s.world NeutralValue00012 == [BlueprintFixture910("Ordinary",BindTimingDuration910(TimingRef9("Turn",w.turn.id),w)) EXCEPT !.originKind="Conditional",!.choiceKey="NoValue",!.target=0,!.durationClass="Turn"] blueprints == IF withSpecimen0139 THEN [id \in {801,802} |-> IF id=801 THEN s.blueprint ELSE NeutralValue00012] ELSE [id \in {801} |-> s.blueprint] creation == ExtensionCreationFromFixture910(ObjectAbilitySource9(1),"Conditional",blueprints,w) down == [w EXCEPT !.id=2,!.objects[1].face="Down"] up == [down EXCEPT !.id=3,!.objects[1].face="Up"] downEvents == {[tag |-> "TurnFacedown",object |-> 1]} upEvents == {[tag |-> "TurnFaceup",object |-> 1]} a1 == NewLifetimeAuthority910(w) t12 == LifetimeFaceTransition910(w,down,1,"Down",TRUE,downEvents) a2 == LifetimeAuthorityAfter910(a1,t12) t23 == LifetimeFaceTransition910(down,up,1,"Up",TRUE,upEvents) a3 == LifetimeAuthorityAfter910(a2,t23) opened == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(a1,1)]) r1 == ReplacementOverlay99(creation.registry,[frontier |-> LifetimeFrontier910(a1,1)]) r2 == [r1 EXCEPT !.effects=ObserveLingeringEffects910(@,down),!.frontier=LifetimeFrontier910(a3,2)] r3 == [r2 EXCEPT !.effects=ObserveLingeringEffects910(@,up),!.frontier=LifetimeFrontier910(a3,3)] skipped == [r1 EXCEPT !.frontier=LifetimeFrontier910(a3,3)] IN [source |-> ObjectAbilitySource9(1),w |-> w,down |-> down,up |-> up,creation |-> creation, downEvents |-> downEvents,upEvents |-> upEvents,a1 |-> a1,a2 |-> a2,a3 |-> a3,t12 |-> t12,t23 |-> t23, opened |-> opened,r1 |-> r1,r2 |-> r2,r3 |-> r3,skipped |-> skipped] FrontierChoiceReceipt910(world,values) == [tag |-> "CurrentRememberedChoices",worldId |-> world.id,source |-> ObjectAbilitySource9(1),key |-> "ChosenBarrier",values |-> values] FrontierExampleFamily018CreationValid910(s) == /\ ExtensionCreationValid910(s.creation,s.w) /\ OpenObservedLingering910(s.a1,s.opened) /\ CreateObservedLingeringEffects910(s.opened,s.r1,s.creation.context,s.creation.c.origin,1,s.creation.execution,s.a1) FrontierFaceJournalChecks910 == LET s == FrontierExampleFamily018Fixture910(FALSE) wrongNext == LifetimeAuthorityAfter910(s.a1,s.t23) fakeFace == LifetimeFaceTransition910(s.w,s.up,1,"Up",TRUE,s.upEvents) fakeAfter == LifetimeAuthorityAfter910(s.a1,fakeFace) IN /\ FrontierExampleFamily018CreationValid910(s) /\ TurnSideBFace8(s.w.objects,s.down.objects,1,"Down",TRUE,s.downEvents) /\ TurnSideBFace8(s.down.objects,s.up.objects,1,"Up",TRUE,s.upEvents) /\ CommitLifetimeFace910(s.a1,s.a2,s.down,1,"Down",TRUE,s.downEvents) /\ CommitLifetimeFace910(s.a2,s.a3,s.up,1,"Up",TRUE,s.upEvents) /\ LifetimeAuthorityValid910(s.a3) /\ s.a3.order= <<1,2,3>> /\ s.a3.worlds[1]=s.a1.current /\ s.a3.transitions[2]=s.t12 /\ s.a3.transitions[3]=s.t23 /\ LifetimeTransitionValid910(s.t23) /\ ~AppendLifetimeTransitionCore910(s.a1,wrongNext,s.t23) /\ ~CommitLifetimeFace910(s.a1,fakeAfter,s.up,1,"Up",TRUE,s.upEvents) /\ ~LifetimeTransitionValid910(fakeFace) /\ ~OpenObservedLingering910(s.a3,s.r1) FrontierSequentialPublicationChecks910 == LET s == FrontierExampleFamily018Fixture910(FALSE) jumpWithCorrectExpiry == [s.r2 EXCEPT !.frontier=LifetimeFrontier910(s.a3,3)] IN /\ FrontierExampleFamily018CreationValid910(s) /\ CommitLifetimeFace910(s.a1,s.a2,s.down,1,"Down",TRUE,s.downEvents) /\ CommitLifetimeFace910(s.a2,s.a3,s.up,1,"Up",TRUE,s.upEvents) /\ s.r1.effects[801].status="Active" /\ PublishNextLifetime910(s.r1,s.r2,s.a3) /\ s.r2.frontier.position=2 /\ s.r2.effects[801].status="Expired" /\ DOMAIN s.r2.effects={801} /\ ~LifetimeReady910(s.r2,s.a3) /\ PublishNextLifetime910(s.r2,s.r3,s.a3) /\ s.r3.frontier.position=3 /\ s.r3.effects[801].status="Expired" /\ LifetimeReady910(s.r3,s.a3) /\ s.r3.usedEffects=s.r1.usedEffects /\ s.r3.creations=s.r1.creations /\ ~PublishNextLifetime910(s.r1,jumpWithCorrectExpiry,s.a3) /\ ~PublishNextLifetime910(s.r1,s.skipped,s.a3) /\ ~PublishNextLifetime910(s.r3,s.r3,s.a3) FrontierReadBarrierChecks910 == LET s == FrontierExampleFamily018Fixture910(FALSE) initial == FrontierChoiceReceipt910(s.w,{2}) stale == FrontierChoiceReceipt910(s.up,{2}) expired == FrontierChoiceReceipt910(s.up,{}) IN /\ FrontierExampleFamily018CreationValid910(s) /\ ReadRememberedChoices910(s.r1,s.a1,s.source,"ChosenBarrier",initial) /\ ObserveLingering910(s.r1,s.r1,s.up) /\ RememberedChoices910(s.r1,s.up,s.source,"ChosenBarrier")={2} /\ ~LifetimeReady910(s.r1,s.a3) /\ ~ReadRememberedChoices910(s.r1,s.a3,s.source,"ChosenBarrier",stale) /\ ~ReadRememberedChoices910(s.r2,s.a3,s.source,"ChosenBarrier",expired) /\ ReadRememberedChoices910(s.r3,s.a3,s.source,"ChosenBarrier",expired) /\ ~ReadRememberedChoices910(s.r3,s.a3,s.source,"ChosenBarrier",stale) FrontierOrdinaryIndependenceChecks910 == LET s == FrontierExampleFamily018Fixture910(TRUE) active == [tag |-> "CurrentActiveLingeringEffects",worldId |-> 3,ids |-> {802}] IN /\ FrontierExampleFamily018CreationValid910(s) /\ CommitLifetimeFace910(s.a1,s.a2,s.down,1,"Down",TRUE,s.downEvents) /\ CommitLifetimeFace910(s.a2,s.a3,s.up,1,"Up",TRUE,s.upEvents) /\ PublishNextLifetime910(s.r1,s.r2,s.a3) /\ s.r2.effects[801].status="Expired" /\ s.r2.effects[802].status="Active" /\ PublishNextLifetime910(s.r2,s.r3,s.a3) /\ s.r3.effects[801].status="Expired" /\ s.r3.effects[802].status="Active" /\ ReadActiveLingering910(s.r3,s.a3,active) /\ ReadRememberedChoices910(s.r3,s.a3,s.source,"ChosenBarrier",FrontierChoiceReceipt910(s.up,{})) FrontierSkipCannotResyncChecks910 == LET s == FrontierExampleFamily018Fixture910(FALSE) IN /\ FrontierExampleFamily018CreationValid910(s) /\ CommitLifetimeFace910(s.a1,s.a2,s.down,1,"Down",TRUE,s.downEvents) /\ CommitLifetimeFace910(s.a2,s.a3,s.up,1,"Up",TRUE,s.upEvents) /\ LifetimeAuthorityValid910(s.a3) /\ ObserveLingering910(s.r1,s.r1,s.up) /\ RememberedChoices910(s.r1,s.up,s.source,"ChosenBarrier")={2} /\ ~PublishNextLifetime910(s.r1,s.skipped,s.a3) ObservedKernelFixture910(world) == LET a == NewLifetimeAuthority910(world) changed == [LifetimeWorldProjection910(world) EXCEPT !.id=@+100,!.points["SideA"]=@+1] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 98001,snapshotId |-> changed.id, source |-> RuleAbilitySource9("StructuralCharacteristicEvaluation910")] transition == LifetimeKernelTransition910(world,changed,execution) IN [before |-> a,world |-> changed,execution |-> execution,transition |-> transition,after |-> LifetimeAuthorityAfter910(a,transition)] ObservedWithFrontier910(registry,a,position) == ReplacementOverlay99(registry,[frontier |-> LifetimeFrontier910(a,position)]) ObservedRuleCreatorFixture910(world) == LET source == RuleAbilitySource9("StructuralObservedCreation910") plan == OpenInstruction93(98010,"Rule",0,source,"NoValue",0,source.rule,<<"CreateOrdinarySpecimen0139">>,FALSE) announced == [plan EXCEPT !.announced=TRUE] imminent == [announced EXCEPT !.phase="Imminent"] resolving == [imminent EXCEPT !.phase="Resolving"] blueprint == [BlueprintFixture910("Ordinary",BindTimingDuration910(TimingRef9("Turn",world.turn.id),world)) EXCEPT !.source=source,!.originKind="Rule",!.durationClass="Turn"] blueprints == [id \in {98011} |-> blueprint] context == [id |-> 98012,imminenceId |-> 98013,currentRef |-> InstructionWindowRef93(resolving),currentWorld |-> world.id, phase |-> "Resolving",actualEffects |-> [id \in {1} |-> [kind |-> "CreateLingering",blueprints |-> blueprints]]] origin == [kind |-> "Instruction",plan |-> resolving,parent |-> Empty9,ruleStep |-> source.rule] receipt == [tag |-> "LingeringEffectExecution",contextId |-> context.id,instruction |-> context.currentRef,operation |-> 1, snapshotId |-> world.id,source |-> source,blueprints |-> blueprints,carriedOut |-> TRUE] IN [plan |-> plan,announced |-> announced,imminent |-> imminent,resolving |-> resolving,context |-> context,origin |-> origin,receipt |-> receipt] ObservedRuleCreatorValid910(c) == /\ AnnounceInstructionTargets93(c.plan,c.announced,[InstructionTargetsFixture93(c.plan) EXCEPT !.targets={}],Empty9,c.origin.ruleStep) /\ EnterRuleInstruction93(c.announced,c.imminent,c.origin.ruleStep) /\ NoInstructionInterrupt93(c.imminent,Empty9,c.origin.ruleStep,NoModifiersFixture95(c.imminent),InstructionClearanceFixture93(c.imminent,0,0)) /\ BeginRuleInstructionAtomic93(c.imminent,c.resolving,c.origin.ruleStep,InstructionClearanceFixture93(c.imminent,0,0)) ObservedCreationBarrierChecks910 == LET k == ObservedKernelFixture910(LifetimeWorldFixture910) opened == ObservedWithFrontier910(NewLingeringRegistry910,k.before,1) c == ObservedRuleCreatorFixture910(k.world) row == NewLingeringEffect910(98011,c.receipt.blueprints[98011],c.context,1,k.world) after == [opened EXCEPT !.effects=[id \in {98011} |-> row],!.usedEffects={98011},!.creations={LingeringCreationKey910(c.context,1)}] caught == [opened EXCEPT !.frontier=LifetimeFrontier910(k.after,2)] createdCurrent == [after EXCEPT !.frontier=caught.frontier] IN /\ CommitLifetimeKernelCore910(k.before,k.after,k.world,k.execution) /\ OpenObservedLingering910(k.before,opened) /\ ObservedRuleCreatorValid910(c) /\ CreateLingeringEffects910(opened,after,c.context,c.origin,1,c.receipt,k.world) /\ ~CreateObservedLingeringEffects910(opened,after,c.context,c.origin,1,c.receipt,k.after) /\ PublishNextLifetime910(opened,caught,k.after) /\ CreateObservedLingeringEffects910(caught,createdCurrent,c.context,c.origin,1,c.receipt,k.after) /\ ReadActiveLingering910(createdCurrent,k.after,[tag |-> "CurrentActiveLingeringEffects",worldId |-> k.world.id,ids |-> {98011}]) /\ ~OpenObservedLingering910(k.after,ObservedWithFrontier910(NewLingeringRegistry910,k.after,2)) ObservedCleanupBarrierChecks910 == LET s == CleanupFixture910 k == ObservedKernelFixture910(s.world) before == ObservedWithFrontier910(s.before,k.before,1) initial == ConditionalSnapshotFixture96(98020,0,"ProcedureCodee605a78f5d5e",Empty9,k.world.objects) ledger0 == NewConditionalLedger96(initial) snapshot == [ConditionalSnapshotFixture96(k.world.id,51,"ProcedureCodee605a78f5d5e",Empty9,k.world.objects) EXCEPT !.points=k.world.points] cp == ConditionalCheckpointFixture96(ledger0,51,[snapshot EXCEPT !.point="CheckpointBeginning"],snapshot,Empty9) ledger == ConditionalCommittedFixture96(ledger0,Empty9,cp,Empty9,Empty9,Empty9) frame == LingeringCheckpointFrame910(ledger,cp,k.world) receipt == [tag |-> "LingeringCheckpointCleanup",frame |-> frame,expired |-> {800},complete |-> TRUE] after == [before EXCEPT !.effects=[id \in {801} |-> before.effects[id]],!.cleanupIds={51}] returned == [frame EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"] caught == [before EXCEPT !.frontier=LifetimeFrontier910(k.after,2)] IN /\ CommitLifetimeKernelCore910(k.before,k.after,k.world,k.execution) /\ ProcessConditionalCheckpoint99(ledger0,ledger,<<>>,<<>>,Empty9,Empty9,cp,Empty9,Empty9,Empty9,Empty9,Empty9,{},CardFacts9) /\ CleanupLingering910(before,after,ledger,k.world,frame,returned,receipt) /\ ~CleanupObservedLingering910(before,after,ledger,k.after,frame,returned,receipt) /\ PublishNextLifetime910(before,caught,k.after) /\ CleanupObservedLingering910(caught,[after EXCEPT !.frontier=caught.frontier],ledger,k.after,frame,returned,receipt) ObservedDelayedPublicationChecks910 == LET f == DelayedExpiryPublicationFixture910(FALSE) a == NewLifetimeAuthority910(f.world0) execution == [tag |-> "ActualTimingTransition",id |-> 98030,snapshotId |-> f.world.id,source |-> RuleAbilitySource9("ProcedureCode8f113080e47f")] authority == LifetimeAuthorityAfter910(a,LifetimeKernelTransition910(f.world0,f.world,execution)) before == ObservedWithFrontier910(f.q.f.registry,a,1) after == ObservedWithFrontier910(f.registry,authority,2) IN /\ DelayedExpiryPublicationValid910(f) /\ CommitLifetimeKernelCore910(a,authority,f.world,execution) /\ PublishNextLingeringActivity910(before,after,f.before,f.after,<>,<>,f.snapshot0,f.snapshot,authority) /\ f.after.instances[6400].status="Lost" /\ f.after.activationEpoch[ConditionalKey96(f.q.d)]=1 /\ LifetimeReady910(after,authority) /\ ReadActiveLingering910(after,authority,[tag |-> "CurrentActiveLingeringEffects",worldId |-> f.world.id,ids |-> {}]) /\ ~ReadActiveLingering910(before,authority,[tag |-> "CurrentActiveLingeringEffects",worldId |-> f.world.id,ids |-> {}]) /\ ~PublishNextLifetime910(before,after,authority) ObservedDelayedCreationChecks910 == LET f == DelayedLifetimeCreationFixture910("Specimen0126","TurnEnds",NoTimingRef9,TimingRef9("Turn",10),FALSE,NoTraversal6) a == NewLifetimeAuthority910(f.world) before == ObservedWithFrontier910(NewLingeringRegistry910,a,1) after == ObservedWithFrontier910(f.registry,a,1) IN /\ OpenObservedLingering910(a,before) /\ PublishCreatedObservedDelayedLingering910(before,after,f.s.before,f.created,f.published,<<>>,<<>>,f.s.initial, f.afterSnapshot,6200,6300,f.s.template,f.context,f.origin,1,f.execution,f.s.creation,a,{6100}) /\ ReadActiveLingering910(after,a,[tag |-> "CurrentActiveLingeringEffects",worldId |-> f.world.id,ids |-> {6200}]) ObservedDelayedReturnChecks910 == LET f == DelayedFullReturnFixture910 q == f.q a == NewLifetimeAuthority910(q.beforeWorld) execution == [tag |-> "ActualDelayedReturn",id |-> f.context.id,snapshotId |-> q.afterWorld.id, source |-> f.origin.plan.source,instruction |-> f.context.currentRef,return |-> f.actualReturn] authority == LifetimeAuthorityAfter910(a,LifetimeKernelTransition910(q.beforeWorld,q.afterWorld,execution)) before == ObservedWithFrontier910(q.f.registry,a,1) after == ObservedWithFrontier910(q.expired,authority,2) IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ FinishObservedExpectedDelayedInstruction910(before,after,f.context,f.returned,f.origin,f.afterOrigin,f.world,f.call, f.retainedLedger,f.afterLedger,q.beforeSnapshot,q.afterSnapshot,a,authority,f.actualReturn) /\ f.afterLedger.effects=f.beforeLedger.effects /\ after.effects[6200].status="Expired" /\ LifetimeReady910(after,authority) /\ after.frontier.world.finishedDelayedEffects={6200} ObservedDelayedCreationStaleChecks910 == LET f == DelayedLifetimeCreationFixture910("Specimen0126","TurnEnds",NoTimingRef9,TimingRef9("Turn",10),FALSE,NoTraversal6) old == [f.world EXCEPT !.id=98100] initial == NewLifetimeAuthority910(old) execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 98101,snapshotId |-> f.world.id,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(initial,LifetimeKernelTransition910(old,f.world,execution)) before == ObservedWithFrontier910(NewLingeringRegistry910,initial,1) after == ObservedWithFrontier910(f.registry,initial,1) caught == [before EXCEPT !.frontier=LifetimeFrontier910(authority,2)] IN /\ DelayedLifetimeCreationValid910(f) /\ CommitLifetimeKernelCore910(initial,authority,f.world,execution) /\ PublishCreatedDelayedLingering910(before,after,f.s.before,f.created,f.published,<<>>,<<>>,f.s.initial, f.afterSnapshot,6200,6300,f.s.template,f.context,f.origin,1,f.execution,f.s.creation,f.world,{6100}) /\ ~PublishCreatedObservedDelayedLingering910(before,after,f.s.before,f.created,f.published,<<>>,<<>>,f.s.initial, f.afterSnapshot,6200,6300,f.s.template,f.context,f.origin,1,f.execution,f.s.creation,authority,{6100}) /\ PublishNextLifetime910(before,caught,authority) /\ PublishCreatedObservedDelayedLingering910(caught,[after EXCEPT !.frontier=caught.frontier],f.s.before,f.created,f.published,<<>>,<<>>,f.s.initial, f.afterSnapshot,6200,6300,f.s.template,f.context,f.origin,1,f.execution,f.s.creation,authority,{6100}) ObservedDelayedReturnStaleChecks910 == LET f == DelayedFullReturnFixture910 q == f.q old == [q.beforeWorld EXCEPT !.id=98110] initial == NewLifetimeAuthority910(old) evaluate == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 98111,snapshotId |-> q.beforeWorld.id,source |-> RuleAbilitySource9("StructuralSnapshot910")] beforeAuthority == LifetimeAuthorityAfter910(initial,LifetimeKernelTransition910(old,q.beforeWorld,evaluate)) finish == [tag |-> "ActualDelayedReturn",id |-> f.context.id,snapshotId |-> q.afterWorld.id, source |-> f.origin.plan.source,instruction |-> f.context.currentRef,return |-> f.actualReturn] afterAuthority == LifetimeAuthorityAfter910(beforeAuthority,LifetimeKernelTransition910(q.beforeWorld,q.afterWorld,finish)) before == ObservedWithFrontier910(q.f.registry,initial,1) localAfter == ObservedWithFrontier910(q.expired,initial,1) after == ObservedWithFrontier910(q.expired,afterAuthority,3) IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ CommitLifetimeKernelCore910(initial,beforeAuthority,q.beforeWorld,evaluate) /\ FinishExpectedDelayedInstruction910(before,localAfter,f.context,f.returned,f.origin,f.afterOrigin,f.world,f.call, f.retainedLedger,f.afterLedger,q.beforeSnapshot,q.afterSnapshot,q.beforeWorld,q.afterWorld,f.actualReturn) /\ ~FinishObservedExpectedDelayedInstruction910(before,after,f.context,f.returned,f.origin,f.afterOrigin,f.world,f.call, f.retainedLedger,f.afterLedger,q.beforeSnapshot,q.afterSnapshot,beforeAuthority,afterAuthority,f.actualReturn) ObservedDelayedCleanupStaleChecks910 == LET f == DelayedFullReturnFixture910 q == f.q initial == NewLifetimeAuthority910(q.afterWorld) execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 98120,snapshotId |-> q.cleanupWorld.id,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(initial,LifetimeKernelTransition910(q.afterWorld,q.cleanupWorld,execution)) before == ObservedWithFrontier910(q.expired,initial,1) received == ConditionalCommittedFixture96(f.afterLedger,q.r.definitions,q.cp3,Empty9,Empty9,Empty9) candidate == [received EXCEPT !.effects=Empty9] after == ObservedWithFrontier910(q.cleanedRegistry,initial,1) caught == [before EXCEPT !.frontier=LifetimeFrontier910(authority,2)] start == SnapshotWithConditionalRegistry96(q.cp3.processingSnapshot,received) IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ CommitLifetimeKernelCore910(initial,authority,q.cleanupWorld,execution) /\ ProcessConditionalCheckpoint96(f.afterLedger,received,<>,<>,q.r.definitions,q.cp3, ConditionalConditionsFixture96(q.r.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{6502}) /\ CleanupLingeringConditionals910(before,after,received,candidate,candidate,<>,<>, start,q.cleanupSnapshot,q.cleanupWorld,q.frame,q.returnedFrame,q.cleanup) /\ ~CleanupObservedLingeringConditionals910(before,after,received,candidate,candidate,<>,<>, start,q.cleanupSnapshot,authority,q.frame,q.returnedFrame,q.cleanup) /\ PublishNextLingeringActivity910(before,caught,received,received,<>,<>,q.afterSnapshot,start,authority) /\ CleanupObservedLingeringConditionals910(caught,[after EXCEPT !.frontier=caught.frontier],received,candidate,candidate,<>,<>, start,q.cleanupSnapshot,authority,q.frame,q.returnedFrame,q.cleanup) ObservedKernelScopeChecks910 == LET w == LifetimeWorldFixture910 k == ObservedKernelFixture910(w) faceDown == [LifetimeWorldProjection910(w) EXCEPT !.id=98200,!.objects[1].face="Down"] bad == LifetimeKernelTransition910(w,faceDown,[k.execution EXCEPT !.snapshotId=98200]) wrongReceipt == [k.transition EXCEPT !.receipt.before.id=999] wrongExecution == [k.transition EXCEPT !.receipt.execution.snapshotId=999] wrongPhysical == LifetimeAuthorityAfter910(k.before,bad) IN /\ TurnSideBFace8(w.objects,faceDown.objects,1,"Down",TRUE,{[tag |-> "TurnFacedown",object |-> 1]}) /\ ~LifetimeTransitionValid910(bad) /\ ~CommitLifetimeKernelCore910(k.before,wrongPhysical,faceDown,[k.execution EXCEPT !.snapshotId=98200]) /\ ~LifetimeTransitionValid910(wrongReceipt) /\ ~LifetimeTransitionValid910(wrongExecution) /\ LifetimeAuthorityValid910(k.after) ObservedResolvingContextChecks910 == LET f == DelayedFullReturnFixture910 q == f.q a == NewLifetimeAuthority910(q.beforeWorld) next == [LifetimeWorldProjection910(q.beforeWorld) EXCEPT !.id=98210] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 98211,snapshotId |-> next.id,source |-> RuleAbilitySource9("StructuralNestedObservation910")] authority == LifetimeAuthorityAfter910(a,LifetimeKernelTransition910(q.beforeWorld,next,execution)) before == ObservedWithFrontier910(q.f.registry,a,1) caught == [before EXCEPT !.frontier=LifetimeFrontier910(authority,2)] snapshot == [q.beforeSnapshot EXCEPT !.id=next.id] context == [f.context EXCEPT !.currentWorld=next.id] IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ CommitLifetimeKernelCore910(a,authority,next,execution) /\ ~ObserveResolvingLifetimeContext910(f.context,context,before,authority,f.origin) /\ PublishNextLingeringActivity910(before,caught,f.beforeLedger,f.beforeLedger,<>,<>,q.beforeSnapshot,snapshot,authority) /\ ObserveResolvingLifetimeContext910(f.context,context,caught,authority,f.origin) /\ context.initialRef=f.context.initialRef /\ context.initialEffects=f.context.initialEffects /\ context.actualEffects=f.context.actualEffects /\ context.currentRef=f.context.currentRef /\ ~ObserveResolvingLifetimeContext910([f.context EXCEPT !.currentWorld=999],context,caught,authority,f.origin) /\ ~ObserveResolvingLifetimeContext910(f.context,[context EXCEPT !.actualEffects=Empty9],caught,authority,f.origin) ObservedResolvingReturnAfterJournalChecks910 == LET f == DelayedFullReturnFixture910 q == f.q a == NewLifetimeAuthority910(q.beforeWorld) next == [LifetimeWorldProjection910(q.beforeWorld) EXCEPT !.id=98210] evaluate == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 98211,snapshotId |-> next.id,source |-> RuleAbilitySource9("StructuralNestedObservation910")] authority == LifetimeAuthorityAfter910(a,LifetimeKernelTransition910(q.beforeWorld,next,evaluate)) before == ObservedWithFrontier910(q.f.registry,a,1) caught == [before EXCEPT !.frontier=LifetimeFrontier910(authority,2)] snapshot == [q.beforeSnapshot EXCEPT !.id=next.id] context == [f.context EXCEPT !.currentWorld=next.id] receipt == [f.actualReturn EXCEPT !.snapshotId=next.id] world == [f.world EXCEPT !.id=next.id,!.conditional=snapshot] call == [f.call EXCEPT !.beforeSnapshot=snapshot,!.step.expectedReturn=receipt] execution == [tag |-> "ActualDelayedReturn",id |-> context.id,snapshotId |-> q.afterWorld.id, source |-> f.origin.plan.source,instruction |-> context.currentRef,return |-> receipt] finishedAuthority == LifetimeAuthorityAfter910(authority,LifetimeKernelTransition910(next,q.afterWorld,execution)) finished == ObservedWithFrontier910(q.expired,finishedAuthority,3) IN /\ DelayedFullReturnValid910(f,f.call,f.actualReturn) /\ CommitLifetimeKernelCore910(a,authority,next,evaluate) /\ PublishNextLingeringActivity910(before,caught,f.beforeLedger,f.beforeLedger,<>,<>,q.beforeSnapshot,snapshot,authority) /\ ObserveResolvingLifetimeContext910(f.context,context,caught,authority,f.origin) /\ FinishObservedExpectedDelayedInstruction910(caught,finished,context,[context EXCEPT !.phase="Returned"],f.origin,f.afterOrigin,world,call, f.retainedLedger,f.afterLedger,snapshot,q.afterSnapshot,authority,finishedAuthority,receipt) /\ LifetimeReady910(finished,finishedAuthority) /\ finished.effects[6200].status="Expired" /\ f.afterLedger.effects=f.beforeLedger.effects /\ ~q.completeP.ability.returned ObservedAuthoritativeHeadChecks910 == LET s == FrontierExampleFamily018Fixture910(FALSE) omittedJournal == [s.a1 EXCEPT !.current=LifetimeWorldProjection910(s.up)] IN /\ FrontierExampleFamily018CreationValid910(s) /\ CommitLifetimeFace910(s.a1,s.a2,s.down,1,"Down",TRUE,s.downEvents) /\ CommitLifetimeFace910(s.a2,s.a3,s.up,1,"Up",TRUE,s.upEvents) /\ ~LifetimeAuthorityValid910(omittedJournal) /\ ~ReadRememberedChoices910(s.r1,omittedJournal,s.source,"ChosenBarrier",FrontierChoiceReceipt910(s.up,{2})) LingeringChecks9 == /\ ExtensionNaArithmeticChecks910 /\ ExtensionGebrExpiryChecks910 /\ ExtensionStaticDurationChecks910 /\ ExtensionSpecimen0177FollowChecks910 /\ ExtensionAbsentEncounterChecks910 /\ ExtensionOtherSourceDurationChecks910 /\ ExtensionChecks910 /\ LifetimeTimingChecks910 /\ LifetimeSourceChecks910 /\ LifetimeTypedBoundaryChecks910 /\ LifetimeItemInspectionInspectionEndChecks910 /\ LifetimeImplicitOtherTargetChecks910 /\ LifetimeBirthMaintenanceChecks910 /\ LifetimeMultipleConsumerBoundaryChecks910 /\ Specimen0214ChoicesChecks910 /\ ExampleFamily018ChoicesChecks910 /\ ChoicePolicyPrecedenceChecks910 /\ ExampleFamily055ReplacementLifetimeChecks910 /\ CleanupCheckpointChecks910 /\ CleanupProfileChecks910 /\ CleanupWorldSnapshotChecks910 /\ DelayedLifetimeCreationChecks910 /\ DelayedLifetimeNoTraversalChecks910 /\ DelayedLifetimeAbsentTimingChecks910 /\ DelayedUntilResolutionCarryChecks910 /\ DelayedExplicitRepeatCarryChecks910 /\ DelayedPendingExpiryChecks910 /\ DelayedDetachedExpiryChecks910 /\ DelayedCompletionProofChecks910 /\ DelayedCreationBlueprintBindingChecks910 /\ DelayedExplicitNextOccurrenceChecks910 /\ DelayedFinishedHistoryBindingChecks910 /\ DelayedWorldProjectionBindingChecks910 /\ DelayedStatedDurationChecks910 /\ DelayedFullReturnChecks910 /\ DelayedFullReturnProjectionChecks910 /\ DelayedNoGenericCompletionInjectionChecks910 /\ RuleLingeringCreationChecks910 /\ LingeringCleanupWorldChecks910 /\ FrontierFaceJournalChecks910 /\ FrontierSequentialPublicationChecks910 /\ FrontierReadBarrierChecks910 /\ FrontierOrdinaryIndependenceChecks910 /\ FrontierSkipCannotResyncChecks910 /\ ObservedCreationBarrierChecks910 /\ ObservedCleanupBarrierChecks910 /\ ObservedDelayedPublicationChecks910 /\ ObservedDelayedCreationChecks910 /\ ObservedDelayedReturnChecks910 /\ ObservedDelayedCreationStaleChecks910 /\ ObservedDelayedReturnStaleChecks910 /\ ObservedDelayedCleanupStaleChecks910 /\ ObservedKernelScopeChecks910 /\ ObservedResolvingContextChecks910 /\ ObservedResolvingReturnAfterJournalChecks910 /\ ObservedAuthoritativeHeadChecks910 RootBranchText911 == "SyntheticTextf0fe00572328" RootBranchCard911 == "structural_branch_schema_911" RootBranchSHA911 == "43a9adb00b31ad7672cde40835b8eecf39cbce1d1dc13475f1037436730c0634" RootBranchFacts911 == ReplacementOverlay99(CardFacts9,[card \in {RootBranchCard911} |-> [kind |-> "Objective",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> RootBranchSHA911]]) RootBranchObjects911 == [id \in {1,2} |-> IF id=1 THEN [CardObject9("Specimen0180","SideAObjectiveCompletion",FALSE,"Up") EXCEPT !.card=RootBranchCard911] ELSE [CardObject9("NeutralValue00016","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] RootBranchTechnique911 == LET raw == ConditionalDefinitionFixture96(11900,"Specimen0180","Trigger","StructuralEvent","SchemaAtom016","SchemaAtom016","SchemaAtom016") d == [raw EXCEPT !.instructions= <<11901,11902,11903,11904>>, !.partsByInstruction=[id \in {11901,11902,11903,11904} |-> {1}]] units == [id \in 1..4 |-> [category |-> "Trait",sourceSentence |-> IF id=4 THEN 3 ELSE id]] nodes == [id \in {11901,11902,11903,11904} |-> CASE id=11901 -> InstructionNode911(id,"Choice",<<"ChooseBranch">>,FALSE,0,[A |-> 11902,B |-> 11903],3,{1}) [] id=11902 -> InstructionNode911(id,"Plain",<<"EffectA">>,TRUE,0,Empty9,1,{2}) [] id=11903 -> InstructionNode911(id,"Plain",<<"EffectB1">>,TRUE,11904,Empty9,2,{3}) [] OTHER -> InstructionNode911(id,"Plain",<<"EffectB2">>,TRUE,0,Empty9,1,{4})] lex == LexicalReceiptFixture99(d,RootBranchCard911,Empty9,RootBranchFacts911) IN [tag |-> "NormalizedInstructionTechnique",source |-> d.syntax.source,ability |-> d.syntax.id,definition |-> d, nodes |-> nodes,entry |-> 11901,units |-> units,nonoperative |-> {},linked |-> {},lexemes |-> lex, sourceSHA |-> RootBranchSHA911,card |-> RootBranchCard911,originalUnits |-> d.syntax.units] RootBranchWorld911 == [LifetimeWorldFixture910 EXCEPT !.objects=RootBranchObjects911,!.cardFacts=RootBranchFacts911, !.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={},!.present={11900}] RootBranchInitial911 == LET r == NewInstructionRuntime911(11910,RootBranchTechnique911,"Conditional","SideAObjectiveCompletion",11920) IN [r EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] RootBranchStepFixture911(r,option,world) == LET node == r.technique.nodes[r.pc] plan == [OpenInstruction93(r.pc,"Ability",r.id,r.ability.source,r.ability.sourceZone,Len(r.visited)+1,"NoValue",node.steps,node.requiresTargets) EXCEPT !.announced=TRUE,!.phase="Resolving",!.targets=IF node.requiresTargets THEN {2} ELSE {}] effects == [id \in {1} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id, IF node.kind="Choice" THEN "InstructionChoice" ELSE "StructuralTargetEffect",node.requiresTargets,IF node.requiresTargets THEN 2 ELSE 0), [value |-> 1,actor |-> "SideB",baseController |-> "SideA",baseOrigin |-> r.ability.source,targetSite |-> "NoValue", controlNode |-> r.pc,options |-> IF node.kind="Choice" THEN {"A","B"} ELSE {},chooser |-> "SideB"]) ] context == [id |-> 100000+r.pc,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(plan),currentWorld |-> world.id,actualEffects |-> effects] returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> world.id,effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE] control == IF node.kind="Choice" THEN [tag |-> "ResolvedInstructionControl",instance |-> r.id,node |-> r.pc, instruction |-> context.currentRef,contextId |-> context.id,actualEffects |-> effects,completion |-> returned, mode |-> "Selected",operation |-> 1,option |-> option,chooser |-> "SideB"] ELSE NoInstructionControl911 next == RuntimeNext911(r,control) projected == RuntimeFinishFrame911(r,next) ability == IF next=0 THEN [projected EXCEPT !.phase="Complete",!.lastFinished=TRUE,!.complete=TRUE] ELSE [projected EXCEPT !.phase="Between"] boundary == GraphInstructionBoundary911(r,context,{"InstructionEnd"},0) afterPlan == [plan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=node.steps] step == [tag |-> "InstructionStepReturn",instruction |-> r.pc,index |-> plan.cursor, step |-> node.steps[1],complete |-> TRUE,expectedReturn |-> returned] after == [r EXCEPT !.ability=ability,!.visited=Append(@,r.pc),!.pc=next, !.choices=IF node.kind="Choice" THEN ReplacementOverlay99(@,[id \in {Len(r.visited)+1} |-> control]) ELSE @, !.phase="Checkpoint",!.checkpoint=0,!.boundary=boundary] IN [before |-> r,plan |-> plan,afterPlan |-> afterPlan,context |-> context,returned |-> returned,step |-> step,control |-> control, boundary |-> boundary,after |-> after,world |-> world] RootBranchStepValid911(f) == /\ ExpectedAtomMapBound99(f.context.actualEffects,f.context.currentRef) /\ FinishRuntimeInstruction911(f.before,f.after,f.plan,f.afterPlan,f.context,f.returned,f.step,f.control, [tag |-> "NoInstructionPayment"],f.boundary) RootBranchAdvanceFixture911(f,ledger,registry,authority,id) == LET world == [authority.current EXCEPT !.id=10*id] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 200000+id,snapshotId |-> world.id,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] transition == LifetimeKernelTransition910(authority.current,world,execution) afterAuthority == LifetimeAuthorityAfter910(authority,transition) afterRegistry == [registry EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(afterAuthority,Len(afterAuthority.order))] current == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(world.id,id,"ProcedureCodee605a78f5d5e",ledger.lastSnapshot.definitions,world.objects),ledger) EXCEPT !.usedObjects=ledger.lastSnapshot.usedObjects \cup DOMAIN world.objects, !.activationEpoch=ConditionalEpochMap96(ledger,ledger.lastSnapshot.definitions),!.activationSerial=ledger.activationSerial] begin == [current EXCEPT !.id=1000000+id,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(ledger,id,begin,current,Empty9) EXCEPT !.caller=GraphBoundaryCaller911(f.boundary)] afterLedger == ConditionalCommittedFixture96(ledger,ledger.lastSnapshot.definitions,cp,Empty9,Empty9,Empty9) receipt == [tag |-> "GraphInstructionCheckpoint",id |-> id,instance |-> f.after.id,source |-> f.after.ability.source, boundary |-> f.boundary,complete |-> TRUE,allNewerChainsComplete |-> TRUE] ready == [f.after EXCEPT !.checkpoint=id,!.phase=IF f.after.pc=0 THEN "Complete" ELSE "Targets"] IN [f |-> f,ledger |-> ledger,registry |-> registry,authority |-> authority,world |-> world,execution |-> execution, transition |-> transition,afterAuthority |-> afterAuthority,afterRegistry |-> afterRegistry, cp |-> cp,afterLedger |-> afterLedger,receipt |-> receipt,ready |-> ready] RootBranchAdvanceValid911(g) == /\ CommitLifetimeKernelCore910(g.authority,g.afterAuthority,g.world,g.execution) /\ PublishNextLifetime910(g.registry,g.afterRegistry,g.afterAuthority) /\ ProcessConditionalCheckpoint96(g.ledger,g.afterLedger,<<>>,<<>>,g.cp.processingSnapshot.definitions,g.cp,ConditionalConditionsFixture96(g.cp.processingSnapshot.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{}) /\ CompleteRuntimeCheckpoint911(g.f.after,g.ready,g.afterLedger,<<>>,g.receipt,g.afterRegistry,g.afterAuthority) RootBranchEntryFixture911(g) == LET r == g.ready node == r.technique.nodes[r.pc] plan == OpenInstruction93(r.pc,"Ability",r.id,r.ability.source,r.ability.sourceZone,Len(r.visited)+1,"NoValue",node.steps,node.requiresTargets) targets == InstructionTargetsFixture93(plan) afterPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent",!.targets=targets.targets] imminent == [r EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.phase="Imminent",!.ability.cursor=@+1] entry == ReplacementOverlay99([InstructionEntryFixture93(plan) EXCEPT !.sourceEligible=r.ability.source.object \in DOMAIN g.world.objects],[checkpointId |-> r.checkpoint]) clearance == InstructionClearanceFixture93(afterPlan,0,0) context == [phase |-> "InstructionCleared",currentRef |-> InstructionWindowRef93(afterPlan),currentWorld |-> g.world.id,clearance |-> clearance] origin == [kind |-> "Instruction",plan |-> afterPlan,parent |-> imminent.ability,ruleStep |-> "NoValue"] world99 == [tag |-> "CurrentInterruptWorld",id |-> g.world.id,turn |-> g.world.turn,traversalControl |-> g.world.control, objects |-> g.world.objects,controllers |-> [id \in DOMAIN g.world.objects |-> g.world.objects[id].side],activePeriods |-> Empty9] resolvingPlan == [afterPlan EXCEPT !.phase="Resolving"] resolving == [imminent EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] IN [g |-> g,plan |-> plan,targets |-> targets,afterPlan |-> afterPlan,imminent |-> imminent,entry |-> entry, clearance |-> clearance,context |-> context,origin |-> origin,world99 |-> world99,resolvingPlan |-> resolvingPlan,resolving |-> resolving] RootBranchEntryValid911(e) == LET g == e.g IN /\ EnterRuntimeInstructionCore911(g.ready,e.imminent,e.plan,e.afterPlan,e.targets,e.entry,g.afterLedger,<<>>,g.afterRegistry,g.afterAuthority) /\ NoInstructionInterrupt93(e.afterPlan,e.imminent.ability,"NoValue",NoModifiersFixture95(e.afterPlan),e.clearance) /\ BeginRuntimeInstructionAtomic911(e.imminent,e.resolving,e.afterPlan,e.resolvingPlan,e.context,e.origin,e.clearance,e.world99,g.afterRegistry,g.afterAuthority) RootBranchPathFixture911(option) == LET r == RootBranchInitial911 world == RootBranchWorld911 authority == NewLifetimeAuthority910(world) registry == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) ledger == NewConditionalLedger96(ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e", [key \in {ConditionalKey96(r.technique.definition)} |-> r.technique.definition],world.objects)) choice == RootBranchStepFixture911(r,option,world) cp1 == RootBranchAdvanceFixture911(choice,ledger,registry,authority,1) first == RootBranchEntryFixture911(cp1) firstStep == RootBranchStepFixture911(first.resolving,"NoValue",cp1.world) cp2 == RootBranchAdvanceFixture911(firstStep,cp1.afterLedger,cp1.afterRegistry,cp1.afterAuthority,2) IN [r |-> r,world |-> world,authority |-> authority,registry |-> registry,ledger |-> ledger, choice |-> choice,cp1 |-> cp1,first |-> first,firstStep |-> firstStep,cp2 |-> cp2] RootBranchShortPathChecks911 == LET s == RootBranchPathFixture911("A") IN /\ InstructionTechniqueSource911(RootBranchTechnique911,RootBranchObjects911,RootBranchFacts911) /\ RuntimeProfile911(s.r) /\ RootBranchStepValid911(s.choice) /\ RootBranchAdvanceValid911(s.cp1) /\ RootBranchEntryValid911(s.first) /\ RootBranchStepValid911(s.firstStep) /\ RootBranchAdvanceValid911(s.cp2) /\ s.choice.after.visited= <<11901>> /\ s.choice.after.ability.instructions= <<11901,11902>> /\ s.cp2.ready.visited= <<11901,11902>> /\ s.cp2.ready.pc=0 /\ s.cp2.ready.phase="Complete" /\ s.cp2.ready.technique.definition=s.r.technique.definition /\ s.cp2.ready.technique=s.r.technique /\ s.cp2.ready.choices[1].option="A" /\ s.cp2.ready.ability.source=s.r.ability.source /\ s.cp2.ready.id=s.r.id RootBranchLongPathChecks911 == LET s == RootBranchPathFixture911("B") SchemaAtom187 == RootBranchEntryFixture911(s.cp2) last == RootBranchStepFixture911(SchemaAtom187.resolving,"NoValue",s.cp2.world) cp3 == RootBranchAdvanceFixture911(last,s.cp2.afterLedger,s.cp2.afterRegistry,s.cp2.afterAuthority,3) IN /\ RootBranchStepValid911(s.choice) /\ RootBranchAdvanceValid911(s.cp1) /\ RootBranchEntryValid911(s.first) /\ RootBranchStepValid911(s.firstStep) /\ RootBranchAdvanceValid911(s.cp2) /\ s.cp2.ready.phase="Targets" /\ s.cp2.ready.pc=11904 /\ ~s.cp2.ready.ability.complete /\ RootBranchEntryValid911(SchemaAtom187) /\ RootBranchStepValid911(last) /\ RootBranchAdvanceValid911(cp3) /\ cp3.ready.visited= <<11901,11903,11904>> /\ cp3.ready.phase="Complete" /\ cp3.ready.pc=0 /\ cp3.ready.ability.instructions= <<11901,11903,11904>> /\ cp3.ready.ability.cursor=3 /\ cp3.ready.technique=s.r.technique /\ cp3.ready.choices[1].option="B" /\ cp3.ready.ability.source=s.r.ability.source RootBranchSelectedEdgeChecks911 == LET f == RootBranchPathFixture911("A").choice wrong == [f.after EXCEPT !.pc=11903,!.ability.instructions= <<11901,11903>>] IN /\ ControlResultBound911(f.before,f.context,f.returned,f.control) /\ f.control.option="A" /\ f.before.technique.nodes[11901].options["A"]=11902 /\ ~FinishRuntimeInstruction911(f.before,wrong,f.plan,f.afterPlan,f.context,f.returned,f.step,f.control,[tag |-> "NoInstructionPayment"],f.boundary) RootBranchCompletionGuardChecks911 == LET s == RootBranchPathFixture911("B") f == s.firstStep terminal == [f.after EXCEPT !.pc=0,!.ability.instructions= <<11901,11903>>,!.ability.phase="Complete", !.ability.lastFinished=TRUE,!.ability.complete=TRUE] IN /\ RootBranchStepValid911(s.choice) /\ RootBranchAdvanceValid911(s.cp1) /\ RootBranchEntryValid911(s.first) /\ f.before.pc=11903 /\ f.before.technique.nodes[11903].next=11904 /\ ~FinishRuntimeInstruction911(f.before,terminal,f.plan,f.afterPlan,f.context,f.returned,f.step,f.control,[tag |-> "NoInstructionPayment"],f.boundary) RootBranchActualChoiceChecks911 == LET f == RootBranchPathFixture911("A").choice badChooser == [f.control EXCEPT !.chooser="SideA"] badAfter == [f.after EXCEPT !.choices[1]=badChooser] context == [f.context EXCEPT !.actualEffects[1].options={"B"}] returned == [f.returned EXCEPT !.effects=context.actualEffects] step == [f.step EXCEPT !.expectedReturn=returned] restrictedControl == [f.control EXCEPT !.actualEffects=context.actualEffects,!.completion=returned] restrictedAfter == [f.after EXCEPT !.choices[1]=restrictedControl] IN /\ f.before.technique.definition.syntax.controller="SideA" /\ f.context.actualEffects[1].chooser="SideB" /\ ~FinishRuntimeInstruction911(f.before,badAfter,f.plan,f.afterPlan,f.context,f.returned,f.step,badChooser,[tag |-> "NoInstructionPayment"],f.boundary) /\ ~FinishRuntimeInstruction911(f.before,restrictedAfter,f.plan,f.afterPlan,context,returned,step,restrictedControl,[tag |-> "NoInstructionPayment"],f.boundary) RootBranchRemovedChoiceChecks911 == LET f == RootBranchPathFixture911("A").choice context == [f.context EXCEPT !.actualEffects=Empty9] returned == [f.returned EXCEPT !.effects=Empty9] control == [f.control EXCEPT !.mode="Removed",!.operation=0,!.option="NoValue",!.actualEffects=Empty9,!.completion=returned] step == [f.step EXCEPT !.expectedReturn=returned] ability == [RuntimeFinishFrame911(f.before,0) EXCEPT !.phase="Complete",!.lastFinished=TRUE,!.complete=TRUE] after == [f.after EXCEPT !.pc=0,!.ability=ability,!.choices[1]=control] IN /\ ControlResultBound911(f.before,context,returned,control) /\ FinishRuntimeInstruction911(f.before,after,f.plan,f.afterPlan,context,returned,step,control,[tag |-> "NoInstructionPayment"],f.boundary) /\ after.visited= <<11901>> /\ after.ability.instructions= <<11901>> /\ after.technique=f.before.technique RootBranchProfileReplayChecks911 == LET f == RootBranchPathFixture911("A").choice foreignBefore == [f.before EXCEPT !.ability.source=ObjectAbilitySource9(2)] foreign == RootBranchStepFixture911(foreignBefore,"A",f.world) IN /\ ~RootBranchStepValid911(foreign) /\ ~FinishRuntimeInstruction911(f.after,f.after,f.plan,f.afterPlan,f.context,f.returned,f.step,f.control,[tag |-> "NoInstructionPayment"],f.boundary) RootBranchPendingBoundaryFixture911 == LET s == RootBranchPathFixture911("B") f == s.firstStep d == s.r.technique.definition key == ConditionalKey96(d) definitions == [k \in {key} |-> d] initial == s.cp1.afterLedger.lastSnapshot ledger == s.cp1.afterLedger world == [s.cp1.world EXCEPT !.id=20] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 299000,snapshotId |-> 20,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(s.cp1.afterAuthority,LifetimeKernelTransition910(s.cp1.world,world,execution)) registry == [s.cp1.afterRegistry EXCEPT !.frontier=LifetimeFrontier910(authority,3)] event == ConditionalEventFixture96(11950,"StructuralEvent",0,"SideB","SideB",initial,1) events == [id \in {11950} |-> event] current == ConditionalSnapshotFixture96(20,2,"ProcedureCodee605a78f5d5e",definitions,world.objects) begin == [current EXCEPT !.id=19,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(ledger,2,begin,current,events) EXCEPT !.caller=GraphBoundaryCaller911(f.boundary)] recognition == [definition |-> key,occurrence |-> 11950] allocation == [k \in {recognition} |-> 11960] bindings == ConditionalBindingsFixture96({recognition},2,11970,119) pending == ConditionalCommittedFixture96(ledger,definitions,cp,allocation,bindings,Empty9) site == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",2) members == ConditionalWindowMembers96(pending.instances,11970) open == WindowFixture92(11970,"Reaction",site,members,119,NoTimingRef9) receipt == [tag |-> "GraphInstructionCheckpoint",id |-> 2,instance |-> f.after.id,source |-> f.after.ability.source, boundary |-> f.boundary,complete |-> TRUE,allNewerChainsComplete |-> TRUE] proposed == [f.after EXCEPT !.phase="Targets",!.checkpoint=2] IN [s |-> s,f |-> f,d |-> d,definitions |-> definitions,ledger |-> ledger,world |-> world,execution |-> execution, authority |-> authority,registry |-> registry,events |-> events,cp |-> cp,allocation |-> allocation,bindings |-> bindings, pending |-> pending,site |-> site,members |-> members,open |-> open,receipt |-> receipt,proposed |-> proposed] RootBranchPendingBoundaryChecks911 == LET g == RootBranchPendingBoundaryFixture911 IN /\ RootBranchStepValid911(g.s.choice) /\ RootBranchAdvanceValid911(g.s.cp1) /\ RootBranchEntryValid911(g.s.first) /\ RootBranchStepValid911(g.f) /\ CommitLifetimeKernelCore910(g.s.cp1.afterAuthority,g.authority,g.world,g.execution) /\ PublishNextLifetime910(g.s.cp1.afterRegistry,g.registry,g.authority) /\ ProcessConditionalCheckpoint96(g.ledger,g.pending,<<>>,<<>>,g.definitions,g.cp,ConditionalConditionsFixture96(g.definitions,g.events), g.allocation,g.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,g.pending,11970,g.site, OpeningFixture92(11970,"Reaction",g.site,g.members,119,NoTimingRef9),{}) /\ g.pending.instances[11960].status="Pending" /\ g.open.members[11960].mandatory /\ ~CompleteRuntimeCheckpoint911(g.f.after,g.proposed,g.pending,<>,g.receipt,g.registry,g.authority) RootBranchEarlyEntryChecks911 == LET s == RootBranchPathFixture911("B") e == RootBranchEntryFixture911(s.cp2) wrongPhase == [s.cp2.ready EXCEPT !.phase="Checkpoint"] IN /\ RootBranchStepValid911(s.choice) /\ RootBranchAdvanceValid911(s.cp1) /\ RootBranchEntryValid911(s.first) /\ ~EnterRuntimeInstructionCore911(s.firstStep.after,e.imminent,e.plan,e.afterPlan,e.targets,e.entry, s.cp2.afterLedger,<<>>,s.cp2.afterRegistry,s.cp2.afterAuthority) /\ ~EnterRuntimeInstructionCore911(wrongPhase,e.imminent,e.plan,e.afterPlan,e.targets,e.entry, s.cp2.afterLedger,<<>>,s.cp2.afterRegistry,s.cp2.afterAuthority) RootBranchDetachedSourceChecks911 == LET s == RootBranchPathFixture911("A") g == s.cp1 objects == [id \in {2,11} |-> IF id=11 THEN [g.world.objects[1] EXCEPT !.zone="Removed",!.loc="Removed"] ELSE g.world.objects[id]] world == [g.world EXCEPT !.id=15,!.objects=objects] execution == [tag |-> "ActualObjectTransition",id |-> 299100,snapshotId |-> 15,source |-> RuleAbilitySource9("StructuralSourceMove911")] authority == LifetimeAuthorityAfter910(g.afterAuthority,LifetimeKernelTransition910(g.world,world,execution)) registry == [g.afterRegistry EXCEPT !.frontier=LifetimeFrontier910(authority,3)] key == ConditionalKey96(s.r.technique.definition) beforeSnapshot == g.afterLedger.lastSnapshot afterSnapshot == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(15,1,"AfterSourceMove",beforeSnapshot.definitions,objects),g.afterLedger) EXCEPT !.activationEpoch=[k \in {key} |-> 1],!.activationSerial=1,!.usedObjects={1,2,11}] ledger == [g.afterLedger EXCEPT !.activationEpoch=[k \in {key} |-> 1],!.activationSerial=1] current == [g EXCEPT !.world=world,!.afterAuthority=authority,!.afterRegistry=registry,!.afterLedger=ledger] entry == RootBranchEntryFixture911(current) last == RootBranchStepFixture911(entry.resolving,"NoValue",world) cp == RootBranchAdvanceFixture911(last,ledger,registry,authority,2) IN /\ RootBranchStepValid911(s.choice) /\ RootBranchAdvanceValid911(g) /\ CardBatchTransfer8(g.world.objects,objects,{1},[id \in {1} |-> 11],{1,2},"Removed","Up",[id \in {1} |-> "Removed"]) /\ CommitLifetimeKernelCore910(g.afterAuthority,authority,world,execution) /\ PublishNextLifetime910(g.afterRegistry,registry,authority) /\ ObserveConditionalActivity96(g.afterLedger,g.afterLedger,ledger,<<>>,<<>>,beforeSnapshot,afterSnapshot) /\ 1 \notin DOMAIN world.objects /\ ~LingeringObjectActive910(ObjectAbilitySource9(1),world) /\ RootBranchEntryValid911(entry) /\ ~entry.entry.sourceEligible /\ RootBranchStepValid911(last) /\ RootBranchAdvanceValid911(cp) /\ cp.ready.phase="Complete" /\ cp.ready.choices[1].option="A" /\ cp.ready.technique=s.r.technique /\ cp.ready.ability.source=ObjectAbilitySource9(1) /\ cp.ready.ability.detached RootBranchReturnCompletionChecks911 == LET f == RootBranchPathFixture911("B").firstStep returned == [f.returned EXCEPT !.childrenReturned=FALSE] step == [f.step EXCEPT !.expectedReturn=returned] IN ~FinishRuntimeInstruction911(f.before,f.after,f.plan,f.afterPlan,f.context,returned,step,f.control,[tag |-> "NoInstructionPayment"],f.boundary) SearchSpecimen0075Fixture911 == LET objects == [id \in 1..6 |-> CASE id=1 -> CardObject9("Specimen0075","Play",TRUE,"Up") [] id=2 -> CardObject9("Specimen0180","SideAObjectiveCompletion",FALSE,"Up") [] id=3 -> [CardObject9("Specimen0069","SideBDeck",FALSE,"Down") EXCEPT !.loc= <<"SideBDeck",1>>] [] id=4 -> [CardObject9("Specimen0145","SideBDeck",FALSE,"Down") EXCEPT !.loc= <<"SideBDeck",2>>] [] id=5 -> CardObject9("Specimen0243","SideBHand",FALSE,"Down") [] OTHER -> CardObject9("Specimen0185","SideBHand",FALSE,"Down")] printedSubtypes == [id \in {3,4} |-> IF id=3 THEN {"SchemaAtom180"} ELSE {"SchemaAtom086","SchemaAtom092"}] criteria == {id \in SearchZoneIds8(objects,"SideBDeck") : objects[id].kind="Technique" /\ "SchemaAtom180" \in printedSubtypes[id]} sourceReceipt == [tag |-> "PinnedSpecimen0075SearchNormalization",source |-> ObjectAbilitySource9(1),ability |-> 11100, card |-> "Specimen0075",sourceSHA |-> CardFacts9["Specimen0075"].sourceSHA,criterion |-> <<"Technique","SchemaAtom180">>, foundCard |-> "Specimen0069",foundSHA |-> CardFacts9["Specimen0069"].sourceSHA, instructions |-> <<"SearchSetAsideShuffle","RevealAdd">>,shuffleSentence |-> 2, dischargedAt |-> [instruction |-> 1,procedure |-> 11110,step |-> "SearchShuffle8",rule |-> "ProcedureCode1e9a46bbcc9d"]] start == OpenSearch8(11110,"SideB","SideBDeck",1,TRUE,"NoValue",11100,11100) closed == [start EXCEPT !.complete=TRUE,!.foundCount=1,!.stage="Shuffle"] found == [id \in {1,2,4,5,6,7} |-> IF id=7 THEN [objects[3] EXCEPT !.zone="SetAside",!.loc="SetAside"] ELSE objects[id]] successors == [id \in {3} |-> 7] transits == [id \in {7} |-> SetAsideTransit4(7,"SideBDeck",objects[3].loc,11110,11100,FALSE,FALSE)] findReceipt == [searchId |-> 11110,ability |-> 11100,sources |-> {3},successors |-> successors,complete |-> TRUE] shuffled == [id \in {1,2,5,6,7,8} |-> IF id=8 THEN [found[4] EXCEPT !.loc= <<"SideBDeck",1>>] ELSE found[id]] shuffleReceipt == [searchId |-> 11110,zone |-> "SideBDeck",performed |-> TRUE] conditions == [closed EXCEPT !.stage="Conditions",!.shuffled=TRUE] markReceipt == [searchId |-> 11110,allRequiredMarked |-> TRUE] resume == [conditions EXCEPT !.stage="Resume",!.conditionsMarked=TRUE] resumed == [resume EXCEPT !.stage="Resumed",!.returned=TRUE] searchEvent == [tag |-> "Searched",searchId |-> 11110,actor |-> "SideB",zone |-> "SideBDeck",foundCount |-> 1] cost == <<[kind |-> "SpendActionPoints",amount |-> 1],[kind |-> "ResourceUnits",amount |-> 1]>> exampleFamily013Definition == [PaidDefinitionFixture95(11101,"Specimen0075",<<>>,cost) EXCEPT !.instructions= <<11111,11112>>] action == PaidWindowFixture95(11120,"NeutralValue00001","SideB") actionOption == PaidOptionFixture95(exampleFamily013Definition,action) actionBusy == StartedFixture92(action,actionOption) paid == OpenPaidProcedure95(11100,exampleFamily013Definition,actionOption,action,actionBusy.busyTransaction,"Play") resolvingSpecimen0075 == [paid EXCEPT !.phase="Resolve",!.costPaid=TRUE,!.ability.detached=TRUE, !.ability.phase="Resolving",!.ability.firstImminent=TRUE] searchPlan == [OpenInstruction93(11111,"Ability",11100,ObjectAbilitySource9(1),"Play",1,"NoValue",<<"SearchSetAsideShuffle">>,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] searchDonePlan == [searchPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"SearchSetAsideShuffle">>] exampleFamily013Boundary == [resolvingSpecimen0075 EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Between"] searchStep == [tag |-> "InstructionStepReturn",instruction |-> 11111,index |-> 1,step |-> "SearchSetAsideShuffle",complete |-> TRUE] IN [objects |-> objects,printedSubtypes |-> printedSubtypes,criteria |-> criteria,sourceReceipt |-> sourceReceipt, start |-> start,closed |-> closed,found |-> found,successors |-> successors,transits |-> transits,findReceipt |-> findReceipt, shuffled |-> shuffled,shuffleReceipt |-> shuffleReceipt,conditions |-> conditions,markReceipt |-> markReceipt, resume |-> resume,resumed |-> resumed,searchEvent |-> searchEvent,exampleFamily013Definition |-> exampleFamily013Definition, actionBusy |-> actionBusy,resolvingSpecimen0075 |-> resolvingSpecimen0075,searchPlan |-> searchPlan, searchDonePlan |-> searchDonePlan,exampleFamily013Boundary |-> exampleFamily013Boundary,searchStep |-> searchStep] SearchSpecimen0075ProtocolValid911(s) == /\ CardFacts9["Specimen0075"].kind="Technique" /\ CardFacts9["Specimen0069"].kind="Technique" /\ CardFacts9["Specimen0180"].kind="Objective" /\ CardFacts9["Specimen0180"].side="SideA" /\ s.criteria={3} /\ s.objects[4].kind="Technique" /\ 4 \notin s.criteria /\ s.sourceReceipt.sourceSHA=CardFacts9["Specimen0075"].sourceSHA /\ s.sourceReceipt.foundSHA=CardFacts9["Specimen0069"].sourceSHA /\ FinishSearchChoice8(s.start,s.closed,s.objects,s.found,{3},s.successors,1..6,s.criteria,{}, {1},s.findReceipt,<<3,4>>,<<4>>,Empty9,s.transits) /\ SearchShuffle8(s.closed,s.conditions,s.found,s.shuffled,<<4>>,<<8>>,<<4>>,[id \in {4} |-> 8],1..7,s.shuffleReceipt,s.transits,s.transits) /\ MarkSearchConditions8(s.conditions,s.resume,s.markReceipt,{s.searchEvent}) /\ CarryPaidInstruction95(<>,s.resolvingSpecimen0075,s.exampleFamily013Boundary,s.searchPlan,s.searchDonePlan,s.searchStep) SearchCheckpointFixture911(ledger,id,objects,caller,events) == LET snapshot == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(id*10+1,id,"ProcedureCodee605a78f5d5e",ledger.lastSnapshot.definitions,objects),ledger) EXCEPT !.usedObjects=ledger.lastSnapshot.usedObjects \cup DOMAIN objects, !.activationEpoch=ledger.activationEpoch,!.activationSerial=ledger.activationSerial] begin == [snapshot EXCEPT !.id=id*10,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(ledger,id,begin,snapshot,events) EXCEPT !.caller=caller] IN [checkpoint |-> cp,current |-> snapshot,after |-> ConditionalCommittedFixture96(ledger,snapshot.definitions,cp,Empty9,Empty9,Empty9)] SearchExampleFamily041Fixture911 == LET s == SearchSpecimen0075Fixture911 raw == ConditionalDefinitionFixture96(11130,"Specimen0180","Trigger","Searched","SchemaAtom016","SideB","SideB") d == [raw EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2)] key == ConditionalKey96(d) definitions == [k \in {key} |-> d] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,s.objects) seed == NewConditionalLedger96(initial) event == ReplacementOverlay99(ConditionalEventFixture96(11131,"Searched",0,"SideB","SideB",initial,11110),[search |-> s.searchEvent]) events == [id \in {11131} |-> event] begin == [ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",definitions,s.shuffled) EXCEPT !.usedObjects=1..8] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp1 == [ConditionalCheckpointFixture96(seed,1,begin,current,events) EXCEPT !.caller=PaidCheckpointCaller96(s.exampleFamily013Boundary)] recognitionKey == [definition |-> key,occurrence |-> 11131] allocation == [k \in {recognitionKey} |-> 11140] bindings == ConditionalBindingsFixture96({recognitionKey},1,11150,111) pending == ConditionalCommittedFixture96(seed,definitions,cp1,allocation,bindings,Empty9) site == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",2) members == ConditionalWindowMembers96(pending.instances,11150) open == WindowFixture92(11150,"Reaction",site,members,111,NoTimingRef9) cp2 == SearchCheckpointFixture911(pending,2,s.shuffled,ConditionalPriorityCaller96(open),Empty9) sideBReady == [open EXCEPT !.stage="Ready",!.checkpoint=2] sideAWindow == PassPriorityFrame9(sideBReady) cp3 == SearchCheckpointFixture911(cp2.after,3,s.shuffled,ConditionalPriorityCaller96(sideAWindow),Empty9) ready == [sideAWindow EXCEPT !.stage="Ready",!.checkpoint=3] option == ConditionalOptionFixture92(ready,11140) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(11140,d,ready,option,LegalityFixture92(ready,option).transactionId,"SideAObjectiveCompletion") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == OpenInstruction93(700,"Ability",11140,d.syntax.source,"SideAObjectiveCompletion",1,"NoValue",<<"RetireRandomBHand">>,FALSE) imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] selected == [cp3.after EXCEPT !.instances[11140].status="Imminent"] lex == LexicalReceiptFixture99(d,"Specimen0180",Empty9,CardFacts9) capabilities == [tag |-> "NormalizedInterruptCapabilities",definition |-> d,origin |-> lex.origin,clauses |-> Empty9] restrictions == [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9] targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={}] entry == [tag |-> "ActualInstructionEntry",id |-> 11160,snapshotId |-> cp3.current.id,kind |-> "ConditionalFirst", before |-> p,after |-> imminentP,beforePlan |-> plan,afterPlan |-> imminentPlan, stackBefore |-> <>,stackAfter |-> <>, beforeLedger |-> cp3.after,afterLedger |-> selected,definition |-> d,lexemes |-> lex, snapshot |-> SnapshotWithConditionalRegistry96(cp3.current,cp3.after),instance |-> 11140,option |-> option, legality |-> LegalityFixture92(ready,option),currentEffect |-> Empty9,targets |-> targets,receipt |-> InstructionEntryFixture93(plan), turnUses |-> Empty9,restrictions |-> restrictions,owner |-> [windowId |-> ready.id,option |-> option,transaction |-> busy.busyTransaction]] IN [s |-> s,d |-> d,key |-> key,definitions |-> definitions,initial |-> initial,seed |-> seed,events |-> events,cp1 |-> cp1, allocation |-> allocation,bindings |-> bindings,pending |-> pending,site |-> site,members |-> members,open |-> open, cp2 |-> cp2,sideBReady |-> sideBReady,sideAWindow |-> sideAWindow,cp3 |-> cp3,ready |-> ready,option |-> option,busy |-> busy, p |-> p,imminentP |-> imminentP,plan |-> plan,imminentPlan |-> imminentPlan,selected |-> selected,lex |-> lex,capabilities |-> capabilities, restrictions |-> restrictions,targets |-> targets,entry |-> entry] SearchExampleFamily041SelectionValid911(q) == /\ SearchSpecimen0075ProtocolValid911(q.s) /\ ProcessConditionalCheckpoint96(q.seed,q.pending,<>,<>,q.definitions,q.cp1, ConditionalConditionsFixture96(q.definitions,q.events),q.allocation,q.bindings,Empty9,Empty9,{11120}) /\ OpenConditionalReaction96(<>,<>,q.pending,11150,q.site, OpeningFixture92(11150,"Reaction",q.site,q.members,111,NoTimingRef9),{11120}) /\ ProcessConditionalCheckpoint96(q.pending,q.cp2.after,<>,<>,q.definitions,q.cp2.checkpoint, ConditionalConditionsFixture96(q.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{11120,11150}) /\ CheckpointPriorityWithConditionals96(q.cp2.after,<>,<>,[CheckpointFixture92(q.open) EXCEPT !.id=2]) /\ PassConditionalPriorityCore96(q.cp2.after,q.cp2.after,<>,<>,"SideB",Empty9) /\ ProcessConditionalCheckpoint96(q.cp2.after,q.cp3.after,<>,<>,q.definitions,q.cp3.checkpoint, ConditionalConditionsFixture96(q.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{11120,11150}) /\ CheckpointPriorityWithConditionals96(q.cp3.after,<>,<>,[CheckpointFixture92(q.sideAWindow) EXCEPT !.id=3]) /\ BeginConditionalResolutionCore99(q.cp3.after,q.selected,<>,<>,q.p,q.imminentP,q.d,q.lex, SnapshotWithConditionalRegistry96(q.cp3.current,q.cp3.after),11140,q.option,LegalityFixture92(q.ready,q.option),Empty9, q.plan,q.imminentPlan,q.targets,InstructionEntryFixture93(q.plan),Empty9,q.restrictions,CardFacts9) SearchProtocolChecks911 == LET s == SearchSpecimen0075Fixture911 IN /\ SearchSpecimen0075ProtocolValid911(s) /\ s.sourceReceipt.dischargedAt.procedure=s.conditions.id /\ s.sourceReceipt.dischargedAt.step="SearchShuffle8" /\ s.sourceReceipt.instructions= <<"SearchSetAsideShuffle","RevealAdd">> /\ s.criteria={3} /\ s.shuffled[7].card="Specimen0069" /\ s.shuffled[7].zone="SetAside" /\ AsideGroupIds8(s.shuffled,s.transits,11110)={7} /\ ~SearchFoundActionAllowed8(s.conditions) /\ ~SearchShuffle8(s.conditions,s.conditions,s.shuffled,s.shuffled,<<8>>,<<8>>,<<8>>,[id \in {8} |-> 8],1..8,s.shuffleReceipt,s.transits,s.transits) SearchRecognitionChecks911 == SearchExampleFamily041SelectionValid911(SearchExampleFamily041Fixture911) SearchExampleFamily041AtomicFixture911 == LET q == SearchExampleFamily041Fixture911 origin == [kind |-> "Instruction",plan |-> q.imminentPlan,parent |-> q.imminentP.ability,ruleStep |-> "NoValue"] effects == [id \in {1} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id,"RandomRetire",FALSE,0), [value |-> 1,actor |-> "SideB",baseController |-> "SideA",baseOrigin |-> q.d.syntax.source,targetSite |-> "NoValue", zone |-> "SideBHand",candidates |-> {5,6},sourceSHA |-> CardFacts9["Specimen0180"].sourceSHA])] world == [tag |-> "CurrentInterruptWorld",id |-> q.cp3.current.id,turn |-> TurnFixture92("SideB"), traversalControl |-> [traversal |-> NoTraversal6,phaseEndedIds |-> {}],objects |-> q.s.shuffled, controllers |-> [id \in DOMAIN q.s.shuffled |-> q.s.shuffled[id].side],activePeriods |-> Empty9, conditional |-> SnapshotWithConditionalRegistry96(q.cp3.current,q.selected), paidDefinitions |-> Empty9,lexemes |-> [k \in {q.key} |-> q.lex],capabilities |-> [k \in {q.key} |-> q.capabilities], paidContexts |-> Empty9,turnUses |-> Empty9,replacementDefinitions |-> Empty9,liveReplacementIds |-> {}, entries |-> [id \in {q.entry.id} |-> q.entry]] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> q.d.syntax.source, snapshotId |-> world.id,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(11161,q.entry.id,origin,world,description,effects,q.entry.owner) registry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {11161} |-> context],!.entryIds={q.entry.id},!.usedContextIds={11161}] observation == InitialWouldObservation99(context,11162) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,observation) observed == [q.selected EXCEPT !.instances[11140].expected=[index \in {1} |-> [instruction |-> context.initialRef,effects |-> ExpectedObservationSet99(effects)]]] prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=11163,!.group=112] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=q.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] resolvingP == [q.imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [q.imminentPlan EXCEPT !.phase="Resolving"] atomicOrigin == [origin EXCEPT !.plan=resolvingPlan,!.parent=resolvingP.ability] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] resolving == [observed EXCEPT !.instances[11140].status="Resolving"] completeP == [resolvingP EXCEPT !.phase="InstructionCheckpoint",!.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] completePlan == [resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps= <<"RetireRandomBHand">>] completed == [resolving EXCEPT !.instances[11140].status="Complete"] trashed == [id \in {1,2,6,7,8,9} |-> IF id=9 THEN [q.s.shuffled[5] EXCEPT !.zone="SideBDiscard",!.loc="SideBDiscard",!.face="Up"] ELSE q.s.shuffled[id]] randomReceipt == [tag |-> "RandomBHandRetireExecution",abilityInstance |-> 11140,instruction |-> atomic.currentRef, source |-> q.d.syntax.source,snapshotId |-> world.id,sourceSHA |-> CardFacts9["Specimen0180"].sourceSHA, cohort |-> {id \in DOMAIN q.s.shuffled : q.s.shuffled[id].zone="SideBHand"},amount |-> 1, actualRngResult |-> 5,successor |-> 9,complete |-> TRUE] beforeSnapshot == SnapshotWithConditionalRegistry96(q.cp3.current,resolving) afterSnapshot == [SnapshotWithConditionalRegistry96(q.cp3.current,completed) EXCEPT !.id=35,!.objects=trashed, !.cardActivity=[id \in DOMAIN trashed |-> ConditionalCardActivityFixture96(trashed[id])],!.usedObjects=1..9] afterWorld == [world EXCEPT !.id=35,!.objects=trashed,!.controllers=[id \in DOMAIN trashed |-> trashed[id].side],!.conditional=afterSnapshot] actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> atomic.id,instruction |-> atomic.currentRef, snapshotId |-> afterWorld.id,effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE,randomExecution |-> randomReceipt] step == [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> "RetireRandomBHand",complete |-> TRUE,expectedReturn |-> actualReturn] call == [kind |-> "Conditional",before |-> resolvingP,after |-> completeP,beforePlan |-> resolvingPlan,afterPlan |-> completePlan, beforeLedger |-> resolving,candidateLedger |-> completed,afterLedger |-> completed, beforeStack |-> <>,afterStack |-> <>,step |-> step, beforeSnapshot |-> beforeSnapshot,afterSnapshot |-> afterSnapshot] returned == [atomic EXCEPT !.phase="Returned"] afterOrigin == [atomicOrigin EXCEPT !.plan=completePlan,!.parent=completeP.ability] IN [q |-> q,origin |-> origin,effects |-> effects,world |-> world,description |-> description,projection |-> projection,context |-> context, registry |-> registry,observation |-> observation,history |-> history,observed |-> observed,prepared |-> prepared,noWindow |-> noWindow, clearance |-> clearance,cleared |-> cleared,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan, atomicOrigin |-> atomicOrigin,atomic |-> atomic,resolving |-> resolving,completeP |-> completeP,completePlan |-> completePlan, completed |-> completed,trashed |-> trashed,randomReceipt |-> randomReceipt,beforeSnapshot |-> beforeSnapshot,afterSnapshot |-> afterSnapshot, afterWorld |-> afterWorld,actualReturn |-> actualReturn,step |-> step,call |-> call,returned |-> returned,afterOrigin |-> afterOrigin] SearchExampleFamily041AtomicValid911(f) == LET q == f.q IN /\ SearchExampleFamily041SelectionValid911(q) /\ BeginExpectedContext99(NewExpectedRegistry99,f.registry,11161,f.origin,f.world,q.entry,f.description,f.projection,f.effects,q.entry.owner, CardFacts9,NewWouldAccounting99,f.history,f.observation) /\ ObserveInitialConditionalExpected99(q.selected,f.observed,q.imminentP,q.imminentPlan,f.context) /\ ApplyAutomaticReplacements99(f.context,f.context,f.origin,f.origin,f.world,<>,<<>>,CardFacts9,f.history) /\ PrepareOpeningInterrupts99(f.context,f.prepared,f.observed,f.observed,f.origin,f.world,f.history,11163,112,Empty9,{11120,11150},CardFacts9) /\ NoPreparedInterrupt99(f.prepared,f.noWindow,f.origin,f.world,f.history,f.observed,<>,q.site,CardFacts9) /\ ClearPreparedInstruction99(f.noWindow,f.cleared,f.origin,f.world,f.history,f.observed,<>,<>, "NoModifiers",f.clearance,CardFacts9) /\ BeginClearedAbilityInstruction99(f.cleared,f.atomic,f.origin,f.atomicOrigin,f.world,f.observed,f.resolving,<>, [kind |-> "Conditional",before |-> q.imminentP,after |-> f.resolvingP],f.clearance,f.resolvingPlan) /\ f.randomReceipt.cohort={5,6} /\ 7 \notin f.randomReceipt.cohort /\ f.actualReturn.randomExecution=f.randomReceipt /\ CardBatchTransfer8(q.s.shuffled,f.trashed,{5},[id \in {5} |-> 9],1..8,"SideBDiscard","Up",[id \in {5} |-> "SideBDiscard"]) /\ FinishExpectedAbilityInstruction99(f.atomic,f.returned,f.atomicOrigin,f.afterOrigin,f.afterWorld,f.call,f.actualReturn) SearchExampleFamily041AtomicChecks911 == LET f == SearchExampleFamily041AtomicFixture911 IN /\ SearchExampleFamily041AtomicValid911(f) /\ f.q.d.syntax.controller="SideA" /\ f.q.s.shuffled[2].zone="SideAObjectiveCompletion" /\ f.q.members[11140].mandatory /\ f.q.busy.busy.controller="SideA" /\ f.trashed[7]=f.q.s.shuffled[7] /\ f.trashed[7].zone="SetAside" /\ f.trashed[9].card=f.q.s.shuffled[5].card /\ f.trashed[6].zone="SideBHand" /\ f.completed.instances[11140].status="Complete" /\ ~FinishExpectedAbilityInstruction99(f.atomic,f.returned,f.atomicOrigin,f.afterOrigin,f.afterWorld, [f.call EXCEPT !.step.expectedReturn.childrenReturned=FALSE],[f.actualReturn EXCEPT !.childrenReturned=FALSE]) SearchRandomBHandRetireBound911(beforeObjects,afterObjects,receipt,context,world) == /\ context.phase="Resolving" /\ context.currentRef.source=ObjectAbilitySource9(2) /\ receipt.tag="RandomBHandRetireExecution" /\ receipt.abilityInstance=context.currentRef.abilityInstance /\ receipt.instruction=context.currentRef /\ receipt.source=context.currentRef.source /\ receipt.snapshotId=world.id /\ beforeObjects=world.objects /\ beforeObjects[2].card="Specimen0180" /\ beforeObjects[2].zone="SideAObjectiveCompletion" /\ receipt.sourceSHA=CardFacts9["Specimen0180"].sourceSHA /\ receipt.amount=1 /\ receipt.complete /\ receipt.cohort={id \in DOMAIN beforeObjects : beforeObjects[id].zone="SideBHand"} /\ receipt.actualRngResult \in receipt.cohort /\ context.actualEffects[1].kind="RandomRetire" /\ context.actualEffects[1].value=receipt.amount /\ context.actualEffects[1].candidates=receipt.cohort /\ context.actualEffects[1].zone="SideBHand" /\ CardBatchTransfer8(beforeObjects,afterObjects,{receipt.actualRngResult},[id \in {receipt.actualRngResult} |-> receipt.successor], 1..8,"SideBDiscard","Up",[id \in {receipt.actualRngResult} |-> "SideBDiscard"]) SearchReactionDrainFixture911 == LET f == SearchExampleFamily041AtomicFixture911 q == f.q cp4 == SearchCheckpointFixture911(f.completed,4,f.trashed,ConditionalInstructionCaller96(f.completeP),Empty9) checkpoint == [tag |-> "ConditionalInstructionCheckpoint",id |-> 4,abilityInstance |-> 11140,transactionId |-> q.p.transaction, source |-> q.d.syntax.source,instruction |-> 700,index |-> 1,complete |-> TRUE,allNewerChainsComplete |-> TRUE] finalP == [f.completeP EXCEPT !.phase="Complete",!.checkpoint=4] returnedP == [finalP EXCEPT !.phase="Returned",!.ability.returned=TRUE] resumedWindow == CompletePriorityOptionFrame9(q.busy) cp5 == SearchCheckpointFixture911(cp4.after,5,f.trashed,ConditionalPriorityCaller96(resumedWindow),Empty9) ready == [resumedWindow EXCEPT !.stage="Ready",!.checkpoint=5] closed == PassPriorityFrame9(ready) exampleFamily013Targets == [q.s.exampleFamily013Boundary EXCEPT !.phase="Targets",!.checkpoint=1] nextPlan == OpenInstruction93(11112,"Ability",11100,ObjectAbilitySource9(1),"Play",2,"NoValue",<<"RevealAdd">>,FALSE) nextImminentPlan == [nextPlan EXCEPT !.phase="Imminent",!.announced=TRUE] nextImminentP == [exampleFamily013Targets EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.cursor=2,!.ability.phase="Imminent"] nextEntry == PaidEntryFixture95(nextPlan,1) nextResolvingP == [nextImminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] nextResolvingPlan == [nextImminentPlan EXCEPT !.phase="Resolving"] added == [id \in {1,2,6,8,9,10} |-> IF id=10 THEN [f.trashed[7] EXCEPT !.zone="SideBHand",!.loc="SideBHand"] ELSE f.trashed[id]] reveal == [performed |-> TRUE,object |-> 7,searchId |-> 11110] IN [f |-> f,cp4 |-> cp4,checkpoint |-> checkpoint,finalP |-> finalP,returnedP |-> returnedP, resumedWindow |-> resumedWindow,cp5 |-> cp5,ready |-> ready,closed |-> closed,exampleFamily013Targets |-> exampleFamily013Targets, nextPlan |-> nextPlan,nextImminentPlan |-> nextImminentPlan,nextImminentP |-> nextImminentP,nextEntry |-> nextEntry, nextResolvingP |-> nextResolvingP,nextResolvingPlan |-> nextResolvingPlan,added |-> added,reveal |-> reveal] SearchReactionDrainValid911(g) == LET f == g.f q == f.q s == q.s IN /\ SearchExampleFamily041AtomicValid911(f) /\ SearchRandomBHandRetireBound911(s.shuffled,f.trashed,f.randomReceipt,f.atomic,f.world) /\ ProcessConditionalCheckpoint96(f.completed,g.cp4.after,<>,<>,q.definitions,g.cp4.checkpoint, ConditionalConditionsFixture96(q.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{11120,11150}) /\ ConditionalInstructionCheckpoint96(g.cp4.after,<>,f.completeP,g.finalP,g.checkpoint) /\ FinishConditionalProcedure96(<>,<>,g.finalP,g.returnedP,PaidReturnFixture95(q.busy,4)) /\ ProcessConditionalCheckpoint96(g.cp4.after,g.cp5.after,<>,<>,q.definitions,g.cp5.checkpoint, ConditionalConditionsFixture96(q.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{11120,11150}) /\ CheckpointPriorityWithConditionals96(g.cp5.after,<>,<>,[CheckpointFixture92(g.resumedWindow) EXCEPT !.id=5]) /\ PassConditionalPriorityCore96(g.cp5.after,g.cp5.after,<>,<>,"SideA",Empty9) /\ PopClosedPriorityWindow9(<>,<>) /\ PaidCheckpointWithConditionals96(g.cp5.after,<>,s.exampleFamily013Boundary,g.exampleFamily013Targets,f.trashed,s.transits,PaidCheckpointFixture95(s.exampleFamily013Boundary,1)) /\ ResumeSearchAbility8(s.resume,s.resumed,11100) /\ EnterPaidInstruction95(<>,g.exampleFamily013Targets,g.nextImminentP,g.nextPlan,g.nextImminentPlan, [InstructionTargetsFixture93(g.nextPlan) EXCEPT !.targets={}],g.nextEntry) /\ ResolvePaidWithoutInterrupt95(<>,g.nextImminentP,g.nextResolvingP,g.nextImminentPlan,g.nextResolvingPlan, NoModifiersFixture95(g.nextImminentPlan),InstructionClearanceFixture93(g.nextImminentPlan,0,0)) /\ SearchRevealFound8(s.resumed,f.trashed,s.transits,7,TRUE,g.reveal) /\ SetAsideAbilityCanSee4(s.transits[7],11100,TRUE,FALSE) /\ CardBatchTransfer8(f.trashed,g.added,{7},[id \in {7} |-> 10],1..9,"SideBHand","Down",[id \in {7} |-> "SideBHand"]) SearchReactionDrainChecks911 == LET g == SearchReactionDrainFixture911 f == g.f s == f.q.s IN /\ SearchReactionDrainValid911(g) /\ g.closed.pending={} /\ ~g.closed.open /\ g.nextImminentPlan.index=2 /\ g.nextImminentP.ability.id=11100 /\ g.nextImminentP.ability.source=ObjectAbilitySource9(1) /\ g.added[10].card="Specimen0069" /\ g.added[10].zone="SideBHand" /\ 7 \notin DOMAIN g.added /\ f.trashed[9].card="Specimen0243" /\ g.added[9]=f.trashed[9] /\ ~PaidCheckpointWithConditionals96(f.q.pending,<>,s.exampleFamily013Boundary,g.exampleFamily013Targets,s.shuffled,s.transits,PaidCheckpointFixture95(s.exampleFamily013Boundary,1)) /\ ~EnterPaidInstruction95(<>,[g.exampleFamily013Targets EXCEPT !.phase="InstructionCheckpoint"],g.nextImminentP,g.nextPlan,g.nextImminentPlan, [InstructionTargetsFixture93(g.nextPlan) EXCEPT !.targets={}],g.nextEntry) /\ ~SearchRevealFound8(s.conditions,s.shuffled,s.transits,7,TRUE,g.reveal) SearchRandomCohortChecks911 == LET f == SearchExampleFamily041AtomicFixture911 badReceipt == [f.randomReceipt EXCEPT !.actualRngResult=7] badAfter == [id \in {1,2,5,6,8,9} |-> IF id=9 THEN [f.q.s.shuffled[7] EXCEPT !.zone="SideBDiscard",!.loc="SideBDiscard",!.face="Up"] ELSE f.q.s.shuffled[id]] IN /\ SearchRandomBHandRetireBound911(f.q.s.shuffled,f.trashed,f.randomReceipt,f.atomic,f.world) /\ CardBatchTransfer8(f.q.s.shuffled,badAfter,{7},[id \in {7} |-> 9],1..8,"SideBDiscard","Up",[id \in {7} |-> "SideBDiscard"]) /\ ~SearchRandomBHandRetireBound911(f.q.s.shuffled,badAfter,badReceipt,f.atomic,f.world) /\ ~SearchRandomBHandRetireBound911(f.q.s.shuffled,f.trashed,[f.randomReceipt EXCEPT !.cohort={5}], [f.atomic EXCEPT !.actualEffects[1].candidates={5}],f.world) /\ ~SearchRandomBHandRetireBound911(f.q.s.shuffled,f.trashed,[f.randomReceipt EXCEPT !.sourceSHA="ForeignSource"],f.atomic,f.world) Specimen0015PinnedSentencesFixture911 == <<"SyntheticText6dc25f72a12e","SyntheticText5b16ab2410a2">> Specimen0015TextFixture911 == [card |-> "NeutralValue00004",sourceSHA |-> CardFacts9["NeutralValue00004"].sourceSHA,source |-> ObjectAbilitySource9(2), definition |-> 101,barrierInstructionSlot |-> 1,sentences |-> Specimen0015PinnedSentencesFixture911, instructionIds |-> <<8100,8101>>,instructionKinds |-> <<"LookTop5","OptionalDeployVisible">>, excludedStaticText |-> "SyntheticText7fe7ecd09576",normalizationClause |-> "ProcedureCode8b36a14c1569"] Specimen0015LegacyCRFixture911 == [authority |-> "CRExampleOnly",clause |-> "ProcedureCoded0cd74215226",pdfPage |-> 84, pdfSHA |-> "0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e", describedCard |-> "Specimen0015",describedSentenceCount |-> 1,instructionKinds |-> <<"LookTop5","OptionalDeployVisible">>, normalizedInstructionCount |-> 2,isPinnedCardRecord |-> FALSE] Specimen0015DeckObjectFixture911(card) == ReplacementOverlay99(CardObject9(card,"SideADeck",FALSE,"Down"),[subtypes |-> {},deployCost |-> 0,deployX |-> FALSE]) Specimen0015TypedCallerFixture911 == LET syntax == [SyntaxFixture93(101,"BarrierInstruction","SideA","Barrier",<>) EXCEPT !.source=ObjectAbilitySource9(2)] definition == [syntax |-> syntax,activity |-> AbilityDefinition9(101,"BarrierInstruction",syntax.source,"Printed"),instructions |-> <<8100,8101>>] objects == [id \in {2} \cup 10..15 |-> IF id=2 THEN [CardObject9("NeutralValue00004","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE Specimen0015DeckObjectFixture911(CASE id=10 -> "Specimen0221" [] id=11 -> "Specimen0059" [] id=12 -> "Specimen0151" [] id=13 -> "NeutralValue00004" [] id=14 -> "NeutralValue00016" [] OTHER -> "Specimen0032")] deck == <<10,11,12,13,14,15>> e == [OpenEncounter6(20,2,2,FALSE,"traversal",<<101>>) EXCEPT !.stage="BarrierInstructions",!.paidReached=TRUE] state == NewBarrierInstructionOrder98(2,<<101>>,[id \in {101} |-> definition],[id \in {101} |-> "Specimen0015First"]) activity == SubActivityFixture98(e,objects,[id \in {101} |-> definition]) p == NewBarrierInstructionBarrierInstruction98(8000,101,definition,e,SubOwnerFixture98,"Play") loop == [NewBarrierInstructionLoop98(e,SubOwnerFixture98,<<101>>,0) EXCEPT !.current=8000,!.usedInstances={8000}] IN [definition |-> definition,objects |-> objects,deck |-> deck,e |-> e,control |-> SubControlFixture98(e),state |-> state, activity |-> activity,p |-> p,loop |-> loop,text |-> Specimen0015TextFixture911] Specimen0015DeployFixture911(objects,caller) == LET initial == OpenDeploy8(8200,10,"SideA","Down",caller,"NoValue") staged == [initial EXCEPT !.object=110,!.stage="ProcedureCode6eba7e0bfa75"] stagedObjects == [id \in (DOMAIN objects \ {10}) \cup {110} |-> IF id=110 THEN DeployStagingRow8(objects[10],"Down",TRUE) ELSE objects[id]] destination == [zone |-> "Play",loc |-> <<"Root","exampleFamily003AuxiliarySite">>,area |-> "Root",targetSite |-> "exampleFamily003AuxiliarySite", targetSiteKind |-> "SchemaAtom132",position |-> "NoValue",host |-> 0] declared == [staged EXCEPT !.destination=destination,!.stage="ProcedureCode61973f2a75d8"] afterLike == [declared EXCEPT !.stage="ProcedureCode1ff52d705816"] transaction == [id |-> 8201,procedureId |-> 8200,object |-> 110,allPaid |-> TRUE,basePart |-> [applicable |-> TRUE,exists |-> FALSE,amount |-> 0], deployCostIgnored |-> TRUE,paidSomething |-> FALSE,checkpointRequired |-> FALSE] barrier == [afterLike EXCEPT !.stage="CostBarrier",!.transaction=8201] ready == [barrier EXCEPT !.stage="ProcedureCode0f76bcc2eb00"] placed == [ready EXCEPT !.stage="ProcedureCode4585e6a51427"] deployedObjects == [stagedObjects EXCEPT ![110]=[WithCardLocation8(stagedObjects[110],destination) EXCEPT !.deployed=TRUE]] complete == [placed EXCEPT !.stage="Complete",!.complete=TRUE,!.deployedOccurred=TRUE] verified == [complete EXCEPT !.verificationDone=TRUE] returned == [verified EXCEPT !.returned=TRUE] targetSites == [targetSite \in CentralTargetSites4 \cup {"exampleFamily003AuxiliarySite"} |-> [kind |-> IF targetSite="exampleFamily003AuxiliarySite" THEN "SchemaAtom132" ELSE "SchemaAtom033"]] IN [initial |-> initial,staged |-> staged,stagedObjects |-> stagedObjects,destination |-> destination,declared |-> declared, afterLike |-> afterLike,transaction |-> transaction,barrier |-> barrier,ready |-> ready,placed |-> placed, deployedObjects |-> deployedObjects,complete |-> complete,verified |-> verified,returned |-> returned,targetSites |-> targetSites] Specimen0015DeployValid911(f,objects) == /\ BeginDeploy8(f.initial,f.staged,objects,f.stagedObjects,110,DOMAIN objects,TRUE,FALSE,TRUE) /\ DeclareDeployDestination8(f.staged,f.declared,f.stagedObjects,f.destination,FALSE,f.targetSites,DOMAIN f.targetSites,FALSE,TRUE,DOMAIN f.targetSites,{}) /\ FinishDeployLikeRetire8(f.declared,f.afterLike,f.stagedObjects,{}, {},[id \in DOMAIN f.stagedObjects |-> {f.stagedObjects[id].kind}], [id \in DOMAIN f.stagedObjects |-> "SideA"],LAMBDA trashed : Empty9,TRUE) /\ PayDeployStep8(f.afterLike,f.barrier,f.stagedObjects,f.transaction,0,TRUE) /\ DrainDeployCostBarrier8(f.barrier,f.ready,8201,0,TRUE) /\ DeployAtDestination8(f.ready,f.placed,f.stagedObjects,f.deployedObjects,f.targetSites,f.targetSites,DOMAIN f.targetSites,{},TRUE) /\ FinishDeploy8(f.placed,f.complete,f.deployedObjects,{DeployBeginEvent8(f.placed)}) /\ VerifyDeployedCard8(f.complete,f.verified,FALSE,TRUE,[performed |-> FALSE,object |-> 110,afterDeployment |-> TRUE]) Specimen0015VisibilityProcedureFixture911(deploy) == LET s == Specimen0015TypedCallerFixture911 cleared == [s.p EXCEPT !.phase="FirstTargets"] plan1 == OpenInstruction93(8100,"Ability",8000,ObjectAbilitySource9(2),"Play",1,"NoValue",<<"LookTopFive">>,FALSE) imminentPlan1 == [plan1 EXCEPT !.announced=TRUE,!.targets={},!.phase="Imminent"] imminent1 == [cleared EXCEPT !.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE,!.phase="Imminent"] resolvingPlan1 == [imminentPlan1 EXCEPT !.phase="Resolving"] resolving1 == [imminent1 EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] completePlan1 == [resolvingPlan1 EXCEPT !.cursor=2,!.completedSteps= <<"LookTopFive">>,!.phase="Complete"] finished1 == [resolving1 EXCEPT !.ability.phase="Between",!.phase="InstructionCheckpoint"] ledger0 == SubSeedFixture98(s.objects) cp1 == PlayEmptyCheckpointFixture97(ledger0,1,Empty9,s.objects,TRUE,0,BarrierInstructionInstructionCaller98(finished1)) ledger1 == ConditionalCommittedFixture96(ledger0,Empty9,cp1,Empty9,Empty9,Empty9) targets1 == [finished1 EXCEPT !.checkpoint=1,!.phase="Targets"] plan2 == OpenInstruction93(8101,"Ability",8000,ObjectAbilitySource9(2),"Play",2,"NoValue",<<"OptionalDeployVisible">>,TRUE) targets == IF deploy THEN {10} ELSE {} imminentPlan2 == [plan2 EXCEPT !.announced=TRUE,!.targets=targets,!.phase="Imminent"] entry2 == ReplacementOverlay99(InstructionEntryFixture93(plan2),[checkpointId |-> 1]) imminent2 == [targets1 EXCEPT !.ability.cursor=2,!.ability.phase="Imminent",!.checkpoint=0,!.phase="Imminent"] resolvingPlan2 == [imminentPlan2 EXCEPT !.phase="Resolving"] resolving2 == [imminent2 EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] deployed == Specimen0015DeployFixture911(s.objects,8000) afterObjects == IF deploy THEN deployed.deployedObjects ELSE s.objects completePlan2 == [resolvingPlan2 EXCEPT !.cursor=2,!.completedSteps= <<"OptionalDeployVisible">>,!.phase="Complete"] finished2 == [resolving2 EXCEPT !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE,!.phase="InstructionCheckpoint"] cp2 == PlayEmptyCheckpointFixture97(ledger1,2,Empty9,afterObjects,TRUE,0,BarrierInstructionInstructionCaller98(finished2)) ledger2 == ConditionalCommittedFixture96(ledger1,Empty9,cp2,Empty9,Empty9,Empty9) afterCP2 == [finished2 EXCEPT !.checkpoint=2,!.phase="AbilityComplete"] returned == [afterCP2 EXCEPT !.ability.returned=TRUE,!.phase="Returned"] afterEncounter == [s.e EXCEPT !.resolved={101}] afterLoop == [s.loop EXCEPT !.current=0,!.handled={101},!.resolved={101},!.history= <<[barrierInstruction |-> 101,instance |-> 8000,disposition |-> "Resolved",source |-> ObjectAbilitySource9(2)]>>] grant == [tag |-> "Specimen0015LookExecution",source |-> ObjectAbilitySource9(2),sourceSHA |-> CardFacts9["NeutralValue00004"].sourceSHA, abilityInstance |-> 8000,barrierInstruction |-> 101,instruction |-> InstructionWindowRef93(resolvingPlan1),viewer |-> "SideA",deck |-> s.deck, objects |-> SubIds6(SubSeq(s.deck,1,5)),carriedOut |-> TRUE] IN [s |-> s,deploy |-> deploy,cleared |-> cleared,plan1 |-> plan1,imminentPlan1 |-> imminentPlan1,imminent1 |-> imminent1, resolvingPlan1 |-> resolvingPlan1,resolving1 |-> resolving1,completePlan1 |-> completePlan1,finished1 |-> finished1, ledger0 |-> ledger0,cp1 |-> cp1,ledger1 |-> ledger1,targets1 |-> targets1,plan2 |-> plan2,targets |-> targets, imminentPlan2 |-> imminentPlan2,entry2 |-> entry2,imminent2 |-> imminent2,resolvingPlan2 |-> resolvingPlan2,resolving2 |-> resolving2, deployed |-> deployed,afterObjects |-> afterObjects,completePlan2 |-> completePlan2,finished2 |-> finished2, cp2 |-> cp2,ledger2 |-> ledger2,afterCP2 |-> afterCP2,returned |-> returned,afterEncounter |-> afterEncounter,afterLoop |-> afterLoop,grant |-> grant] Specimen0015VisibilityProcedureValid911(f) == /\ BarrierInstructionBarrierInstructionBound98(f.s.p) /\ BarrierInstructionImminent98(f.s.p) /\ NoBarrierInstructionInterrupt98(f.s.p,f.cleared,<<>>,SubNoModifiersFixture98(f.s.p),SubClearanceFixture98(f.s.p,0,0)) /\ EnterFirstBarrierInstructionInstruction98(f.cleared,f.imminent1,f.s.e,f.s.control,f.s.state,f.s.objects,{101},f.s.activity,[p \in SetupPlayers |-> 0],<<>>, f.plan1,f.imminentPlan1,[InstructionTargetsFixture93(f.plan1) EXCEPT !.targets={}],InstructionEntryFixture93(f.plan1)) /\ ResolveBarrierInstructionWithoutInterrupt98(f.imminent1,f.resolving1,<<>>,f.imminentPlan1,f.resolvingPlan1,NoModifiersFixture95(f.imminentPlan1),InstructionClearanceFixture93(f.imminentPlan1,0,0)) /\ CarryBarrierInstructionInstruction98(f.resolving1,f.finished1,<<>>,f.resolvingPlan1,f.completePlan1, [tag |-> "InstructionStepReturn",instruction |-> 8100,index |-> 1,step |-> "LookTopFive",complete |-> TRUE]) /\ ProcessConditionalCheckpoint99(f.ledger0,f.ledger1,<<>>,<<>>,Empty9,Empty9,f.cp1,Empty9,Empty9,Empty9,Empty9,Empty9,{},CardFacts9) /\ BarrierInstructionInstructionCheckpoint98(f.finished1,f.targets1,<<>>,f.ledger1,SubCPReceiptFixture98(f.finished1,1)) /\ EnterNextBarrierInstructionInstruction98(f.targets1,f.imminent2,<<>>,f.plan2,f.imminentPlan2,[InstructionTargetsFixture93(f.plan2) EXCEPT !.targets=f.targets],f.entry2) /\ ResolveBarrierInstructionWithoutInterrupt98(f.imminent2,f.resolving2,<<>>,f.imminentPlan2,f.resolvingPlan2,NoModifiersFixture95(f.imminentPlan2),InstructionClearanceFixture93(f.imminentPlan2,0,0)) /\ IF f.deploy THEN Specimen0015DeployValid911(f.deployed,f.s.objects) ELSE f.afterObjects=f.s.objects /\ CarryBarrierInstructionInstruction98(f.resolving2,f.finished2,<<>>,f.resolvingPlan2,f.completePlan2, [tag |-> "InstructionStepReturn",instruction |-> 8101,index |-> 1,step |-> "OptionalDeployVisible",complete |-> TRUE]) /\ ProcessConditionalCheckpoint99(f.ledger1,f.ledger2,<<>>,<<>>,Empty9,Empty9,f.cp2,Empty9,Empty9,Empty9,Empty9,Empty9,{},CardFacts9) /\ BarrierInstructionInstructionCheckpoint98(f.finished2,f.afterCP2,<<>>,f.ledger2,SubCPReceiptFixture98(f.finished2,2)) /\ IF f.deploy THEN ReturnDeployToCaller8(f.deployed.verified,f.deployed.returned,TRUE,8000) ELSE TRUE /\ FinishBarrierInstruction98(f.s.loop,f.afterLoop,f.afterCP2,f.returned,f.s.e,f.afterEncounter,<<>>) Specimen0015VisibilityProcedureChecks911 == /\ CardFacts9["NeutralValue00004"].kind="Barrier" /\ Len(Specimen0015PinnedSentencesFixture911)=2 /\ Specimen0015TextFixture911.normalizationClause="ProcedureCode8b36a14c1569" /\ Specimen0015TextFixture911.sourceSHA=CardFacts9["NeutralValue00004"].sourceSHA /\ Specimen0015LegacyCRFixture911.describedSentenceCount=1 /\ Specimen0015LegacyCRFixture911.normalizedInstructionCount=2 /\ ~Specimen0015LegacyCRFixture911.isPinnedCardRecord /\ Specimen0015LegacyCRFixture911.clause="ProcedureCoded0cd74215226" /\ \A deploy \in BOOLEAN : LET f == Specimen0015VisibilityProcedureFixture911(deploy) IN /\ Specimen0015VisibilityProcedureValid911(f) /\ f.grant.viewer="SideA" /\ f.grant.objects=10..14 /\ 15 \notin f.grant.objects /\ AbilityIsResolving9(f.finished1.ability) /\ AbilityIsResolving9(f.targets1.ability) /\ AbilityIsResolving9(f.imminent2.ability) /\ AbilityIsResolving9(f.resolving2.ability) /\ ~AbilityIsResolving9(f.finished2.ability) /\ f.finished2.ability.lastFinished /\ ~f.finished2.ability.returned /\ IF deploy THEN 10 \notin DOMAIN f.afterObjects /\ f.afterObjects[110].card=f.s.objects[10].card ELSE f.targets={} /\ f.afterObjects=f.s.objects Specimen0015VisibilityBoundaryChecks911 == LET f == Specimen0015VisibilityProcedureFixture911(FALSE) IN /\ Specimen0015VisibilityProcedureValid911(f) /\ ~BarrierInstructionInstructionCheckpoint98(f.finished1,f.targets1,<<>>,f.ledger0,SubCPReceiptFixture98(f.finished1,1)) /\ ~BarrierInstructionInstructionCheckpoint98(f.finished1,f.targets1,<<>>,f.ledger1,[SubCPReceiptFixture98(f.finished1,1) EXCEPT !.allNewerChainsComplete=FALSE]) /\ ~EnterNextBarrierInstructionInstruction98(f.finished1,f.imminent2,<<>>,f.plan2,f.imminentPlan2,[InstructionTargetsFixture93(f.plan2) EXCEPT !.targets={}],f.entry2) /\ ~EnterNextBarrierInstructionInstruction98(f.targets1,f.imminent2,<<>>,f.plan2,f.imminentPlan2,[InstructionTargetsFixture93(f.plan2) EXCEPT !.targets={}], [f.entry2 EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE]) /\ \A targets \in {[InstructionTargetsFixture93(f.plan2) EXCEPT !.targets={},!.source=ObjectAbilitySource9(3)], [InstructionTargetsFixture93(f.plan2) EXCEPT !.targets={},!.abilityInstance=8001], [InstructionTargetsFixture93(f.plan2) EXCEPT !.targets={},!.index=1]} : ~EnterNextBarrierInstructionInstruction98(f.targets1,f.imminent2,<<>>,f.plan2,f.imminentPlan2,targets,f.entry2) Specimen0015TechniqueProposalFixture911 == LET d == Specimen0015TypedCallerFixture911.definition nodes == [id \in {8100,8101} |-> [id |-> id,kind |-> IF id=8100 THEN "Look" ELSE "Plain", steps |-> IF id=8100 THEN <<"LookTopFive">> ELSE <<"OptionalDeployVisible">>,requiresTargets |-> id=8101, next |-> IF id=8100 THEN 8101 ELSE 0,options |-> Empty9,rank |-> IF id=8100 THEN 1 ELSE 0, segments |-> IF id=8100 THEN {1} ELSE {2}]] lexemes == LexicalSingleFixture99(d,"NeutralValue00004","look",1,"EffectOperator",CardFacts9) IN [tag |-> "NormalizedInstructionTechnique",definition |-> d,ability |-> 101,source |-> d.syntax.source, card |-> "NeutralValue00004",sourceSHA |-> CardFacts9["NeutralValue00004"].sourceSHA,lexemes |-> lexemes,entry |-> 8100,nodes |-> nodes, units |-> [id \in {1,2} |-> [category |-> "Trait",sentence |-> id,text |-> Specimen0015PinnedSentencesFixture911[id],rule |-> "ProcedureCode8b36a14c1569"]], originalUnits |-> d.syntax.units,nonoperative |-> {},linked |-> {}] Specimen0015LookExecutionFixture911(f) == [tag |-> "LookInstructionExecution",instance |-> f.resolving1.id,definition |-> f.resolving1.definition.syntax.id, instruction |-> InstructionWindowRef93(f.resolvingPlan1),source |-> f.resolving1.ability.source,player |-> "SideA",amount |-> 5, zone |-> "SideADeck",deck |-> f.s.deck,carriedOut |-> TRUE,card |-> "NeutralValue00004",sourceSHA |-> CardFacts9["NeutralValue00004"].sourceSHA, operation |-> 1,context |-> [id |-> 8850,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(f.resolvingPlan1), actualEffects |-> [id \in {1} |-> [kind |-> "Look",amount |-> 5,player |-> "SideA",zone |-> "SideADeck"]]]] Specimen0015OwnersFixture911(p) == [id \in {p.id} |-> p] Specimen0015GrantAfterFixture911(before,id,p,plan,objects,deck,execution) == ReplacementOverlay99(before,[key \in {id} |-> ScopedLookGrant911(id,p,plan,objects,deck,execution)]) Specimen0015OwnerRowFixture911(p) == [ability |-> p.definition.syntax.id,sourceObject |-> p.ability.source.object, status |-> IF p.ability.complete THEN "Complete" ELSE IF p.ability.phase="Imminent" THEN "Imminent" ELSE "Resolving",owner |-> p] Specimen0015GrantFixture911(deploy) == LET f == Specimen0015VisibilityProcedureFixture911(deploy) execution == Specimen0015LookExecutionFixture911(f) grants == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution) world == [LifetimeWorldFixture910 EXCEPT !.objects=f.s.objects,!.present={101},!.control=f.s.control, !.encounters=[id \in {20} |-> f.s.e],!.currentEncounter=20,!.barrierResponseCards={},!.activity.instances=[id \in {8000} |-> Specimen0015OwnerRowFixture911(f.resolving1)]] authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) IN [f |-> f,execution |-> execution,grants |-> grants,world |-> world,authority |-> authority,lifetimes |-> lifetimes] Specimen0015GrantValid911(g) == LET f == g.f IN /\ Specimen0015VisibilityProcedureValid911(f) /\ OpenObservedLingering910(g.authority,g.lifetimes) /\ GrantCurrentInstructionLook911(Empty9,g.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9,g.lifetimes,g.authority) Specimen0015LookGrantScopeChecks911 == \A deploy \in BOOLEAN : LET g == Specimen0015GrantFixture911(deploy) f == g.f IN /\ Specimen0015GrantValid911(g) /\ g.grants[8800].instance=8000 /\ g.grants[8800].definition=101 /\ g.grants[8800].source=ObjectAbilitySource9(2) /\ g.grants[8800].objects=10..14 /\ g.grants[8800].instruction=InstructionWindowRef93(f.resolvingPlan1) /\ \A viewer \in SetupPlayers : \A object \in 10..15 : /\ ~DefaultZoneLook4("SideADeck","Down",viewer,"SideA") /\ ScopedLookPermission911(g.grants,8800,viewer,object,Specimen0015OwnersFixture911(f.resolving1),f.s.objects)= (viewer="SideA" /\ object \in 10..14) /\ ~ScopedLookPermission911(g.grants,8801,"SideA",10,Specimen0015OwnersFixture911(f.resolving1),f.s.objects) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",10,Empty9,f.s.objects) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",999,Specimen0015OwnersFixture911(f.resolving1),f.s.objects) Specimen0015LookLifetimeChecks911 == \A deploy \in BOOLEAN : LET g == Specimen0015GrantFixture911(deploy) f == g.f IN /\ Specimen0015GrantValid911(g) /\ \A p \in {f.resolving1,f.finished1,f.targets1,f.imminent2,f.resolving2} : /\ BarrierInstructionBarrierInstructionBound98(p) /\ ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(p),f.s.objects) /\ \A p \in {f.s.p,f.finished2,f.afterCP2,f.returned} : ~ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(p),f.afterObjects) /\ f.finished2.ability.lastFinished /\ f.finished2.ability.complete /\ ~f.finished2.ability.returned /\ f.cp2.id=2 /\ f.finished2.checkpoint=0 Specimen0015LookOwnerProfileChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f foreign == [f.resolving2 EXCEPT !.id=8001,!.ability.id=8001] otherDefinition == [f.resolving2 EXCEPT !.barrierInstruction=102,!.definition.syntax.id=102,!.definition.activity.id=102, !.payload.syntax.id=102,!.payload.activity.id=102] otherSource == [f.resolving2 EXCEPT !.barrierCard=3,!.ability.source=ObjectAbilitySource9(3), !.definition.syntax.source=ObjectAbilitySource9(3),!.definition.activity.source=ObjectAbilitySource9(3), !.payload.syntax.source=ObjectAbilitySource9(3),!.payload.activity.source=ObjectAbilitySource9(3)] IN /\ Specimen0015GrantValid911(g) /\ BarrierInstructionBarrierInstructionBound98(foreign) /\ BarrierInstructionBarrierInstructionBound98(otherDefinition) /\ BarrierInstructionBarrierInstructionBound98(otherSource) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(foreign),f.s.objects) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",11,[id \in {8000} |-> foreign],f.s.objects) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(otherDefinition),f.s.objects) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(otherSource),f.s.objects) Specimen0015LookObjectProfileChecks911 == LET g == Specimen0015GrantFixture911(TRUE) f == g.f deckSuccessor == [id \in (DOMAIN f.s.objects \ {10}) \cup {110} |-> IF id=110 THEN f.s.objects[10] ELSE f.s.objects[id]] IN /\ Specimen0015GrantValid911(g) /\ Specimen0015DeployValid911(f.deployed,f.s.objects) /\ f.deployed.deployedObjects[110].card=f.s.objects[10].card /\ 10 \notin DOMAIN f.deployed.deployedObjects /\ ~ScopedLookPermission911(g.grants,8800,"SideA",110,Specimen0015OwnersFixture911(f.resolving2),f.deployed.deployedObjects) /\ ~ScopedLookPermission911(g.grants,8800,"SideA",10,Specimen0015OwnersFixture911(f.resolving2),f.deployed.deployedObjects) /\ ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(f.resolving2),f.deployed.deployedObjects) /\ deckSuccessor[110].zone="SideADeck" /\ deckSuccessor[110].card=f.s.objects[10].card /\ ~ScopedLookPermission911(g.grants,8800,"SideA",110,Specimen0015OwnersFixture911(f.resolving2),deckSuccessor) Specimen0015LookSourceIndependenceChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f missingSource == [id \in DOMAIN f.s.objects \ {2} |-> f.s.objects[id]] inactiveSource == [f.s.objects EXCEPT ![2].activated=FALSE,![2].face="Down"] absentGrant == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,f.resolvingPlan1,missingSource,f.s.deck,g.execution) IN /\ Specimen0015GrantValid911(g) /\ Deactivation8(f.s.objects,inactiveSource,2,TRUE,{[tag |-> "Deactivation",object |-> 2]}) /\ ~PlayCardDefaultActive4(inactiveSource[2],TRUE,CardFacts9,FALSE) /\ ScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(f.resolving2),inactiveSource) /\ GrantInstructionLook911(Empty9,absentGrant,8800,f.resolving1,f.resolvingPlan1,missingSource,f.s.deck,g.execution,CardFacts9) /\ ScopedLookPermission911(absentGrant,8800,"SideA",11,Specimen0015OwnersFixture911(f.resolving2),missingSource) Specimen0015LookExecutionProfileChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f after(execution) == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution) IN /\ Specimen0015GrantValid911(g) /\ \A execution \in {[g.execution EXCEPT !.tag="OtherExecution"],[g.execution EXCEPT !.instance=8001], [g.execution EXCEPT !.definition=102],[g.execution EXCEPT !.instruction.id=8101],[g.execution EXCEPT !.source=ObjectAbilitySource9(3)], [g.execution EXCEPT !.sourceSHA="ForeignSHA"],[g.execution EXCEPT !.carriedOut=FALSE], [g.execution EXCEPT !.deck= <<11,10,12,13,14,15>>],[g.execution EXCEPT !.context.phase="Imminent"], [g.execution EXCEPT !.context.currentRef.id=8101],[g.execution EXCEPT !.context.actualEffects[1].kind="NotLook"], [g.execution EXCEPT !.operation=2],[g.execution EXCEPT !.context.actualEffects[1].zone="SideBDeck"]} : ~GrantInstructionLook911(Empty9,after(execution),8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution,CardFacts9) /\ \A execution \in {[g.execution EXCEPT !.amount=4],[g.execution EXCEPT !.player="SideB"]} : ~GrantInstructionLook911(Empty9,after(execution),8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution,CardFacts9) /\ ~GrantInstructionLook911(g.grants,g.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9) Specimen0015LookSourceTechniqueChecks911 == LET p == Specimen0015TechniqueProposalFixture911 objects == Specimen0015TypedCallerFixture911.objects IN /\ InstructionTechniqueValid911(p) /\ InstructionTechniqueSource911(p,objects,CardFacts9) /\ p.sourceSHA=Specimen0015TextFixture911.sourceSHA /\ p.nodes[8100].kind="Look" /\ p.nodes[8100].next=8101 /\ p.nodes[8101].requiresTargets /\ p.nodes[8101].next=0 /\ \A bad \in {[p EXCEPT !.card="NeutralValue00016"],[p EXCEPT !.source=ObjectAbilitySource9(3)], [p EXCEPT !.originalUnits= <>]} : ~InstructionTechniqueSource911(bad,objects,CardFacts9) /\ \A card \in {"NeutralValue00004","NeutralValue00016"} : LET wrong == [p EXCEPT !.sourceSHA=IF card="NeutralValue00004" THEN "ForeignSHA" ELSE CardFacts9[card].sourceSHA] IN ~InstructionTechniqueSource911(wrong,objects,CardFacts9) Specimen0015LookReadReceiptFixture911(authority,viewer,object,allowed) == [tag |-> "CurrentScopedLookPermission",worldId |-> authority.current.id,grantId |-> 8800,viewer |-> viewer,object |-> object,allowed |-> allowed] Specimen0015LookCurrentAuthorityChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f kernelWorld == [LifetimeWorldProjection910(g.world) EXCEPT !.id=2,!.activity.instances=[id \in {8000} |-> Specimen0015OwnerRowFixture911(f.targets1)]] kernelExecution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 8890,snapshotId |-> 2, source |-> RuleAbilitySource9("CheckpointCharacteristicEvaluation911"),checkpointId |-> f.cp1.id,caller |-> BarrierInstructionInstructionCaller98(f.finished1)] a2 == LifetimeAuthorityAfter910(g.authority,LifetimeKernelTransition910(g.world,kernelWorld,kernelExecution)) r2 == [g.lifetimes EXCEPT !.frontier=LifetimeFrontier910(a2,2)] owners == Specimen0015OwnersFixture911(f.targets1) receipt == Specimen0015LookReadReceiptFixture911(a2,"SideA",11,TRUE) IN /\ Specimen0015GrantValid911(g) /\ CommitLifetimeKernelCore910(g.authority,a2,kernelWorld,kernelExecution) /\ ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,owners,f.s.objects,g.lifetimes,a2,receipt) /\ ~GrantCurrentInstructionLook911(Empty9,g.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9,g.lifetimes,a2) /\ PublishNextLifetime910(g.lifetimes,r2,a2) /\ ReadScopedLookPermission911(g.grants,8800,"SideA",11,owners,f.s.objects,r2,a2,receipt) /\ \A bad \in {[receipt EXCEPT !.tag="OtherReceipt"],[receipt EXCEPT !.worldId=1],[receipt EXCEPT !.grantId=8801], [receipt EXCEPT !.viewer="SideB"],[receipt EXCEPT !.object=10],[receipt EXCEPT !.allowed=FALSE]} : ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,owners,f.s.objects,r2,a2,bad) /\ ReadScopedLookPermission911(g.grants,8800,"SideB",11,owners,f.s.objects,r2,a2,Specimen0015LookReadReceiptFixture911(a2,"SideB",11,FALSE)) Specimen0015OwnerObservationFixture911(before,p,id) == LET world == [before.current EXCEPT !.id=id,!.activity.instances=[instance \in {p.id} |-> Specimen0015OwnerRowFixture911(p)]] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 8900+id,snapshotId |-> id, source |-> RuleAbilitySource9("SharedSchedulerOwnerObservation911"),owner |-> p] IN [world |-> world,execution |-> execution,authority |-> LifetimeAuthorityAfter910(before,LifetimeKernelTransition910(before.current,world,execution))] Specimen0015LookAuthoritativeOwnerChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f cp == Specimen0015OwnerObservationFixture911(g.authority,f.targets1,2) r2 == [g.lifetimes EXCEPT !.frontier=LifetimeFrontier910(cp.authority,2)] terminal == Specimen0015OwnerObservationFixture911(cp.authority,f.finished2,3) r3 == [r2 EXCEPT !.frontier=LifetimeFrontier910(terminal.authority,3)] current == Specimen0015OwnersFixture911(f.finished2) stale == Specimen0015OwnersFixture911(f.resolving2) falseReceipt == Specimen0015LookReadReceiptFixture911(terminal.authority,"SideA",11,FALSE) trueReceipt == [falseReceipt EXCEPT !.allowed=TRUE] IN /\ Specimen0015GrantValid911(g) /\ CommitLifetimeKernelCore910(g.authority,cp.authority,cp.world,cp.execution) /\ PublishNextLifetime910(g.lifetimes,r2,cp.authority) /\ ReadScopedLookPermission911(g.grants,8800,"SideA",11,Specimen0015OwnersFixture911(f.targets1),f.s.objects,r2,cp.authority, Specimen0015LookReadReceiptFixture911(cp.authority,"SideA",11,TRUE)) /\ CommitLifetimeKernelCore910(cp.authority,terminal.authority,terminal.world,terminal.execution) /\ ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,current,f.s.objects,r2,terminal.authority,falseReceipt) /\ PublishNextLifetime910(r2,r3,terminal.authority) /\ ReadScopedLookPermission911(g.grants,8800,"SideA",11,current,f.s.objects,r3,terminal.authority,falseReceipt) /\ ~f.finished2.ability.returned /\ f.finished2.checkpoint=0 /\ ScopedLookPermission911(g.grants,8800,"SideA",11,stale,f.s.objects) /\ ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,stale,f.s.objects,r3,terminal.authority,trueReceipt) /\ ~GrantCurrentInstructionLook911(Empty9,g.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9,r2,cp.authority) Specimen0015LookReplayChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f reordered == <<15,11,12,13,14,10>> replay == [g.execution EXCEPT !.deck=reordered] after == Specimen0015GrantAfterFixture911(g.grants,8801,f.resolving1,f.resolvingPlan1,f.s.objects,reordered,replay) IN /\ Specimen0015GrantValid911(g) /\ ~GrantInstructionLook911(g.grants,after,8801,f.resolving1,f.resolvingPlan1,f.s.objects,reordered,replay,CardFacts9) /\ LET execution == [g.execution EXCEPT !.context.id=8851] fresh == Specimen0015GrantAfterFixture911(g.grants,8801,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution) IN GrantInstructionLook911(g.grants,fresh,8801,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution,CardFacts9) Specimen0015LookWorldAndMetadataChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f owners == Specimen0015OwnersFixture911(f.resolving1) receipt == Specimen0015LookReadReceiptFixture911(g.authority,"SideA",11,TRUE) added == ReplacementOverlay99(f.s.objects,[id \in {16} |-> Specimen0015DeckObjectFixture911("Specimen0221")]) changedSource == [f.s.objects EXCEPT ![2].card="NeutralValue00016"] wrongGrant == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,f.resolvingPlan1,changedSource,f.s.deck,g.execution) IN /\ Specimen0015GrantValid911(g) /\ ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,owners,added,g.lifetimes,g.authority,receipt) /\ ~GrantCurrentInstructionLook911(Empty9,g.grants,8800,f.resolving1,f.resolvingPlan1,added,f.s.deck,g.execution,CardFacts9,g.lifetimes,g.authority) /\ ~GrantInstructionLook911(Empty9,wrongGrant,8800,f.resolving1,f.resolvingPlan1,changedSource,f.s.deck,g.execution,CardFacts9) /\ \A field \in {"ability","sourceObject"} : LET world == [g.world EXCEPT !.activity.instances[8000][field]=999] authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) IN ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,owners,f.s.objects,lifetimes,authority,Specimen0015LookReadReceiptFixture911(authority,"SideA",11,TRUE)) Specimen0015Full99LookPrefixFixture911 == LET f == Specimen0015VisibilityProcedureFixture911(FALSE) entry == [tag |-> "ActualInstructionEntry",id |-> 8950,snapshotId |-> 1,kind |-> "BarrierInstructionFirst", before |-> f.cleared,after |-> f.imminent1,beforePlan |-> f.plan1,afterPlan |-> f.imminentPlan1, stackBefore |-> <<>>,stackAfter |-> <<>>,owner |-> f.s.p.owner,encounter |-> f.s.e,orderState |-> f.s.state, present |-> {101},activity |-> f.s.activity,points |-> [p \in SetupPlayers |-> 0], targets |-> [InstructionTargetsFixture93(f.plan1) EXCEPT !.targets={}],receipt |-> InstructionEntryFixture93(f.plan1)] origin == [kind |-> "Instruction",plan |-> f.imminentPlan1,parent |-> f.imminent1.ability,ruleStep |-> "NoValue"] snapshot == ConditionalSnapshotFixture96(1,0,"Specimen0015LookImminent",Empty9,f.s.objects) ledger == NewConditionalLedger96(snapshot) base == [LifetimeWorldFixture910 EXCEPT !.objects=f.s.objects,!.present={101},!.control=f.s.control, !.encounters=[id \in {20} |-> f.s.e],!.currentEncounter=20,!.barrierResponseCards={}, !.activity.instances=[id \in {8000} |-> Specimen0015OwnerRowFixture911(f.imminent1)]] world == ReplacementOverlay99(base,[tag |-> "CurrentInterruptWorld",traversalControl |-> f.s.control, controllers |-> [id \in DOMAIN f.s.objects |-> "SideA"],activePeriods |-> Empty9,conditional |-> snapshot, paidDefinitions |-> Empty9,lexemes |-> Empty9,capabilities |-> Empty9,paidContexts |-> Empty9,turnUses |-> Empty9, replacementDefinitions |-> Empty9,liveReplacementIds |-> {},entries |-> [id \in {8950} |-> entry],ruleInvocations |-> Empty9]) atom == ReplacementOverlay99(ReplacementAtomFixture99(1,1,"Look",FALSE,0), [baseOrigin |-> ObjectAbilitySource9(2),baseController |-> "SideA",actor |-> "SideA",value |-> 5,targetSite |-> "NoValue", amount |-> 5,player |-> "SideA",zone |-> "SideADeck",preventable |-> TRUE]) effects == [id \in {1} |-> atom] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> ObjectAbilitySource9(2), snapshotId |-> 1,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> 1,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(8951,8950,origin,world,description,effects,f.s.p.owner) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={8950},!.usedContextIds={8951},!.contexts=[id \in {8951} |-> context]] initialObservation == InitialWouldObservation99(context,8952) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,initialObservation) prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=8953,!.group=89] site == TraversalPrioritySite9(world.turn,f.s.control.traversal,ApproachFixture92,LayoutFixture92,TraversalContextFixture92(f.s.control.traversal)) noWindow == [prepared EXCEPT !.phase="Cleared",!.site=site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] atomicOrigin == [origin EXCEPT !.plan=f.resolvingPlan1,!.parent=f.resolving1.ability] a0 == NewLifetimeAuthority910(base) r0 == ObservedWithFrontier910(NewLingeringRegistry910,a0,1) observed == Specimen0015OwnerObservationFixture911(a0,f.resolving1,2) ready == [r0 EXCEPT !.frontier=LifetimeFrontier910(observed.authority,2)] execution == [Specimen0015LookExecutionFixture911(f) EXCEPT !.context=atomic] grants == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,execution) IN [f |-> f,entry |-> entry,origin |-> origin,world |-> world,ledger |-> ledger,effects |-> effects,description |-> description, projection |-> projection,context |-> context,registry |-> registry,initialObservation |-> initialObservation,history |-> history, prepared |-> prepared,site |-> site,noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared,atomic |-> atomic,atomicOrigin |-> atomicOrigin, a0 |-> a0,r0 |-> r0,observed |-> observed,ready |-> ready,execution |-> execution,grants |-> grants] Specimen0015Full99LookPrefixChecks911 == LET s == Specimen0015Full99LookPrefixFixture911 f == s.f IN /\ Specimen0015VisibilityProcedureValid911(f) /\ CurrentInterruptWorld99(s.world,s.ledger,CardFacts9) /\ BeginExpectedContext99(NewExpectedRegistry99,s.registry,s.context.id,s.origin,s.world,s.entry,s.description,s.projection,s.effects,f.s.p.owner,CardFacts9, NewWouldAccounting99,s.history,s.initialObservation) /\ PrepareOpeningInterrupts99(s.context,s.prepared,s.ledger,s.ledger,s.origin,s.world,s.history,8953,89,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(s.prepared,s.noWindow,s.origin,s.world,s.history,s.ledger,<<>>,s.site,CardFacts9) /\ ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin,s.world,s.history,s.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ BeginClearedAbilityInstruction99(s.cleared,s.atomic,s.origin,s.atomicOrigin,s.world,s.ledger,s.ledger,<<>>, [kind |-> "BarrierInstruction",before |-> f.imminent1,after |-> f.resolving1],s.clearance,f.resolvingPlan1) /\ CommitLifetimeKernelCore910(s.a0,s.observed.authority,s.observed.world,s.observed.execution) /\ PublishNextLifetime910(s.r0,s.ready,s.observed.authority) /\ GrantCurrentInstructionLook911(Empty9,s.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,s.execution,CardFacts9,s.ready,s.observed.authority) /\ ReadScopedLookPermission911(s.grants,8800,"SideA",10,Specimen0015OwnersFixture911(f.resolving1),f.s.objects,s.ready,s.observed.authority, Specimen0015LookReadReceiptFixture911(s.observed.authority,"SideA",10,TRUE)) /\ ~GrantCurrentInstructionLook911(Empty9,s.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck, [s.execution EXCEPT !.context.phase="InstructionCleared"],CardFacts9,s.ready,s.observed.authority) Specimen0015LookPrivatePhaseChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f IN /\ Specimen0015GrantValid911(g) /\ \A p \in {[f.resolving1 EXCEPT !.phase="Imminent"],[f.resolving1 EXCEPT !.ability.phase="Imminent"], [f.resolving1 EXCEPT !.ability.firstImminent=FALSE]} : LET after == Specimen0015GrantAfterFixture911(Empty9,8800,p,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution) IN ~GrantInstructionLook911(Empty9,after,8800,p,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9) /\ LET p == [f.resolving1 EXCEPT !.id=8001] execution == [g.execution EXCEPT !.instance=8001] after == Specimen0015GrantAfterFixture911(Empty9,8800,p,f.resolvingPlan1,f.s.objects,f.s.deck,execution) IN ~GrantInstructionLook911(Empty9,after,8800,p,f.resolvingPlan1,f.s.objects,f.s.deck,execution,CardFacts9) /\ LET plan == [f.resolvingPlan1 EXCEPT !.phase="Imminent"] after == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,plan,f.s.objects,f.s.deck,g.execution) IN ~GrantInstructionLook911(Empty9,after,8800,f.resolving1,plan,f.s.objects,f.s.deck,g.execution,CardFacts9) /\ LET plan == [f.resolvingPlan1 EXCEPT !.source=ObjectAbilitySource9(3)] execution == [g.execution EXCEPT !.instruction=InstructionWindowRef93(plan),!.context.currentRef=InstructionWindowRef93(plan)] after == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,plan,f.s.objects,f.s.deck,execution) IN ~GrantInstructionLook911(Empty9,after,8800,f.resolving1,plan,f.s.objects,f.s.deck,execution,CardFacts9) Specimen0015LookCompleteProjectionChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f a0 == g.authority noChange == [a0.current EXCEPT !.id=2] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 8990,snapshotId |-> 2, source |-> RuleAbilitySource9("StructuralLookObservation911")] a2 == LifetimeAuthorityAfter910(a0,LifetimeKernelTransition910(a0.current,noChange,execution)) r2 == [g.lifetimes EXCEPT !.frontier=LifetimeFrontier910(a2,2)] owners == Specimen0015OwnersFixture911(f.resolving1) noOwnersWorld == [g.world EXCEPT !.activity.instances=Empty9] noOwnersAuthority == NewLifetimeAuthority910(noOwnersWorld) noOwnersLifetimes == ObservedWithFrontier910(NewLingeringRegistry910,noOwnersAuthority,1) IN /\ Specimen0015GrantValid911(g) /\ CommitLifetimeKernelCore910(a0,a2,noChange,execution) /\ ~GrantCurrentInstructionLook911(Empty9,g.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9,g.lifetimes,a2) /\ PublishNextLifetime910(g.lifetimes,r2,a2) /\ GrantCurrentInstructionLook911(Empty9,g.grants,8800,f.resolving1,f.resolvingPlan1,f.s.objects,f.s.deck,g.execution,CardFacts9,r2,a2) /\ ~ReadScopedLookPermission911(g.grants,8800,"SideA",11,Empty9,f.s.objects,r2,a2,Specimen0015LookReadReceiptFixture911(a2,"SideA",11,FALSE)) /\ ReadScopedLookPermission911(g.grants,8800,"SideA",11,Empty9,f.s.objects,noOwnersLifetimes,noOwnersAuthority, Specimen0015LookReadReceiptFixture911(noOwnersAuthority,"SideA",11,FALSE)) Specimen0015LookFiniteDeckChecks911 == LET g == Specimen0015GrantFixture911(FALSE) f == g.f IN /\ Specimen0015GrantValid911(g) /\ \A count \in 0..6 : LET deck == SubSeq(f.s.deck,1,count) objects == [id \in {2} \cup SubIds6(deck) |-> f.s.objects[id]] execution == [g.execution EXCEPT !.deck=deck] grants == Specimen0015GrantAfterFixture911(Empty9,8800,f.resolving1,f.resolvingPlan1,objects,deck,execution) IN /\ GrantInstructionLook911(Empty9,grants,8800,f.resolving1,f.resolvingPlan1,objects,deck,execution,CardFacts9) /\ Cardinality(grants[8800].objects)=MinOf(5,count) /\ grants[8800].objects=SubIds6(SubSeq(deck,1,MinOf(5,count))) /\ \A object \in SubIds6(deck) : ScopedLookPermission911(grants,8800,"SideA",object,Specimen0015OwnersFixture911(f.resolving1),objects)= (object \in grants[8800].objects) NormalizationObjectsFixture911(card) == [id \in {1} |-> [CardObject9(card,"Play",CardFacts9[card].kind \notin {"Action","Plan"},"Up") EXCEPT !.activated=CardFacts9[card].side="SideA" /\ CardFacts9[card].kind \in {"Facility","Attachment","Barrier"}]] NormalizationDefinitionFixture911(id,card,kind,units,instructions) == LET syntax == SyntaxFixture93(id,kind,CardFacts9[card].side,CardFacts9[card].kind,units) IN [syntax |-> syntax,activity |-> AbilityDefinition9(id,kind,syntax.source,"Printed"),instructions |-> instructions] NormalizationTechniqueFixture911(card,d,word,wordUnit,units,nodes,entry,groups) == [tag |-> "NormalizedInstructionTechnique",definition |-> d,ability |-> d.syntax.id,source |-> d.syntax.source,card |-> card, sourceSHA |-> CardFacts9[card].sourceSHA,lexemes |-> LexicalSingleFixture99(d,card,word,wordUnit,"EffectOperator",CardFacts9), originalUnits |-> d.syntax.units,units |-> units,nodes |-> nodes,entry |-> entry,groups |-> groups, nonoperative |-> {u \in DOMAIN units : units[u].category \in {"Restriction","SchemaAtom043","Clarification","Declaration"}}, linked |-> {u \in DOMAIN units : units[u].category="LinkedAbility"}] NormalizationRegraphFixture911(p,order,nodes,groups) == LET d == [p.definition EXCEPT !.instructions=order] IN [p EXCEPT !.definition=d,!.lexemes.definition=d,!.nodes=nodes,!.groups=groups] NormalizationSpecimen0243Fixture911 == LET d == NormalizationDefinitionFixture911(1000,"Specimen0243","Play",<>,<<1001>>) units == [u \in {1,2} |-> IF u=1 THEN [category |-> "Trait",shape |-> "TargetOnly",sentence |-> 1, text |-> "SyntheticText8adf464e5286",onlyTargets |-> TRUE,otherEffects |-> FALSE] ELSE [category |-> "Trait",shape |-> "Effect",sentence |-> 2,actsOnChoice |-> TRUE, text |-> "SyntheticTextffd3e9496ac4"]] nodes == [id \in {1001} |-> InstructionNode911(id,"Plain",<<"GainSentryCodeGateBarrierUntilTurnEnd">>,TRUE,0,Empty9,0,{1,2})] groups == <<[rule |-> "ProcedureCoded3a7d2154f9f",units |-> {1,2},nodes |-> <<1001>>,join |-> 0]>> IN NormalizationTechniqueFixture911("Specimen0243",d,"choose",1,units,nodes,1001,groups) NormalizationExampleFamily057Fixture911 == LET d == NormalizationDefinitionFixture911(2000,"Specimen0217","Play",<>,<<2001,2002,2003>>) units == [u \in {1} |-> [category |-> "Trait",shape |-> "MultiCard",sentence |-> 1,action |-> "Deploy",count |-> 3,optional |-> TRUE, payAllDeployCosts |-> TRUE,text |-> "SyntheticText1ecabfd5b50c"]] nodes == [id \in 2001..2003 |-> ReplacementOverlay99(InstructionNode911(id,"PerCard",<<"OptionalDeployCentralAPayingAllCosts">>,TRUE, IF id=2003 THEN 0 ELSE id+1,Empty9,2003-id,{1}),[cardAction |-> "Deploy",cardOrdinal |-> id-2000,optional |-> TRUE,payAllDeployCosts |-> TRUE])] groups == <<[rule |-> "ProcedureCode3a5790c241a3",units |-> {1},nodes |-> <<2001,2002,2003>>,join |-> 0]>> IN NormalizationTechniqueFixture911("Specimen0217",d,"deploy",1,units,nodes,2001,groups) NormalizationSpecimen0075Fixture911 == LET d == NormalizationDefinitionFixture911(3000,"Specimen0075","Paid",<>,<<3001,3002>>) units == [u \in {1,2} |-> IF u=1 THEN [category |-> "Trait",shape |-> "SearchAndAct",sentence |-> 1, criterion |-> "ClusterTechnique",foundEffects |-> <<"Reveal","AddBHand">>, text |-> "SyntheticTextca95582896be"] ELSE [category |-> "Trait",shape |-> "PrintedSearchShuffle",sentence |-> 2,text |-> "SyntheticText47b7ea5c9468"]] nodes == [id \in {3001,3002} |-> IF id=3001 THEN ReplacementOverlay99( InstructionNode911(id,"Search",<<"SearchClusterSetAsideAndRequiredShuffle">>,FALSE,3002,Empty9,1,{1,2}),[searchShuffleRequired |-> TRUE]) ELSE ReplacementOverlay99(InstructionNode911(id,"Plain",<<"RevealAndAddFoundClusterToBHand">>,TRUE,0,Empty9,0,{1}),[foundAction |-> TRUE])] groups == <<[rule |-> "ProcedureCode1e9a46bbcc9d",units |-> {1,2},nodes |-> <<3001,3002>>,join |-> 0,dischargedShuffleUnits |-> {2}]>> IN NormalizationTechniqueFixture911("Specimen0075",d,"search",2,units,nodes,3001,groups) NormalizationNamedBaseChecks911 == /\ CompiledInstructionTechnique911(NormalizationSpecimen0243Fixture911,NormalizationObjectsFixture911("Specimen0243"),CardFacts9) /\ CompiledInstructionTechnique911(NormalizationExampleFamily057Fixture911,NormalizationObjectsFixture911("Specimen0217"),CardFacts9) /\ CompiledInstructionTechnique911(NormalizationSpecimen0075Fixture911,NormalizationObjectsFixture911("Specimen0075"),CardFacts9) /\ CardFacts9["Specimen0069"].kind="Technique" /\ NormalizationSpecimen0075Fixture911.units[1].criterion="ClusterTechnique" NormalizationExampleFamily057EarlyEndProbe911 == [NormalizationExampleFamily057Fixture911 EXCEPT !.nodes[2001].next=0] NormalizationSpecimen0075WrongProvenanceProbe911 == [NormalizationSpecimen0075Fixture911 EXCEPT !.nodes[3002].segments={2}] NormalizationSpecimen0075EarlyEndProbe911 == [NormalizationSpecimen0075Fixture911 EXCEPT !.nodes[3001].next=0] NormalizationRepairRegressionChecks911 == /\ NormalizationNamedBaseChecks911 /\ ~CompiledInstructionTechnique911(NormalizationExampleFamily057EarlyEndProbe911,NormalizationObjectsFixture911("Specimen0217"),CardFacts9) /\ ~CompiledInstructionTechnique911(NormalizationSpecimen0075WrongProvenanceProbe911,NormalizationObjectsFixture911("Specimen0075"),CardFacts9) /\ ~CompiledInstructionTechnique911(NormalizationSpecimen0075EarlyEndProbe911,NormalizationObjectsFixture911("Specimen0075"),CardFacts9) NormalizationSpecimen0015Fixture911 == LET d == NormalizationDefinitionFixture911(4000,"NeutralValue00004","BarrierInstruction",<>,<<4001,4002>>) units == [u \in {1,2} |-> IF u=1 THEN [category |-> "Trait",shape |-> "Single",sentence |-> 1,text |-> "SyntheticText6dc25f72a12e"] ELSE [category |-> "Trait",shape |-> "Effect",sentence |-> 2,text |-> "SyntheticText5b16ab2410a2"]] nodes == [id \in {4001,4002} |-> IF id=4001 THEN InstructionNode911(id,"Look",<<"LookTopFive">>,FALSE,4002,Empty9,1,{1}) ELSE ReplacementOverlay99(InstructionNode911(id,"Plain",<<"OptionalDeployVisibleIgnoringDeployCost">>,TRUE,0,Empty9,0,{2}),[requiresVisibleCohort |-> TRUE])] groups == <<[rule |-> "ProcedureCode8b36a14c1569",units |-> {1},nodes |-> <<4001>>,join |-> 4002], [rule |-> "ProcedureCode8b36a14c1569",units |-> {2},nodes |-> <<4002>>,join |-> 0]>> IN NormalizationTechniqueFixture911("NeutralValue00004",d,"look",1,units,nodes,4001,groups) NormalizationLegacySpecimen0015Fixture911 == LET p == NormalizationSpecimen0015Fixture911 units == [u \in {1} |-> [category |-> "Trait",shape |-> "LookAndAct",sentence |-> 1, sourceAuthority |-> "CRExampleOnly",pdfPage |-> 84,clause |-> "ProcedureCoded0cd74215226"]] nodes == [p.nodes EXCEPT ![4002].segments={1}] groups == <<[rule |-> "ProcedureCoded0cd74215226",units |-> {1},nodes |-> <<4001,4002>>,join |-> 0]>> IN [p EXCEPT !.units=units,!.nodes=nodes,!.groups=groups, !.sourceSHA="0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e"] NormalizationSpecimen0068Fixture911 == LET original == ConditionalDefinitionFixture96(5000,"Specimen0068","Trigger","EncounterBarrier","SchemaAtom149","SideB","SideA") d == [original EXCEPT !.instructions= <<5001,5002,5003>>,!.effectChoices={{1,2},{1,3}}, !.partsByInstruction=[id \in {5001,5002,5003} |-> {id-5000}]] bodies == [option \in {"ExposureMarker","EndTraversal"} |-> IF option="ExposureMarker" THEN <<5002>> ELSE <<5003>>] units == [u \in {1} |-> [category |-> "Trait",shape |-> "Options",sentence |-> 1,chooser |-> "SideB",optionInstructions |-> bodies, text |-> "SyntheticText01c2fca3232f"]] nodes == [id \in {5001,5002,5003} |-> IF id=5001 THEN ReplacementOverlay99( InstructionNode911(id,"Choice",<<"ChooseExposureMarkerOrEndTraversal">>,FALSE,0,[option \in DOMAIN bodies |-> Head(bodies[option])],1,{1}),[chooser |-> "SideB"]) ELSE InstructionNode911(id,"Plain",IF id=5002 THEN <<"TakeOneExposureMarker">> ELSE <<"EndTraversal">>,FALSE,0,Empty9,0,{1})] groups == <<[rule |-> "ProcedureCodef6fc0286cf28",units |-> {1},nodes |-> <<5001,5002,5003>>,join |-> 0]>> IN NormalizationTechniqueFixture911("Specimen0068",d,"take",2,units,nodes,5001,groups) NormalizationSpecimen0054Fixture911 == LET d == NormalizationDefinitionFixture911(6000,"Specimen0054","Play",<>,<<6001>>) units == [u \in 1..3 |-> CASE u=1 -> [category |-> "Trait",shape |-> "TimingStart",sentence |-> 1,text |-> "SyntheticText41063c3c8886"] [] u=2 -> [category |-> "LinkedAbility",shape |-> "Conditional",sentence |-> 2, text |-> "SyntheticText0c2913e6daf8"] [] OTHER -> [category |-> "LinkedAbility",shape |-> "Conditional",sentence |-> 3, text |-> "SyntheticText866cc72ae988"]] nodes == [id \in {6001} |-> InstructionNode911(id,"TimingStart",<<"MakeTraversal">>,FALSE,0,Empty9,0,{1})] groups == <<[rule |-> "ProcedureCode8b36a14c1569",units |-> {1},nodes |-> <<6001>>,join |-> 0],[rule |-> "ProcedureCodefabf14494c15",units |-> {2,3},nodes |-> <<>>,join |-> 0]>> IN NormalizationTechniqueFixture911("Specimen0054",d,"make",1,units,nodes,6001,groups) NormalizationRemainingNamedChecks911 == LET a == NormalizationSpecimen0015Fixture911 legacy == NormalizationLegacySpecimen0015Fixture911 exampleFamily046 == NormalizationSpecimen0068Fixture911 Specimen0054 == NormalizationSpecimen0054Fixture911 IN /\ CompiledInstructionTechnique911(a,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) /\ Len(a.groups)=2 /\ a.groups[1].rule="ProcedureCode8b36a14c1569" /\ a.units[1].sentence=1 /\ a.units[2].sentence=2 /\ InstructionTechniqueValid911(legacy) /\ InstructionPartitionValid911(legacy) /\ legacy.groups[1].rule="ProcedureCoded0cd74215226" /\ legacy.units[1].sourceAuthority="CRExampleOnly" /\ ~InstructionTechniqueSource911(legacy,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) /\ legacy.lexemes.sourceSHA=CardFacts9["NeutralValue00004"].sourceSHA /\ legacy.sourceSHA#legacy.lexemes.sourceSHA /\ ConditionalDefinitionValid96(exampleFamily046.definition) /\ exampleFamily046.definition.syntax.controller="SideA" /\ exampleFamily046.units[1].chooser="SideB" /\ CompiledInstructionTechnique911(exampleFamily046,NormalizationObjectsFixture911("Specimen0068"),CardFacts9) /\ CompiledInstructionTechnique911(Specimen0054,NormalizationObjectsFixture911("Specimen0054"),CardFacts9) /\ Specimen0054.linked={2,3} /\ DOMAIN Specimen0054.nodes={6001} /\ Specimen0054.nodes[6001].segments={1} NormalizationSpecimen0243MergeChecks911 == LET p == NormalizationSpecimen0243Fixture911 twoNodes == [id \in {1001,1002} |-> IF id=1001 THEN InstructionNode911(id,"Plain",<<"ChooseTargetOnly">>,TRUE,1002,Empty9,1,{1}) ELSE InstructionNode911(id,"Plain",<<"ApplySubtypes">>,FALSE,0,Empty9,0,{2})] split == NormalizationRegraphFixture911(p,<<1001,1002>>,twoNodes,<<[p.groups[1] EXCEPT !.nodes= <<1001,1002>>]>>) IN /\ CompiledInstructionTechnique911(p,NormalizationObjectsFixture911("Specimen0243"),CardFacts9) /\ InstructionTechniqueSource911(split,NormalizationObjectsFixture911("Specimen0243"),CardFacts9) /\ ~InstructionPartitionValid911(split) /\ \A bad \in {[p EXCEPT !.nodes[1001].requiresTargets=FALSE],[p EXCEPT !.units[1].onlyTargets=FALSE], [p EXCEPT !.units[1].otherEffects=TRUE],[p EXCEPT !.units[2].actsOnChoice=FALSE],[p EXCEPT !.units[2].sentence=3]} : /\ InstructionTechniqueSource911(bad,NormalizationObjectsFixture911("Specimen0243"),CardFacts9) /\ ~InstructionPartitionValid911(bad) NormalizationExampleFamily057SlotChecks911 == LET p == NormalizationExampleFamily057Fixture911 wrongOrder == [p EXCEPT !.nodes[2001].next=2003,!.nodes[2003].next=2002,!.nodes[2002].next=0, !.nodes[2003].rank=1,!.nodes[2002].rank=0] IN /\ CompiledInstructionTechnique911(p,NormalizationObjectsFixture911("Specimen0217"),CardFacts9) /\ InstructionTechniqueSource911(wrongOrder,NormalizationObjectsFixture911("Specimen0217"),CardFacts9) /\ ~InstructionPartitionValid911(wrongOrder) /\ \A bad \in {[p EXCEPT !.nodes[2002].cardOrdinal=1],[p EXCEPT !.nodes[2002].optional=FALSE], [p EXCEPT !.nodes[2002].cardAction="ItemInspection"],[p EXCEPT !.units[1].count=2]} : /\ InstructionTechniqueSource911(bad,NormalizationObjectsFixture911("Specimen0217"),CardFacts9) /\ ~InstructionPartitionValid911(bad) /\ p.units[1].optional /\ p.units[1].payAllDeployCosts /\ \A id \in DOMAIN p.nodes : p.nodes[id].optional /\ p.nodes[id].payAllDeployCosts NormalizationSpecimen0075ShuffleChecks911 == LET p == NormalizationSpecimen0075Fixture911 noPrinted == [p EXCEPT !.groups[1].dischargedShuffleUnits={}] IN /\ CompiledInstructionTechnique911(p,NormalizationObjectsFixture911("Specimen0075"),CardFacts9) /\ p.nodes[3001].searchShuffleRequired /\ p.groups[1].dischargedShuffleUnits={2} /\ p.nodes[3002].steps= <<"RevealAndAddFoundClusterToBHand">> /\ p.units[1].foundEffects= <<"Reveal","AddBHand">> /\ ~InstructionPartitionValid911(noPrinted) /\ ~InstructionPartitionValid911([p EXCEPT !.nodes[3001].searchShuffleRequired=FALSE]) /\ ~InstructionPartitionValid911([p EXCEPT !.nodes[3002].foundAction=FALSE]) NormalizationExampleFamily046ChoiceFixture911(option) == LET p == NormalizationSpecimen0068Fixture911 runtime == [NewInstructionRuntime911(5900,p,"Conditional","Play",20) EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == [OpenInstruction93(5001,"Ability",5900,p.source,"Play",1,"NoValue",<<"ChooseExposureMarkerOrEndTraversal">>,FALSE) EXCEPT !.announced=TRUE,!.phase="Resolving"] effects == [id \in {1} |-> [kind |-> "InstructionChoice",controlNode |-> 5001,options |-> {"ExposureMarker","EndTraversal"},chooser |-> "SideB"]] context == [id |-> 5910,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(plan),actualEffects |-> effects] result == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> 5910,instruction |-> context.currentRef,snapshotId |-> 1, effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE] control == [tag |-> "ResolvedInstructionControl",instance |-> 5900,node |-> 5001,instruction |-> context.currentRef,contextId |-> 5910, actualEffects |-> effects,completion |-> result,mode |-> "Selected",operation |-> 1,option |-> option,chooser |-> "SideB"] IN [p |-> p,runtime |-> runtime,plan |-> plan,context |-> context,result |-> result,control |-> control] NormalizationSpecimen0068ChooserChecks911 == \A option \in {"ExposureMarker","EndTraversal"} : LET f == NormalizationExampleFamily046ChoiceFixture911(option) IN /\ CompiledInstructionTechnique911(f.p,NormalizationObjectsFixture911("Specimen0068"),CardFacts9) /\ RuntimeProfile911(f.runtime) /\ RuntimeCurrentPlan911(f.runtime,f.plan) /\ ControlResultBound911(f.runtime,f.context,f.result,f.control) /\ f.p.definition.syntax.controller="SideA" /\ f.control.chooser="SideB" /\ RuntimeNext911(f.runtime,f.control)=IF option="ExposureMarker" THEN 5002 ELSE 5003 /\ ~ControlResultBound911(f.runtime,f.context,f.result,[f.control EXCEPT !.chooser="SideA"]) NormalizationLegacyReverseProbe911 == [NormalizationLegacySpecimen0015Fixture911 EXCEPT !.entry=4002,!.nodes[4002].next=4001,!.nodes[4002].rank=1, !.nodes[4001].next=0,!.nodes[4001].rank=0] NormalizationOrdinaryReverseProbe911 == [NormalizationSpecimen0015Fixture911 EXCEPT !.entry=4002,!.nodes[4002].next=4001,!.nodes[4002].rank=1, !.nodes[4001].next=0,!.nodes[4001].rank=0] NormalizationOrderRegressionChecks911 == /\ NormalizationLegacyReverseProbe911.definition=NormalizationLegacySpecimen0015Fixture911.definition /\ InstructionTechniqueValid911(NormalizationLegacyReverseProbe911) /\ ~InstructionPartitionValid911(NormalizationLegacyReverseProbe911) /\ NormalizationOrdinaryReverseProbe911.definition=NormalizationSpecimen0015Fixture911.definition /\ ~CompiledInstructionTechnique911(NormalizationOrdinaryReverseProbe911,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) NormalizationPerCardSchemaFixture911(action,count,optional) == LET order == [i \in 1..count |-> i] join == count+1 nodes == [id \in 1..join |-> IF id=join THEN InstructionNode911(id,"Plain",<<"FollowingGenericTrait">>,FALSE,0,Empty9,0,{2}) ELSE ReplacementOverlay99(InstructionNode911(id,"PerCard",<<"GenericCardProcedure">>,TRUE,id+1,Empty9,join-id,{1}), [cardAction |-> action,cardOrdinal |-> id,optional |-> optional])] units == [u \in {1,2} |-> IF u=1 THEN [category |-> "Trait",shape |-> "MultiCard",sentence |-> 1,action |-> action,count |-> count,optional |-> optional] ELSE [category |-> "Trait",shape |-> "Single",sentence |-> 2]] groups == <<[rule |-> "ProcedureCode3a5790c241a3",units |-> {1},nodes |-> order,join |-> join], [rule |-> "ProcedureCode8b36a14c1569",units |-> {2},nodes |-> <>,join |-> 0]>> IN [definition |-> [instructions |-> Append(order,join)],entry |-> IF count=0 THEN join ELSE 1,units |-> units,nodes |-> nodes,groups |-> groups] NormalizationPerCardMatrixChecks911 == /\ \A action \in {"Play","Deploy","ItemInspection"} : \A count \in 1..3 : \A optional \in BOOLEAN : LET p == NormalizationPerCardSchemaFixture911(action,count,optional) IN /\ InstructionPartitionValid911(p) /\ Len(p.groups[1].nodes)=count /\ \A id \in SubIds6(p.groups[1].nodes) : p.nodes[id].cardAction=action /\ p.nodes[id].optional=optional /\ \A action \in {"Play","Deploy","ItemInspection"} : ~InstructionPartitionValid911(NormalizationPerCardSchemaFixture911(action,0,TRUE)) /\ LET p == NormalizationPerCardSchemaFixture911("Deploy",2,TRUE) IN /\ ~InstructionPartitionValid911([p EXCEPT !.nodes[2].next=0]) /\ ~InstructionPartitionValid911([p EXCEPT !.units[1].action="Draw"]) NormalizationStaticOmissionFixture911 == LET d == NormalizationDefinitionFixture911(7000,"NeutralValue00004","Static",<>,<<>>) units == [u \in {1} |-> [category |-> "Restriction",shape |-> "Single",sentence |-> 1,text |-> "SyntheticText7fe7ecd09576"]] p == NormalizationTechniqueFixture911("NeutralValue00004",d,"trash",1,units,Empty9,0,<<[rule |-> "ProcedureCodee085dc6e3123",units |-> {1},nodes |-> <<>>,join |-> 0]>>) IN [p EXCEPT !.lexemes.mentions=Empty9] NormalizationOmissionMatrixChecks911 == /\ \A category \in {"Restriction","SchemaAtom043","Clarification","Declaration"} : LET p == [definition |-> [instructions |-> <<>>],entry |-> 0,units |-> [u \in {1} |-> [category |-> category]],nodes |-> Empty9, groups |-> <<[rule |-> "ProcedureCodee085dc6e3123",units |-> {1},nodes |-> <<>>,join |-> 0]>>] IN InstructionPartitionValid911(p) /\ LET p == NormalizationStaticOmissionFixture911 r == NewInstructionRuntime911(7100,p,"Static","Play",0) IN /\ CompiledInstructionTechnique911(p,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) /\ p.entry=0 /\ p.definition.instructions= <<>> /\ p.nonoperative={1} /\ ~RuntimeProfile911(r) /\ LET original == NormalizationSpecimen0015Fixture911 nodes == [id \in {4002} |-> original.nodes[id]] groups == <<[rule |-> "ProcedureCodee085dc6e3123",units |-> {1},nodes |-> <<>>,join |-> 4002],original.groups[2]>> p == [NormalizationRegraphFixture911(original,<<4002>>,nodes,groups) EXCEPT !.entry=4002] IN /\ InstructionTechniqueSource911(p,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) /\ ~InstructionPartitionValid911(p) NormalizationPartitionSchemaFixture911 == [definition |-> [instructions |-> <<1>>],entry |-> 1, units |-> [u \in {1,2} |-> [category |-> IF u=1 THEN "Trait" ELSE "Restriction",shape |-> "Single",sentence |-> u]], nodes |-> [id \in {1} |-> InstructionNode911(id,"Plain",<<"GenericTrait">>,FALSE,0,Empty9,0,{1})], groups |-> <<[rule |-> "ProcedureCode8b36a14c1569",units |-> {1},nodes |-> <<1>>,join |-> 0],[rule |-> "ProcedureCodee085dc6e3123",units |-> {2},nodes |-> <<>>,join |-> 0]>>] NormalizationPartitionCoverageChecks911 == LET p == NormalizationPartitionSchemaFixture911 overlap == [definition |-> [instructions |-> <<1,2>>],entry |-> 1, units |-> [u \in {1} |-> [category |-> "Trait",shape |-> "MultiCard",sentence |-> 1,action |-> "ItemInspection",count |-> 1,optional |-> FALSE]], nodes |-> [id \in {1,2} |-> ReplacementOverlay99(InstructionNode911(id,"PerCard",<<"GenericItemInspection">>,TRUE,IF id=1 THEN 2 ELSE 0,Empty9,2-id,{1}), [cardAction |-> "ItemInspection",cardOrdinal |-> 1,optional |-> FALSE])], groups |-> <<[rule |-> "ProcedureCode3a5790c241a3",units |-> {1},nodes |-> <<1>>,join |-> 2],[rule |-> "ProcedureCode3a5790c241a3",units |-> {1},nodes |-> <<2>>,join |-> 0]>>] IN /\ InstructionPartitionValid911(p) /\ ~InstructionPartitionValid911([p EXCEPT !.groups= <>]) /\ \A group \in {overlap.groups[1],overlap.groups[2]} : InstructionGroupValid911(overlap,group) /\ InstructionSourceFlow911(overlap) /\ ~InstructionPartitionValid911(overlap) NormalizationBranchSchemaFixture911(kind,a,b) == LET aa == SubSeq(<<1001,1002>>,1,a) bb == SubSeq(<<1003,1004>>,1,b) bodies == [option \in (IF kind="NestedCost" THEN {"Pay","Decline"} ELSE {"A","B"}) |-> IF option \in {"A","Pay"} THEN aa ELSE bb] order == <<1000>> \o aa \o bb nodes == [id \in SubIds6(order) |-> IF id=1000 THEN InstructionNode911(id,kind,<<"GenericActualChoice">>,FALSE,0, [option \in DOMAIN bodies |-> IF Len(bodies[option])=0 THEN 0 ELSE Head(bodies[option])],3,{1}) ELSE LET body == IF id \in SubIds6(aa) THEN aa ELSE bb i == CHOOSE i \in 1..Len(body) : body[i]=id IN InstructionNode911(id,"Plain",<<"GenericSelectedTrait">>,FALSE,IF i=Len(body) THEN 0 ELSE body[i+1],Empty9,2-i,{1})] units == [u \in {1} |-> [category |-> "Trait",shape |-> IF kind="Choice" THEN "Options" ELSE "NestedCost",sentence |-> 1,optionInstructions |-> bodies]] groups == <<[rule |-> IF kind="Choice" THEN "ProcedureCodef6fc0286cf28" ELSE "ProcedureCoded9954050183f",units |-> {1},nodes |-> order,join |-> 0]>> IN [definition |-> [instructions |-> order],entry |-> 1000,units |-> units,nodes |-> nodes,groups |-> groups] NormalizationBranchMatrixChecks911 == /\ \A kind \in {"Choice","NestedCost"} : \A a,b \in 0..2 : InstructionPartitionValid911(NormalizationBranchSchemaFixture911(kind,a,b)) /\ LET p == NormalizationBranchSchemaFixture911("Choice",2,1) IN /\ ~InstructionPartitionValid911([p EXCEPT !.nodes[1000].options["A"]=1002]) /\ ~InstructionPartitionValid911([p EXCEPT !.nodes[1001].next=0]) /\ ~InstructionPartitionValid911([p EXCEPT !.nodes[1000].next=1003]) /\ LET p == NormalizationSpecimen0054Fixture911 IN /\ ~InstructionPartitionValid911([p EXCEPT !.units[2].category="Restriction"]) /\ InstructionGroupValid911(p,p.groups[2]) /\ p.groups[2].nodes= <<>> NormalizationInternalSlotOrderChecks911 == LET p == NormalizationPerCardSchemaFixture911("Deploy",4,TRUE) bad == [p EXCEPT !.nodes[1].next=3,!.nodes[3].next=2,!.nodes[2].next=4, !.nodes[3].rank=3,!.nodes[2].rank=2] IN /\ InstructionPartitionValid911(p) /\ InstructionSourceFlow911(bad) /\ ReachableTechniqueNodes911(bad,{bad.entry},Cardinality(DOMAIN bad.nodes))=DOMAIN bad.nodes /\ ~InstructionPartitionValid911(bad) NormalizationSearchPrimaryChecks911 == LET p == NormalizationSpecimen0075Fixture911 bad == [p EXCEPT !.nodes[3001].segments={2}] IN /\ InstructionTechniqueSource911(bad,NormalizationObjectsFixture911("Specimen0075"),CardFacts9) /\ InstructionSourceFlow911(bad) /\ GroupNodeSegments911(bad,bad.groups[1]) /\ ~InstructionPartitionValid911(bad) NormalizationRenamedCostFixture911 == LET p == NormalizationBranchSchemaFixture911("NestedCost",1,1) bodies == [option \in {"A","B"} |-> p.units[1].optionInstructions[IF option="A" THEN "Pay" ELSE "Decline"]] IN [p EXCEPT !.nodes[1000].options=[option \in DOMAIN bodies |-> Head(bodies[option])],!.units[1].optionInstructions=bodies] NormalizationRuntimeShapeFixture911(p) == LET source == RuleAbilitySource9("StructuralNestedCostABI911") syntax == [SyntaxFixture93(8000,"Conditional","SideA","Profile",<>) EXCEPT !.source=source] definition == [syntax |-> syntax,instructions |-> p.definition.instructions] IN ReplacementOverlay99(p,[tag |-> "NormalizedInstructionTechnique",definition |-> definition, source |-> source,ability |-> 8000,nonoperative |-> {},linked |-> {}]) NormalizationNestedCostLabelsChecks911 == LET canonical == NormalizationBranchSchemaFixture911("NestedCost",1,1) renamed == NormalizationRenamedCostFixture911 genericChoice == NormalizationBranchSchemaFixture911("Choice",1,1) IN /\ InstructionPartitionValid911(canonical) /\ DOMAIN canonical.nodes[1000].options={"Pay","Decline"} /\ InstructionSourceFlow911(renamed) /\ GroupNodeSegments911(renamed,renamed.groups[1]) /\ DOMAIN renamed.nodes[1000].options=DOMAIN renamed.units[1].optionInstructions /\ ~InstructionPartitionValid911(renamed) /\ InstructionTechniqueValid911(NormalizationRuntimeShapeFixture911(canonical)) /\ ~InstructionTechniqueValid911(NormalizationRuntimeShapeFixture911(renamed)) /\ InstructionTechniqueValid911(NormalizationRuntimeShapeFixture911(genericChoice)) /\ InstructionPartitionValid911(genericChoice) NormalizationSourceBindingChecks911 == \A p \in {NormalizationSpecimen0243Fixture911,NormalizationExampleFamily057Fixture911,NormalizationSpecimen0075Fixture911, NormalizationSpecimen0015Fixture911,NormalizationSpecimen0068Fixture911,NormalizationSpecimen0054Fixture911} : LET objects == NormalizationObjectsFixture911(p.card) IN /\ InstructionTechniqueSource911(p,objects,CardFacts9) /\ ~InstructionTechniqueSource911([p EXCEPT !.sourceSHA="ForeignSourceSHA911"],objects,CardFacts9) /\ ~InstructionTechniqueSource911([p EXCEPT !.card="Specimen0069"],objects,CardFacts9) /\ ~InstructionTechniqueSource911([p EXCEPT !.originalUnits= <<>>],objects,CardFacts9) /\ ~InstructionTechniqueSource911([p EXCEPT !.source=ObjectAbilitySource9(2)],objects,CardFacts9) /\ ~InstructionTechniqueSource911([p EXCEPT !.ability=p.ability+1],objects,CardFacts9) /\ ~InstructionTechniqueSource911([p EXCEPT !.lexemes.definition=[p.definition EXCEPT !.instructions= <<>>]],objects,CardFacts9) NormalizationLegacyLocalContractChecks911 == LET p == NormalizationLegacySpecimen0015Fixture911 IN /\ InstructionGroupValid911(p,p.groups[1]) /\ ~InstructionGroupValid911([p EXCEPT !.nodes[4002].requiresVisibleCohort=FALSE],p.groups[1]) /\ ~InstructionGroupValid911([p EXCEPT !.nodes[4001].kind="Plain"],p.groups[1]) /\ ~InstructionGroupValid911([p EXCEPT !.nodes[4001].next=0],p.groups[1]) /\ ~InstructionGroupValid911([p EXCEPT !.nodes[4002].next=4001],p.groups[1]) NormalizationReachabilityContractChecks911 == LET p == NormalizationSpecimen0015Fixture911 early == [p EXCEPT !.nodes[4001].next=0] IN /\ InstructionTechniqueSource911(p,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) /\ early.definition=p.definition /\ DOMAIN early.nodes=DOMAIN p.nodes /\ ~InstructionTechniqueSource911(early,NormalizationObjectsFixture911("NeutralValue00004"),CardFacts9) PauseTechniqueFixture911 == LET raw == ConditionalDefinitionFixture96(11800,"Specimen0180","Trigger","StructuralEvent","SchemaAtom016","SchemaAtom016","SchemaAtom016") source == RuleAbilitySource9("StructuralPauseSchema911") d == [raw EXCEPT !.syntax.source=source,!.activity.source=source,!.instructions= <<11801>>, !.partsByInstruction=[i \in {11801} |-> {1}]] node == InstructionNode911(11801,"Plain",<<"InvokeChild","FinishAtomicWork">>,FALSE,0,Empty9,1,{1}) IN [tag |-> "NormalizedInstructionTechnique",source |-> source,ability |-> d.syntax.id,definition |-> d, nodes |-> [id \in {11801} |-> node],entry |-> 11801,units |-> [id \in {1} |-> [category |-> "Trait"]], nonoperative |-> {},linked |-> {},originalUnits |-> d.syntax.units] PauseRuntimeFixture911 == LET r == NewInstructionRuntime911(11810,PauseTechniqueFixture911,"Conditional","Rule",11820) IN [r EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] PausePlanFixture911 == [OpenInstruction93(11801,"Ability",11810,PauseTechniqueFixture911.source,"Rule",1,"NoValue",<<"InvokeChild","FinishAtomicWork">>,FALSE) EXCEPT !.announced=TRUE,!.phase="Resolving"] PauseContextFixture911(kind) == [id |-> 11830,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(PausePlanFixture911),currentWorld |-> 2, actualEffects |-> [op \in {1} |-> [kind |-> kind,payer |-> "SideB",cost |-> [resourceUnits |-> 1]]]] PauseWorldFixture911(objects) == [LifetimeWorldFixture910 EXCEPT !.objects=objects,!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={},!.extenders=Empty9] PausePointFixture911(cause) == CASE cause="CostPaid" -> "CostPaid" [] cause="Draw" -> "ProcedureCode8be6d2dd1e98" [] cause="Play" -> "ProcedureCodebddd9a1a600b" [] cause="EscalatingResourceContest" -> "ProcedureCoded1e36ce96789" [] OTHER -> "ActualStep" PauseKindFixture911(cause) == CASE cause="CostPaid" -> "Cost" [] cause="Draw" -> "Draw" [] cause="Play" -> "Play" [] cause="EscalatingResourceContest" -> "EscalatingResourceContest" [] OTHER -> "OpenTimingStructure" PauseDrawFixture911 == LET objects == [id \in {1,41} |-> IF id=1 THEN CardObject9("Specimen0180","SideAObjectiveCompletion",FALSE,"Up") ELSE [CardObject9("Specimen0185","SideBDeck",FALSE,"Down") EXCEPT !.loc=1,!.position=1]] decks == [p \in SetupPlayers |-> IF p="SideB" THEN <<41>> ELSE <<>>] open == OpenDrawBatch8(11841,{"SideB"},[p \in {"SideB"} |-> 1],FALSE,"SideA",11810,InstructionWindowRef93(PausePlanFixture911)) locked == [open EXCEPT !.countsReady=TRUE,!.effective=[p \in {"SideB"} |-> 1]] successors == [id \in {41} |-> 42] drawn == [locked EXCEPT !.stage="Checkpoint",!.initialDrawn=[p \in {"SideB"} |-> {42}],!.actualCounts=[p \in {"SideB"} |-> 1]] afterObjects == [id \in {1,42} |-> IF id=1 THEN objects[1] ELSE [objects[41] EXCEPT !.zone="SetAside",!.loc="SetAside"]] afterDecks == [p \in SetupPlayers |-> <<>>] transits == DrawAsideTransits8(Empty9,objects,{41},successors,locked) IN [objects |-> objects,decks |-> decks,open |-> open,locked |-> locked,drawn |-> drawn, successors |-> successors,afterObjects |-> afterObjects,afterDecks |-> afterDecks,transits |-> transits] PausePlayFixture911 == LET raw == CardObject9("Specimen0185","SideBHand",FALSE,"Down") card == ReplacementOverlay99(raw,[playCost |-> 0,playX |-> FALSE,subtypes |-> {}]) objects == [id \in {1,51} |-> IF id=1 THEN CardObject9("Specimen0180","SideAObjectiveCompletion",FALSE,"Up") ELSE card] played == [id \in {1,52} |-> IF id=1 THEN objects[1] ELSE PlayedPlacementRow8(card,TRUE)] start == OpenPlay8(11842,51,"SideB",InstructionWindowRef93(PausePlanFixture911)) b == [start EXCEPT !.object=52,!.stage="ProcedureCode0f076861472c",!.kind="Action",!.subtypes={}] transaction == [id |-> 11845,procedureId |-> 11842,object |-> 52,allPaid |-> TRUE,basePart |-> PlayInherentPart8(played[52],0), playCostIgnored |-> FALSE,paidSomething |-> TRUE,checkpointRequired |-> TRUE] cost == [b EXCEPT !.stage="CostBarrier",!.transaction=11845,!.checkpointRequired=TRUE] c == [cost EXCEPT !.stage="ProcedureCodecbf6b11f0ae0"] d == [c EXCEPT !.stage="ProcedureCode7647b901fcb1",!.activationReached=TRUE] e == [d EXCEPT !.stage="ProcedureCodebddd9a1a600b"] IN [objects |-> objects,played |-> played,start |-> start,b |-> b,transaction |-> transaction,cost |-> cost,c |-> c,d |-> d,e |-> e] PauseChildFixture911(cause,structure) == LET ref == InstructionWindowRef93(PausePlanFixture911) IN CASE cause="CostPaid" -> [tag |-> "CompletedInstructionCost",id |-> 11840,transaction |-> 11840, instance |-> 11810,instruction |-> ref,source |-> PauseTechniqueFixture911.source,operation |-> 1,paid |-> TRUE,lastAction |-> FALSE,payer |-> "SideB",specification |-> [resourceUnits |-> 1], receipt |-> [tag |-> "CompletedCostTransaction",id |-> 11840,instance |-> 11810,instruction |-> ref, source |-> PauseTechniqueFixture911.source,payer |-> "SideB",specification |-> [resourceUnits |-> 1],allCostsPaid |-> TRUE]] [] cause="Draw" -> PauseDrawFixture911.drawn [] cause="Play" -> PausePlayFixture911.e [] cause="EscalatingResourceContest" -> [tag |-> "ActualEscalatingResourceContestProcedure",id |-> 11843,point |-> "ProcedureCoded1e36ce96789",instance |-> 11810,caller |-> ref] [] OTHER -> [tag |-> "ActualTimingStructureCheckpoint",id |-> 11844,structure |-> structure,step |-> "ActualStep",parent |-> ref] PauseFixture911(cause,structure) == LET r == PauseRuntimeFixture911 plan == PausePlanFixture911 context == PauseContextFixture911(PauseKindFixture911(cause)) child == PauseChildFixture911(cause,structure) point == PausePointFixture911(cause) request == [tag |-> "OwnedInstructionCheckpointRequest",id |-> 11850,caller |-> InstructionPauseCaller911(r,plan,cause,child,point)] paused == [r EXCEPT !.phase="Paused",!.pauseKeys=@ \cup {InstructionPauseKey911(context,plan,cause,child,point,1)}, !.pause=[id |-> 11860,cause |-> cause,childId |-> child.id,point |-> point,instruction |-> context.currentRef, cursor |-> plan.cursor,operation |-> 1,request |-> request]] objects == CASE cause="Draw" -> PauseDrawFixture911.afterObjects [] cause="Play" -> PausePlayFixture911.played [] OTHER -> [id \in {1} |-> CardObject9("Specimen0180","SideAObjectiveCompletion",FALSE,"Up")] world == [PauseWorldFixture911(objects) EXCEPT !.id=2] authority == NewLifetimeAuthority910(world) registry == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) seed == NewConditionalLedger96(ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,objects)) cp == [ConditionalCheckpointFixture96(seed,11850, ConditionalSnapshotFixture96(10,11850,"CheckpointBeginning",Empty9,objects), ConditionalSnapshotFixture96(11,11850,"ProcedureCodee605a78f5d5e",Empty9,objects),Empty9) EXCEPT !.caller=request.caller] ledger == ConditionalCommittedFixture96(seed,Empty9,cp,Empty9,Empty9,Empty9) receipt == [tag |-> "OwnedInstructionCheckpointReturn",pauseId |-> 11860,childId |-> child.id, instruction |-> context.currentRef,point |-> point,id |-> 11850,complete |-> TRUE,allNewerChainsComplete |-> TRUE] resumed == [paused EXCEPT !.phase="Resolve",!.pause=[id |-> 0]] IN [r |-> r,plan |-> plan,context |-> context,child |-> child,point |-> point,request |-> request,paused |-> paused, world |-> world,authority |-> authority,registry |-> registry,seed |-> seed,cp |-> cp,ledger |-> ledger,receipt |-> receipt,resumed |-> resumed] PauseValidFixture911(f,cause) == /\ ProcessConditionalCheckpoint96(f.seed,f.ledger,<<>>,<<>>,Empty9,f.cp,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ PauseRuntimeInstruction911(f.r,f.paused,f.plan,f.context,11860,cause,f.child,f.point,1,f.request,f.registry,f.authority) /\ ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,f.ledger,<<>>,f.receipt,f.registry,f.authority) /\ f.resumed.ability=f.r.ability /\ f.resumed.pc=f.r.pc /\ f.resumed.technique=f.r.technique /\ f.resumed.visited=f.r.visited /\ f.resumed.choices=f.r.choices /\ f.resumed.pauseKeys=f.paused.pauseKeys PauseAllCausesChecks911 == /\ \A cause \in {"CostPaid","Draw","Play","EscalatingResourceContest","Timing"} : PauseValidFixture911(PauseFixture911(cause,TimingRef9("TraversalPhase",20)),cause) /\ \A kind \in TimingStructureKinds9 : /\ ProcedureStepIsInstruction911(kind) /\ PauseValidFixture911(PauseFixture911("Timing",TimingRef9(kind,20)),"Timing") /\ \A kind \in {"Deploy","EscalatingResourceContest","Checkpoint","Search","Draw","PlayProcedure"} : ~ProcedureStepIsInstruction911(kind) PauseDrawActualStepChecks911 == LET d == PauseDrawFixture911 f == PauseFixture911("Draw",NoTimingRef9) reactions == [d.drawn EXCEPT !.stage="DrawReactions",!.checkpointId=11850,!.reactionId=0] IN /\ LockDrawCounts8(d.open,d.locked,[p \in {"SideB"} |-> 1],TRUE) /\ BeginDrawBatch8(d.locked,d.drawn,d.objects,d.afterObjects,d.decks,d.afterDecks,Empty9,d.transits,d.successors,{1,41},DrawStartEvents8(d.drawn)) /\ PauseValidFixture911(f,"Draw") /\ OpenDrawReactions8(d.drawn,reactions,11850,0,TRUE) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Draw",d.locked,"ProcedureCode8be6d2dd1e98",1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Draw",[d.drawn EXCEPT !.caller=NoTimingRef9],"ProcedureCode8be6d2dd1e98",1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Draw",d.drawn,"ProcedureCode05cf6afdedfb",1) PausePlayActualStepChecks911 == LET p == PausePlayFixture911 f == PauseFixture911("Play",NoTimingRef9) IN /\ BeginPlay8(p.start,p.b,p.objects,p.played,52,{51},TRUE) /\ PayPlayStep8(p.b,p.cost,p.played,p.transaction,FALSE,0,TRUE) /\ DrainPlayCostBarrier8(p.cost,p.c,11845,11849,TRUE) /\ ActivatePlayedCard8(p.c,p.d) /\ MeetPlayedConditions8(p.d,p.e,{PlayedCondition8(p.d)}) /\ PauseValidFixture911(f,"Play") /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Play",p.d,"ProcedureCodebddd9a1a600b",1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Play",[p.e EXCEPT !.activationReached=FALSE],"ProcedureCodebddd9a1a600b",1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Play",[p.e EXCEPT !.caller.id=11899],"ProcedureCodebddd9a1a600b",1) PauseOwnedReceiptChecks911 == LET f == PauseFixture911("CostPaid",NoTimingRef9) badSource == [f.child EXCEPT !.source=RuleAbilitySource9("Foreign")] badContext == [f.context EXCEPT !.actualEffects[1].kind="OrdinaryDeployStep"] IN /\ PauseValidFixture911(f,"CostPaid") /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",badSource,f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",[f.child EXCEPT !.paid=FALSE],f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",[f.child EXCEPT !.lastAction=TRUE],f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,badContext,"CostPaid",f.child,f.point,1) /\ \A cause \in {"Deploy","Checkpoint","OrdinaryStep"} : ~InstructionPausePoint911(f.r,f.plan,f.context,cause,f.child,f.point,1) /\ ~PauseRuntimeInstruction911(f.r,[f.paused EXCEPT !.pause.request.caller=[kind |-> "Foreign"]],f.plan,f.context,11860, "CostPaid",f.child,f.point,1,[f.request EXCEPT !.caller=[kind |-> "Foreign"]],f.registry,f.authority) PauseResumeBindingChecks911 == LET f == PauseFixture911("EscalatingResourceContest",NoTimingRef9) IN /\ PauseValidFixture911(f,"EscalatingResourceContest") /\ \A bad \in {[f.receipt EXCEPT !.childId=11844],[f.receipt EXCEPT !.pauseId=11861], [f.receipt EXCEPT !.point="ProcedureCode083016920358"],[f.receipt EXCEPT !.instruction.abilityInstance=11811], [f.receipt EXCEPT !.complete=FALSE],[f.receipt EXCEPT !.allNewerChainsComplete=FALSE]} : ~ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,f.ledger,<<>>,bad,f.registry,f.authority) /\ ~ResumeRuntimeInstruction911(f.paused,f.resumed,[f.plan EXCEPT !.cursor=2],f.ledger,<<>>,f.receipt,f.registry,f.authority) /\ ~ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,[f.ledger EXCEPT !.checkpoints[11850].caller=[kind |-> "Foreign"]],<<>>,f.receipt,f.registry,f.authority) PauseReplayChecks911 == LET f == PauseFixture911("Timing",TimingRef9("TraversalPhase",20)) replay == [f.resumed EXCEPT !.phase="Paused",!.pause=f.paused.pause] freshChild == [f.child EXCEPT !.id=11846] freshRequest == [f.request EXCEPT !.id=11851,!.caller=InstructionPauseCaller911(f.resumed,f.plan,"Timing",freshChild,f.point)] fresh == [f.resumed EXCEPT !.phase="Paused",!.pauseKeys=@ \cup {InstructionPauseKey911(f.context,f.plan,"Timing",freshChild,f.point,1)}, !.pause=[f.paused.pause EXCEPT !.id=11861,!.childId=11846,!.request=freshRequest]] IN /\ PauseValidFixture911(f,"Timing") /\ ~PauseRuntimeInstruction911(f.resumed,replay,f.plan,f.context,11860,"Timing",f.child,f.point,1,f.request,f.registry,f.authority) /\ PauseRuntimeInstruction911(f.resumed,fresh,f.plan,f.context,11861,"Timing",freshChild,f.point,1,freshRequest,f.registry,f.authority) /\ fresh.ability=f.r.ability /\ fresh.visited= <<>> PausePendingChainChecks911 == LET f == PauseFixture911("Draw",NoTimingRef9) d == ConditionalDefinitionFixture96(11870,"Specimen0180","Trigger","Searched","SchemaAtom016","SideB","SideB") definitions == [key \in {ConditionalKey96(d)} |-> d] initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,f.world.objects) seed == NewConditionalLedger96(initial) event == ReplacementOverlay99(ConditionalEventFixture96(1,"Searched",0,"SideB","SideB",initial,11830), [search |-> [tag |-> "Searched",searchId |-> 11873,actor |-> "SideB",zone |-> "SideBDeck",foundCount |-> 0]]) events == [id \in {1} |-> event] cp == [ConditionalCheckpointFixture96(seed,11850, ConditionalSnapshotFixture96(10,11850,"CheckpointBeginning",definitions,f.world.objects), ConditionalSnapshotFixture96(11,11850,"ProcedureCodee605a78f5d5e",definitions,f.world.objects),events) EXCEPT !.caller=f.request.caller] recognition == [definition |-> ConditionalKey96(d),occurrence |-> 1] allocation == [key \in {recognition} |-> 11871] bindings == ConditionalBindingsFixture96({recognition},11850,11872,1) busyLedger == ConditionalCommittedFixture96(seed,definitions,cp,allocation,bindings,Empty9) IN /\ PauseValidFixture911(f,"Draw") /\ ProcessConditionalCheckpoint96(seed,busyLedger,<<>>,<<>>,definitions,cp,ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{}) /\ busyLedger.instances[11871].status="Pending" /\ ~ConditionalCheckpointDrained96(busyLedger,<<>>,11850) /\ ~ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,busyLedger,<<>>,f.receipt,f.registry,f.authority) PauseJournalFreshnessChecks911 == LET f == PauseFixture911("CostPaid",NoTimingRef9) world == [f.world EXCEPT !.id=3] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 11880,snapshotId |-> 3,source |-> PauseTechniqueFixture911.source] transition == LifetimeKernelTransition910(f.authority.current,world,execution) authority == LifetimeAuthorityAfter910(f.authority,transition) caughtUp == [f.registry EXCEPT !.frontier=LifetimeFrontier910(authority,2)] IN /\ CommitLifetimeKernelCore910(f.authority,authority,world,execution) /\ PublishNextLifetime910(f.registry,caughtUp,authority) /\ ~PauseRuntimeInstruction911(f.r,f.paused,f.plan,f.context,11860,"CostPaid",f.child,f.point,1,f.request,f.registry,authority) /\ ~ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,f.ledger,<<>>,f.receipt,f.registry,authority) /\ PauseRuntimeInstruction911(f.r,f.paused,f.plan,f.context,11860,"CostPaid",f.child,f.point,1,f.request,caughtUp,authority) /\ ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,f.ledger,<<>>,f.receipt,caughtUp,authority) PauseWorkAndSuspensionChecks911 == LET f == PauseFixture911("CostPaid",NoTimingRef9) afterPlan == [f.plan EXCEPT !.cursor=2,!.completedSteps= <<"InvokeChild">>] step == [tag |-> "InstructionStepReturn",instruction |-> f.plan.id,index |-> 1,step |-> "InvokeChild",complete |-> TRUE] work == [tag |-> "OwnedInstructionWorkReturn",instance |-> f.r.id,instruction |-> f.context.currentRef,index |-> 1, step |-> "InvokeChild",complete |-> TRUE,childrenReturned |-> TRUE,unprocessedCheckpointRequests |-> {}] IN /\ CarryRuntimeWorkStep911(f.r,f.r,f.plan,afterPlan,f.context,step,work) /\ ~CarryRuntimeWorkStep911(f.paused,f.paused,f.plan,afterPlan,f.context,step,work) /\ ~CarryRuntimeWorkStep911(f.r,f.r,f.plan,afterPlan,f.context,step,[work EXCEPT !.unprocessedCheckpointRequests={11850}]) /\ ~CarryRuntimeWorkStep911(f.r,f.r,f.plan,afterPlan,f.context,step,[work EXCEPT !.childrenReturned=FALSE]) /\ ~PauseRuntimeInstruction911(f.paused,f.paused,f.plan,f.context,11860,"CostPaid",f.child,f.point,1,f.request,f.registry,f.authority) PauseCostTransactionBindingChecks911 == LET f == PauseFixture911("CostPaid",NoTimingRef9) wrongTransaction == [f.child EXCEPT !.transaction=11899,!.receipt.id=11899] wrongCost == [f.child EXCEPT !.specification=[resourceUnits |-> 2],!.receipt.specification=[resourceUnits |-> 2]] wrongPayer == [f.child EXCEPT !.payer="SideA",!.receipt.payer="SideA"] IN /\ PauseValidFixture911(f,"CostPaid") /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",wrongTransaction,f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",wrongCost,f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",wrongPayer,f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",[f.child EXCEPT !.operation=2],f.point,1) /\ \A bad \in {[f.child EXCEPT !.receipt.allCostsPaid=FALSE],[f.child EXCEPT !.receipt.id=11899], [f.child EXCEPT !.receipt.instance=11811],[f.child EXCEPT !.receipt.instruction.id=11802], [f.child EXCEPT !.receipt.source.rule="Foreign"],[f.child EXCEPT !.receipt.tag="SelectedCost"]} : ~InstructionPausePoint911(f.r,f.plan,f.context,"CostPaid",bad,f.point,1) PauseTraceTimingOwnershipChecks911 == LET trace == PauseFixture911("EscalatingResourceContest",NoTimingRef9) timing == PauseFixture911("Timing",TimingRef9("TraversalPhase",20)) IN /\ PauseValidFixture911(trace,"EscalatingResourceContest") /\ PauseValidFixture911(timing,"Timing") /\ \A bad \in {[trace.child EXCEPT !.tag="PlannedEscalatingResourceContest"],[trace.child EXCEPT !.instance=11811], [trace.child EXCEPT !.caller.id=11802],[trace.child EXCEPT !.point="ProcedureCode083016920358"]} : ~InstructionPausePoint911(trace.r,trace.plan,trace.context,"EscalatingResourceContest",bad,trace.point,1) /\ \A bad \in {[timing.child EXCEPT !.tag="PlannedStructure"],[timing.child EXCEPT !.structure.kind="Deploy"], [timing.child EXCEPT !.parent.id=11802],[timing.child EXCEPT !.step="UnreachedStep"]} : ~InstructionPausePoint911(timing.r,timing.plan,timing.context,"Timing",bad,timing.point,1) PauseCannotFinishWhileChildCheckpointOpenChecks911 == LET f == PauseFixture911("CostPaid",NoTimingRef9) plan == [f.plan EXCEPT !.cursor=2,!.completedSteps= <<"InvokeChild">>] afterPlan == [plan EXCEPT !.phase="Complete",!.cursor=3,!.completedSteps=plan.steps] actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> f.context.id,instruction |-> f.context.currentRef, snapshotId |-> f.world.id,effects |-> f.context.actualEffects,complete |-> TRUE,childrenReturned |-> TRUE] step == [tag |-> "InstructionStepReturn",instruction |-> plan.id,index |-> 2,step |-> "FinishAtomicWork",complete |-> TRUE,expectedReturn |-> actualReturn] boundary == GraphInstructionBoundary911(f.r,f.context,{"InstructionEnd"},0) finished == [f.r EXCEPT !.phase="Checkpoint",!.visited= <<11801>>,!.pc=0,!.boundary=boundary, !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] skipped == [finished EXCEPT !.pause=f.paused.pause,!.pauseKeys=f.paused.pauseKeys] IN /\ FinishRuntimeInstruction911(f.r,finished,plan,afterPlan,f.context,actualReturn,step,NoInstructionControl911,[tag |-> "NoInstructionPayment"],boundary) /\ ~FinishRuntimeInstruction911(f.paused,skipped,plan,afterPlan,f.context,actualReturn,step,NoInstructionControl911,[tag |-> "NoInstructionPayment"],boundary) PauseConcreteInspectionStepChecks911 == LET f == PauseFixture911("Timing",TimingRef9("Inspection",11890)) siteInspection == OpenInspection7(11890,"SchemaAtom082","SchemaAtom082",0,"Ability",f.context.currentRef,{},Empty9) begun == [siteInspection EXCEPT !.active=TRUE,!.beginMet=TRUE] child == [f.child EXCEPT !.step=begun.step] point == begun.step request == [f.request EXCEPT !.caller=InstructionPauseCaller911(f.r,f.plan,"Timing",child,point)] paused == [f.paused EXCEPT !.pauseKeys={InstructionPauseKey911(f.context,f.plan,"Timing",child,point,1)}, !.pause.point=point,!.pause.request=request] cp == [f.cp EXCEPT !.caller=request.caller] ledger == ConditionalCommittedFixture96(f.seed,Empty9,cp,Empty9,Empty9,Empty9) receipt == [f.receipt EXCEPT !.point=point] resumed == [paused EXCEPT !.phase="Resolve",!.pause=[id |-> 0]] IN /\ BeginInspection7(siteInspection,begun,0,{"SchemaAtom082"},TRUE,TRUE,{InspectionBeginEvent7(siteInspection)}) /\ child.structure=TimingRef9("Inspection",begun.id) /\ child.step=begun.step /\ ProcessConditionalCheckpoint96(f.seed,ledger,<<>>,<<>>,Empty9,cp,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ PauseRuntimeInstruction911(f.r,paused,f.plan,f.context,11860,"Timing",child,point,1,request,f.registry,f.authority) /\ ResumeRuntimeInstruction911(paused,resumed,f.plan,ledger,<<>>,receipt,f.registry,f.authority) /\ resumed.ability=f.r.ability /\ resumed.pc=f.r.pc PauseOperationAndRequestChecks911 == /\ \A cause \in {"CostPaid","Draw","Play","EscalatingResourceContest","Timing"} : LET f == PauseFixture911(cause,TimingRef9("ItemInspection",20)) request == [f.request EXCEPT !.tag="PlannedCheckpoint"] proposed == [f.paused EXCEPT !.pause.request=request] badContext == [f.context EXCEPT !.currentRef.id=11802] badChild == CASE cause="CostPaid" -> [f.child EXCEPT !.instruction=badContext.currentRef,!.receipt.instruction=badContext.currentRef] [] cause \in {"Draw","Play","EscalatingResourceContest"} -> [f.child EXCEPT !.caller=badContext.currentRef] [] OTHER -> [f.child EXCEPT !.parent=badContext.currentRef] IN /\ ~InstructionPausePoint911(f.r,f.plan,[f.context EXCEPT !.actualEffects[1].kind="ForeignOperation"],cause,f.child,f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,[f.context EXCEPT !.phase="InstructionCleared"],cause,f.child,f.point,1) /\ ~InstructionPausePoint911(f.r,f.plan,badContext,cause,badChild,f.point,1) /\ ~PauseRuntimeInstruction911(f.r,proposed,f.plan,f.context,11860,cause,f.child,f.point,1,request,f.registry,f.authority) /\ LET f == PauseFixture911("Draw",NoTimingRef9) IN /\ ~InstructionPausePoint911(f.r,f.plan,f.context,"Draw",[f.child EXCEPT !.ability=11811],f.point,1) /\ ~ResumeRuntimeInstruction911(f.paused,f.resumed,f.plan,f.ledger,<<>>,[f.receipt EXCEPT !.tag="PlannedCheckpointReturn"],f.registry,f.authority) PauseCrossCursorAndOperationReplayChecks911 == LET f == PauseFixture911("CostPaid",NoTimingRef9) plan == [f.plan EXCEPT !.cursor=2,!.completedSteps= <<"InvokeChild">>] step == [tag |-> "InstructionStepReturn",instruction |-> f.plan.id,index |-> 1,step |-> "InvokeChild",complete |-> TRUE] work == [tag |-> "OwnedInstructionWorkReturn",instance |-> f.r.id,instruction |-> f.context.currentRef,index |-> 1, step |-> "InvokeChild",complete |-> TRUE,childrenReturned |-> TRUE,unprocessedCheckpointRequests |-> {}] replay == [f.resumed EXCEPT !.phase="Paused",!.pauseKeys=@ \cup {InstructionPauseKey911(f.context,plan,"CostPaid",f.child,f.point,1)}, !.pause=[f.paused.pause EXCEPT !.id=11861,!.cursor=2]] freshRequest == [f.request EXCEPT !.id=11851] requestReplay == [f.resumed EXCEPT !.phase="Paused",!.pauseKeys=@ \cup {InstructionPauseKey911(f.context,f.plan,"CostPaid",f.child,f.point,1)}, !.pause=[f.paused.pause EXCEPT !.id=11861,!.request=freshRequest]] freshChild == [f.child EXCEPT !.id=11846,!.transaction=11846,!.receipt.id=11846] actualFreshRequest == [freshRequest EXCEPT !.caller=InstructionPauseCaller911(f.resumed,plan,"CostPaid",freshChild,f.point)] fresh == [f.resumed EXCEPT !.phase="Paused",!.pauseKeys=@ \cup {InstructionPauseKey911(f.context,plan,"CostPaid",freshChild,f.point,1)}, !.pause=[f.paused.pause EXCEPT !.id=11861,!.cursor=2,!.childId=11846,!.request=actualFreshRequest]] d == PauseFixture911("Draw",NoTimingRef9) both == [d.context EXCEPT !.actualEffects=ReplacementOverlay99(@,[op \in {2} |-> d.context.actualEffects[1]])] operationReplay == [d.resumed EXCEPT !.phase="Paused",!.pauseKeys=@ \cup {InstructionPauseKey911(both,d.plan,"Draw",d.child,d.point,2)}, !.pause=[d.paused.pause EXCEPT !.id=11861,!.operation=2]] IN /\ PauseValidFixture911(f,"CostPaid") /\ CarryRuntimeWorkStep911(f.resumed,f.resumed,f.plan,plan,f.context,step,work) /\ ~PauseRuntimeInstruction911(f.resumed,replay,plan,f.context,11861,"CostPaid",f.child,f.point,1,f.request,f.registry,f.authority) /\ ~PauseRuntimeInstruction911(f.resumed,requestReplay,f.plan,f.context,11861,"CostPaid",f.child,f.point,1,freshRequest,f.registry,f.authority) /\ PauseRuntimeInstruction911(f.resumed,fresh,plan,f.context,11861,"CostPaid",freshChild,f.point,1,actualFreshRequest,f.registry,f.authority) /\ PauseRuntimeInstruction911(d.r,d.paused,d.plan,both,11860,"Draw",d.child,d.point,1,d.request,d.registry,d.authority) /\ ResumeRuntimeInstruction911(d.paused,d.resumed,d.plan,d.ledger,<<>>,d.receipt,d.registry,d.authority) /\ ~PauseRuntimeInstruction911(d.resumed,operationReplay,d.plan,both,11861,"Draw",d.child,d.point,2,d.request,d.registry,d.authority) SourceSpecimen0015TechniqueFixture911 == LET p == Specimen0015TechniqueProposalFixture911 IN ReplacementOverlay99(p,[groups |-> << [rule |-> "ProcedureCode8b36a14c1569",units |-> {1},nodes |-> <<8100>>,join |-> 8101], [rule |-> "ProcedureCode8b36a14c1569",units |-> {2},nodes |-> <<8101>>,join |-> 0]>>]) SourceSpecimen0015AdoptionFixture911 == LET s == Specimen0015Full99LookPrefixFixture911 technique == SourceSpecimen0015TechniqueFixture911 runtime == AdoptedRuntimeValue911(technique,s.entry) entry == [tag |-> "ActualGraphInstructionEntry",id |-> 8960,snapshotId |-> 1,kind |-> "SourceFirst", after |-> runtime,afterPlan |-> s.entry.afterPlan,stackBefore |-> <<>>,stackAfter |-> <<>>, owner |-> runtime.sourceOwner,sourceEntry |-> s.entry,sourceOrigin |-> s.origin] origin == [kind |-> "Instruction",plan |-> s.entry.afterPlan,parent |-> runtime.ability,ruleStep |-> "NoValue"] world == [s.world EXCEPT !.entries=ReplacementOverlay99(@,[id \in {8960} |-> entry])] description == [s.description EXCEPT !.context=OriginReference99(origin)] projection == [s.projection EXCEPT !.description=description] context == NewExpectedContext99(8961,8960,origin,world,description,s.effects,runtime.sourceOwner) observation == InitialWouldObservation99(context,8962) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,observation) expected == [NewExpectedRegistry99 EXCEPT !.entryIds={8950,8960},!.usedContextIds={8961},!.contexts=[id \in {8961} |-> context]] prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=s.effects,!.openingRef=context.currentRef,!.windowId=8963,!.group=89] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] resolvingPlan == [s.entry.afterPlan EXCEPT !.phase="Resolving"] resolving == [runtime EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=s.effects] atomicOrigin == [origin EXCEPT !.plan=resolvingPlan,!.parent=resolving.ability] observed == Specimen0015OwnerObservationFixture911(s.a0,RuntimeLookOwner911(resolving),2) lifetimes == [s.r0 EXCEPT !.frontier=LifetimeFrontier910(observed.authority,2)] observedContext == [atomic EXCEPT !.currentWorld=2] IN [s |-> s,technique |-> technique,runtime |-> runtime,entry |-> entry,origin |-> origin,world |-> world, description |-> description,projection |-> projection,context |-> context,observation |-> observation,history |-> history, expected |-> expected,prepared |-> prepared,noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared, resolvingPlan |-> resolvingPlan,resolving |-> resolving,atomic |-> atomic,atomicOrigin |-> atomicOrigin, observed |-> observed,lifetimes |-> lifetimes,observedContext |-> observedContext] SourceSpecimen0015AdoptionValid911(f) == /\ CurrentInterruptWorld99(f.world,f.s.ledger,CardFacts9) /\ ActualImminenceEntry99(f.s.entry,f.s.origin,f.world,CardFacts9) /\ CompiledInstructionTechnique911(f.technique,f.world.objects,CardFacts9) /\ AdoptSourceRuntime911(f.runtime,f.technique,f.s.entry,f.s.origin,f.world,f.s.r0,f.s.a0,CardFacts9) /\ SourceRuntimeBound911(f.runtime) /\ ActualRuntimeEntry911(f.entry,f.origin,f.world,f.s.r0,f.s.a0,CardFacts9) /\ BeginRuntimeExpectedContext911(NewExpectedRegistry99,f.expected,8961,f.origin,f.world,f.entry,f.description,f.projection,f.s.effects, f.runtime.sourceOwner,CardFacts9,NewWouldAccounting99,f.history,f.observation,f.s.r0,f.s.a0) SourceSpecimen0015AdoptionChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 IN /\ SourceSpecimen0015AdoptionValid911(f) /\ f.technique.definition=f.s.entry.after.payload /\ f.runtime.id=8000 /\ f.runtime.technique.definition.instructions= <<8100,8101>> /\ f.runtime.ability.instructions= <<8100>> /\ f.runtime.visited= <<>> /\ f.runtime.pc=8100 /\ f.runtime.ability.firstImminent /\ f.runtime.ability.detached /\ f.runtime.phase="Imminent" /\ f.expected.entryIds={f.entry.id,f.s.entry.id} /\ InitialWouldCaptured99(f.context,f.history) /\ f.context.imminenceId=f.entry.id /\ f.observation.reference=InstructionWindowRef93(f.s.entry.afterPlan) SourceSpecimen0015AtomicChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 IN /\ SourceSpecimen0015AdoptionValid911(f) /\ PrepareOpeningInterrupts99(f.context,f.prepared,f.s.ledger,f.s.ledger,f.origin,f.world,f.history,8963,89,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(f.prepared,f.noWindow,f.origin,f.world,f.history,f.s.ledger,<<>>,f.s.site,CardFacts9) /\ ClearPreparedInstruction99(f.noWindow,f.cleared,f.origin,f.world,f.history,f.s.ledger,<<>>,<<>>,"NoModifiers",f.clearance,CardFacts9) /\ BeginSourceRuntimeAtomic911(f.runtime,f.resolving,f.s.entry.afterPlan,f.resolvingPlan,f.cleared,f.origin,f.clearance,f.world, <<>>,f.s.r0,f.s.a0) /\ CommitLifetimeKernelCore910(f.s.a0,f.observed.authority,f.observed.world,f.observed.execution) /\ PublishNextLifetime910(f.s.r0,f.lifetimes,f.observed.authority) /\ RuntimeOwnerCurrent911(f.resolving,f.observed.authority) /\ ObserveResolvingLifetimeContext910(f.atomic,f.observedContext,f.lifetimes,f.observed.authority,f.atomicOrigin) /\ f.observedContext.actualEffects=f.s.effects /\ f.observedContext.initialRef=f.context.initialRef /\ f.observedContext.initialWorld=1 /\ f.observedContext.currentWorld=2 /\ InitialWouldCaptured99(f.observedContext,f.history) SourceSpecimen0015ChangedDefinitionFixture911 == LET f == SourceSpecimen0015AdoptionFixture911 d == [f.technique.definition EXCEPT !.syntax.id=102,!.activity.id=102] p == [f.technique EXCEPT !.definition=d,!.ability=102,!.lexemes=LexicalSingleFixture99(d,"NeutralValue00004","look",1,"EffectOperator",CardFacts9)] IN [f |-> f,technique |-> p,runtime |-> AdoptedRuntimeValue911(p,f.s.entry)] SourceSpecimen0015ProfileChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 other == SourceSpecimen0015ChangedDefinitionFixture911 IN /\ SourceSpecimen0015AdoptionValid911(f) /\ CompiledInstructionTechnique911(other.technique,f.world.objects,CardFacts9) /\ RuntimeProfile911(other.runtime) /\ RuntimeCurrentPlan911(other.runtime,f.s.entry.afterPlan) /\ ~AdoptSourceRuntime911(other.runtime,other.technique,f.s.entry,f.s.origin,f.world,f.s.r0,f.s.a0,CardFacts9) /\ \A bad \in {[f.technique EXCEPT !.sourceSHA="ForeignSpecimen0015Source911"],[f.technique EXCEPT !.card="NeutralValue00016"]} : ~AdoptSourceRuntime911(AdoptedRuntimeValue911(bad,f.s.entry),bad,f.s.entry,f.s.origin,f.world,f.s.r0,f.s.a0,CardFacts9) /\ ~AdoptSourceRuntime911([f.runtime EXCEPT !.ability.detached=FALSE],f.technique,f.s.entry,f.s.origin,f.world,f.s.r0,f.s.a0,CardFacts9) /\ ~AdoptSourceRuntime911([f.runtime EXCEPT !.id=8001,!.ability.id=8001],f.technique,f.s.entry,f.s.origin,f.world,f.s.r0,f.s.a0,CardFacts9) /\ ~AdoptSourceRuntime911(f.runtime,f.technique,f.s.entry,[f.s.origin EXCEPT !.parent.id=8001],f.world,f.s.r0,f.s.a0,CardFacts9) SourceSpecimen0015CaptureChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 IN /\ SourceSpecimen0015AdoptionValid911(f) /\ ~BeginRuntimeExpectedContext911(NewExpectedRegistry99,f.expected,8961,f.origin,f.world,f.entry,f.description,f.projection,f.s.effects, f.runtime.sourceOwner,CardFacts9,NewWouldAccounting99,NewWouldAccounting99,f.observation,f.s.r0,f.s.a0) /\ ~BeginRuntimeExpectedContext911(NewExpectedRegistry99,f.expected,8961,f.origin,f.world,f.entry,f.description,f.projection,f.s.effects, f.runtime.sourceOwner,CardFacts9,NewWouldAccounting99,f.history,[f.observation EXCEPT !.effects=Empty9],f.s.r0,f.s.a0) /\ ~BeginRuntimeExpectedContext911(NewExpectedRegistry99,[f.expected EXCEPT !.entryIds={f.entry.id}],8961,f.origin,f.world,f.entry, f.description,f.projection,f.s.effects,f.runtime.sourceOwner,CardFacts9,NewWouldAccounting99,f.history,f.observation,f.s.r0,f.s.a0) /\ ~PrepareOpeningInterrupts99(f.context,f.prepared,f.s.ledger,f.s.ledger,f.origin,f.world,NewWouldAccounting99,8963,89,Empty9,{},CardFacts9) /\ ~BeginSourceRuntimeAtomic911(f.runtime,f.resolving,f.s.entry.afterPlan,f.resolvingPlan,f.prepared,f.origin,f.clearance,f.world, <<>>,f.s.r0,f.s.a0) SourceSpecimen0015ReplayFixture911(freshSourceId) == LET f == SourceSpecimen0015AdoptionFixture911 sourceEntry == [f.s.entry EXCEPT !.id=IF freshSourceId THEN 8955 ELSE 8950] runtime == AdoptedRuntimeValue911(f.technique,sourceEntry) entry == [f.entry EXCEPT !.id=8965,!.after=runtime,!.sourceEntry=sourceEntry] world == [f.world EXCEPT !.entries=ReplacementOverlay99(@, [id \in {sourceEntry.id,entry.id} |-> IF id=entry.id THEN entry ELSE sourceEntry])] origin == [f.origin EXCEPT !.parent=runtime.ability] context == NewExpectedContext99(8966,entry.id,origin,world,f.description,f.s.effects,runtime.sourceOwner) observation == InitialWouldObservation99(context,8967) history == InitialCaptureAfterFixture99(f.history,context,observation) expected == [f.expected EXCEPT !.entryIds=@ \cup {sourceEntry.id,entry.id},!.usedContextIds=@ \cup {8966}, !.contexts=ReplacementOverlay99(@,[id \in {8966} |-> context])] IN [f |-> f,sourceEntry |-> sourceEntry,runtime |-> runtime,entry |-> entry,world |-> world,origin |-> origin, context |-> context,observation |-> observation,history |-> history,expected |-> expected] SourceSpecimen0015ReplayChecks911 == \A freshSourceId \in BOOLEAN : LET q == SourceSpecimen0015ReplayFixture911(freshSourceId) f == q.f IN /\ SourceSpecimen0015AdoptionValid911(f) /\ InitialWouldCaptured99(f.context,f.history) /\ ActualRuntimeEntry911(q.entry,q.origin,q.world,f.s.r0,f.s.a0,CardFacts9) /\ q.context.id \notin f.expected.usedContextIds /\ q.entry.id \notin f.expected.entryIds /\ (freshSourceId => q.sourceEntry.id \notin f.expected.entryIds) /\ WouldContextKey99(q.context.initialRef)=WouldContextKey99(f.context.initialRef) /\ ~BeginRuntimeExpectedContext911(f.expected,q.expected,q.context.id,q.origin,q.world,q.entry,f.description,f.projection,f.s.effects, q.runtime.sourceOwner,CardFacts9,f.history,q.history,q.observation,f.s.r0,f.s.a0) SourceSpecimen0015SourceBoundChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 other == SourceSpecimen0015ChangedDefinitionFixture911 rebound == [other.runtime EXCEPT !.sourceEntry=f.s.entry] IN /\ SourceRuntimeBound911(f.runtime) /\ RuntimeProfile911(rebound) /\ ~SourceRuntimeBound911(rebound) /\ \A bad \in {[f.runtime EXCEPT !.sourceOwner=[windowId |-> 999,option |-> NoPriorityOption9,transaction |-> 0]], [f.runtime EXCEPT !.ability.caller=999],[f.runtime EXCEPT !.ability.sourceZone="SideADiscard"], [f.runtime EXCEPT !.ability.detached=FALSE]} : ~SourceRuntimeBound911(bad) SourceSpecimen0015GraphWitnessChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 plan == [f.entry.afterPlan EXCEPT !.revision=1] bad == [f.entry EXCEPT !.afterPlan=plan] world == [f.world EXCEPT !.entries[f.entry.id]=bad] origin == [f.origin EXCEPT !.plan=plan] IN /\ SourceSpecimen0015AdoptionValid911(f) /\ ActualImminenceEntry99(f.s.entry,f.s.origin,world,CardFacts9) /\ AdoptSourceRuntime911(f.runtime,f.technique,f.s.entry,f.s.origin,world,f.s.r0,f.s.a0,CardFacts9) /\ ~ActualRuntimeEntry911(bad,origin,world,f.s.r0,f.s.a0,CardFacts9) /\ ~ActualRuntimeEntry911(f.entry,f.origin,[f.world EXCEPT !.entries[f.entry.id]=bad],f.s.r0,f.s.a0,CardFacts9) SourceProcessPlayAdoptionFixture911 == LET s == ProcessStartFixture99(FALSE) d == CurrentPlayDefinition97(s.imminent) p == [tag |-> "NormalizedInstructionTechnique",definition |-> d,source |-> d.syntax.source,ability |-> d.syntax.id, card |-> "Specimen0185",sourceSHA |-> CardFacts9["Specimen0185"].sourceSHA, lexemes |-> LexicalSingleFixture99(d,"Specimen0185","gain",1,"EffectOperator",CardFacts9),originalUnits |-> d.syntax.units, units |-> [id \in {1} |-> [category |-> "Trait",shape |-> "Single",sentence |-> 1,text |-> "SyntheticText1328c2095018"]], nodes |-> [id \in {9901} |-> InstructionNode911(id,"Plain",s.plan.steps,FALSE,0,Empty9,0,{1})],entry |-> 9901, groups |-> <<[rule |-> "ProcedureCode8b36a14c1569",units |-> {1},nodes |-> <<9901>>,join |-> 0]>>,nonoperative |-> {},linked |-> {}] base == [LifetimeWorldFixture910 EXCEPT !.id=s.world.id,!.objects=s.world.objects,!.turn=s.world.turn,!.control=s.world.traversalControl, !.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={},!.present={9930},!.playActivated={1}] authority == NewLifetimeAuthority910(base) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) runtime == AdoptedRuntimeValue911(p,s.entry) IN [s |-> s,technique |-> p,runtime |-> runtime,authority |-> authority,lifetimes |-> lifetimes] SourceProcessPlayNoDetachChecks911 == LET f == SourceProcessPlayAdoptionFixture911 IN /\ ProcessStartValid99(f.s) /\ CompiledInstructionTechnique911(f.technique,f.s.world.objects,CardFacts9) /\ AdoptSourceRuntime911(f.runtime,f.technique,f.s.entry,f.s.origin,f.s.world,f.lifetimes,f.authority,CardFacts9) /\ SourceRuntimeBound911(f.runtime) /\ f.runtime.ability.kind="Play" /\ ~f.runtime.ability.detached /\ ~AdoptSourceRuntime911([f.runtime EXCEPT !.ability.detached=TRUE],f.technique,f.s.entry,f.s.origin,f.s.world, f.lifetimes,f.authority,CardFacts9) /\ ~SourceRuntimeBound911([f.runtime EXCEPT !.ability.detached=TRUE]) ConditionalGraphTechniqueFixture911 == LET p == RootBranchTechnique911 units == [id \in {1} |-> [category |-> "Trait",shape |-> "Options",sentence |-> 1, optionInstructions |-> [A |-> <<11902>>,B |-> <<11903,11904>>]]] nodes == [id \in DOMAIN p.nodes |-> [p.nodes[id] EXCEPT !.segments={1}]] IN ReplacementOverlay99(p,[units |-> units,nodes |-> nodes, groups |-> <<[rule |-> "ProcedureCodef6fc0286cf28",units |-> {1},nodes |-> <<11901,11902,11903,11904>>,join |-> 0]>>]) ConditionalGraphSelectionFixture911 == LET technique == ConditionalGraphTechniqueFixture911 d == technique.definition key == ConditionalKey96(d) definitions == [k \in {key} |-> d] objects == RootBranchObjects911 initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) event == ConditionalEventFixture96(12101,"StructuralEvent",0,"SideB","SideB",initial,12099) events == [id \in {12101} |-> event] begin == ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",definitions,objects) current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp1 == ConditionalCheckpointFixture96(seed,1,begin,current,events) recognition == [definition |-> key,occurrence |-> 12101] allocation == [k \in {recognition} |-> 12110] bindings == ConditionalBindingsFixture96({recognition},1,12120,121) pending == ConditionalCommittedFixture96(seed,definitions,cp1,allocation,bindings,Empty9) site == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",2) members == ConditionalWindowMembers96(pending.instances,12120) open == WindowFixture92(12120,"Reaction",site,members,121,NoTimingRef9) cp2 == SearchCheckpointFixture911(pending,2,objects,ConditionalPriorityCaller96(open),Empty9) sideBReady == [open EXCEPT !.stage="Ready",!.checkpoint=2] sideAWindow == PassPriorityFrame9(sideBReady) cp3 == SearchCheckpointFixture911(cp2.after,3,objects,ConditionalPriorityCaller96(sideAWindow),Empty9) ready == [sideAWindow EXCEPT !.stage="Ready",!.checkpoint=3] option == ConditionalOptionFixture92(ready,12110) legality == LegalityFixture92(ready,option) busy == StartedFixture92(ready,option) before == OpenConditionalRuntime911(12110,technique,ready,option,legality.transactionId,"SideAObjectiveCompletion") plan == OpenInstruction93(11901,"Ability",12110,technique.source,"SideAObjectiveCompletion",1,"NoValue",technique.nodes[11901].steps,FALSE) targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={}] imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] imminent == [before EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [cp3.after EXCEPT !.instances[12110].status="Imminent"] restrictions == [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9] receipt == ReplacementOverlay99(InstructionEntryFixture93(plan),[checkpointId |-> 3]) entry == [tag |-> "ActualGraphInstructionEntry",id |-> 12150,snapshotId |-> 31,kind |-> "ConditionalFirst", beforeLedger |-> cp3.after,afterLedger |-> selected,stackBefore |-> <>,stackAfter |-> <>, before |-> before,after |-> imminent,snapshot |-> SnapshotWithConditionalRegistry96(cp3.current,cp3.after),option |-> option, legality |-> legality,currentEffect |-> Empty9,beforePlan |-> plan,afterPlan |-> imminentPlan,targets |-> targets, receipt |-> receipt,turnUses |-> Empty9,restrictions |-> restrictions, owner |-> [windowId |-> 12120,option |-> option,transaction |-> legality.transactionId]] lifeWorld == [RootBranchWorld911 EXCEPT !.id=31,!.turn=TurnFixture92("SideB"), !.activity.instances=[id \in {12110} |-> [ability |-> d.syntax.id,sourceObject |-> 1,status |-> "Imminent",owner |-> RuntimeLookOwner911(imminent)]]] authority == NewLifetimeAuthority910(lifeWorld) registry == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) IN [technique |-> technique,d |-> d,key |-> key,definitions |-> definitions,objects |-> objects,initial |-> initial,seed |-> seed, events |-> events,cp1 |-> cp1,allocation |-> allocation,bindings |-> bindings,pending |-> pending, site |-> site,members |-> members,open |-> open,cp2 |-> cp2,sideBReady |-> sideBReady,sideAWindow |-> sideAWindow, cp3 |-> cp3,ready |-> ready,option |-> option,legality |-> legality,busy |-> busy,before |-> before, plan |-> plan,targets |-> targets,imminentPlan |-> imminentPlan,imminent |-> imminent,selected |-> selected, restrictions |-> restrictions,receipt |-> receipt,entry |-> entry,entrySnapshot |-> cp3.current,lifeWorld |-> lifeWorld,authority |-> authority,registry |-> registry] ConditionalGraphSelectionValid911(s) == /\ CompiledInstructionTechnique911(s.technique,s.objects,RootBranchFacts911) /\ ProcessConditionalCheckpoint96(s.seed,s.pending,<<>>,<<>>,s.definitions,s.cp1,ConditionalConditionsFixture96(s.definitions,s.events), s.allocation,s.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,s.pending,12120,s.site,OpeningFixture92(12120,"Reaction",s.site,s.members,121,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.cp2.after,<>,<>,s.definitions,s.cp2.checkpoint, ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12120}) /\ CheckpointPriorityWithConditionals96(s.cp2.after,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ PassConditionalPriorityCore96(s.cp2.after,s.cp2.after,<>,<>,"SideB",Empty9) /\ ProcessConditionalCheckpoint96(s.cp2.after,s.cp3.after,<>,<>,s.definitions,s.cp3.checkpoint, ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12120}) /\ CheckpointPriorityWithConditionals96(s.cp3.after,<>,<>,[CheckpointFixture92(s.sideAWindow) EXCEPT !.id=3]) /\ OpenObservedLingering910(s.authority,s.registry) /\ BeginConditionalRuntime911(s.cp3.after,s.selected,<>,<>,s.before,s.imminent,s.entry.snapshot,s.option,s.legality,Empty9, s.plan,s.imminentPlan,s.targets,s.receipt,Empty9,s.restrictions,s.registry,s.authority,RootBranchFacts911) ConditionalGraphContextFromEntryFixture911(s,contextId,observationId,openingId,groupId,atomicWorldId,beforeExpectedRegistry,beforeHistory) == LET origin == [kind |-> "Instruction",plan |-> s.imminentPlan,parent |-> s.imminent.ability,ruleStep |-> "NoValue"] atomicR == [s.imminent EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] effectFixture == RootBranchStepFixture911(atomicR,"A",s.lifeWorld) effects == effectFixture.context.actualEffects capabilities == [tag |-> "NormalizedInterruptCapabilities",definition |-> s.d,origin |-> s.technique.lexemes.origin,clauses |-> Empty9] world == [tag |-> "CurrentInterruptWorld",id |-> s.lifeWorld.id,turn |-> s.lifeWorld.turn,traversalControl |-> s.lifeWorld.control, objects |-> s.objects,controllers |-> [id \in DOMAIN s.objects |-> s.objects[id].side],activePeriods |-> Empty9, conditional |-> SnapshotWithConditionalRegistry96(s.entrySnapshot,s.selected),paidDefinitions |-> Empty9, lexemes |-> [k \in {s.key} |-> s.technique.lexemes],capabilities |-> [k \in {s.key} |-> capabilities], paidContexts |-> Empty9,turnUses |-> Empty9,replacementDefinitions |-> Empty9,liveReplacementIds |-> {}, entries |-> [id \in {s.entry.id} |-> s.entry]] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> s.technique.source, snapshotId |-> s.lifeWorld.id,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> s.lifeWorld.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(contextId,s.entry.id,origin,world,description,effects,s.entry.owner) expectedRegistry == [beforeExpectedRegistry EXCEPT !.contexts=ReplacementOverlay99(@,[id \in {contextId} |-> context]), !.entryIds=@ \cup {s.entry.id},!.usedContextIds=@ \cup {contextId}] observation == InitialWouldObservation99(context,observationId) history == InitialCaptureAfterFixture99(beforeHistory,context,observation) observed == [s.selected EXCEPT !.instances[12110].expected=ReplacementOverlay99(@,[i \in {s.imminentPlan.index} |-> [instruction |-> context.initialRef,effects |-> ExpectedObservationSet99(effects)]])] prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=openingId,!.group=groupId] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] atomicOrigin == [origin EXCEPT !.plan=atomicPlan,!.parent=atomicR.ability] atomicContext == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] atomicLedger == [observed EXCEPT !.instances[12110].status="Resolving"] atomicWorld == [s.lifeWorld EXCEPT !.id=atomicWorldId,!.activity.instances[12110].status="Resolving",!.activity.instances[12110].owner=RuntimeLookOwner911(atomicR)] atomicExecution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> contextId,snapshotId |-> atomicWorldId,source |-> s.technique.source] atomicAuthority == LifetimeAuthorityAfter910(s.authority,LifetimeKernelTransition910(s.lifeWorld,atomicWorld,atomicExecution)) atomicRegistry == [s.registry EXCEPT !.frontier=LifetimeFrontier910(atomicAuthority,Len(atomicAuthority.order))] atomicSnapshot == SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(atomicWorldId,s.entrySnapshot.checkpointId,"AfterAtomicEntry",s.definitions,s.objects),atomicLedger) currentContext == [atomicContext EXCEPT !.currentWorld=atomicWorldId] currentWorld == [world EXCEPT !.id=atomicWorldId,!.conditional=atomicSnapshot] IN [beforeExpectedRegistry |-> beforeExpectedRegistry,beforeHistory |-> beforeHistory,s |-> s,origin |-> origin,atomicR |-> atomicR,effects |-> effects,world |-> world,description |-> description,projection |-> projection, context |-> context,expectedRegistry |-> expectedRegistry,observation |-> observation,history |-> history, observed |-> observed,prepared |-> prepared,noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared, atomicPlan |-> atomicPlan,atomicOrigin |-> atomicOrigin,atomicContext |-> atomicContext,atomicLedger |-> atomicLedger, atomicWorld |-> atomicWorld,atomicExecution |-> atomicExecution,atomicAuthority |-> atomicAuthority,atomicRegistry |-> atomicRegistry, atomicSnapshot |-> atomicSnapshot,currentContext |-> currentContext,currentWorld |-> currentWorld] ConditionalGraphFirstContextFixture911 == ConditionalGraphContextFromEntryFixture911(ConditionalGraphSelectionFixture911,12200,12201,12202,122,32,NewExpectedRegistry99,NewWouldAccounting99) ConditionalGraphContextProtocolValid911(f) == LET s == f.s IN /\ BeginRuntimeExpectedContext911(f.beforeExpectedRegistry,f.expectedRegistry,f.context.id,f.origin,f.world,s.entry,f.description,f.projection,f.effects, s.entry.owner,RootBranchFacts911,f.beforeHistory,f.history,f.observation,s.registry,s.authority) /\ ObserveConditionalRuntimeExpected911(s.selected,f.observed,s.imminent,s.imminentPlan,f.context,f.history) /\ ApplyAutomaticReplacements99(f.context,f.context,f.origin,f.origin,f.world,<>,<<>>,RootBranchFacts911,f.history) /\ PrepareOpeningInterrupts99(f.context,f.prepared,f.observed,f.observed,f.origin,f.world,f.history,f.prepared.windowId,f.prepared.group,Empty9,{12120},RootBranchFacts911) /\ NoPreparedInterrupt99(f.prepared,f.noWindow,f.origin,f.world,f.history,f.observed,<>,s.site,RootBranchFacts911) /\ ClearPreparedInstruction99(f.noWindow,f.cleared,f.origin,f.world,f.history,f.observed,<>,<>,"NoModifiers",f.clearance,RootBranchFacts911) /\ BeginConditionalRuntimeAtomic911(f.observed,f.atomicLedger,s.imminent,f.atomicR,s.imminentPlan,f.atomicPlan,f.cleared,f.origin, f.clearance,f.world,s.registry,s.authority,<>) /\ CommitLifetimeKernelCore910(s.authority,f.atomicAuthority,f.atomicWorld,f.atomicExecution) /\ PublishNextLifetime910(s.registry,f.atomicRegistry,f.atomicAuthority) /\ ObserveConditionalActivity96(f.observed,f.atomicLedger,f.atomicLedger,<>,<>,f.world.conditional,f.atomicSnapshot) /\ ObserveResolvingLifetimeContext910(f.atomicContext,f.currentContext,f.atomicRegistry,f.atomicAuthority,f.atomicOrigin) ConditionalGraphFirstContextValid911(f) == ConditionalGraphSelectionValid911(f.s) /\ ConditionalGraphContextProtocolValid911(f) ConditionalGraphCaptureChecks911 == LET f == ConditionalGraphFirstContextFixture911 IN /\ ConditionalGraphFirstContextValid911(f) /\ f.atomicR.technique.definition=f.s.technique.definition /\ f.atomicLedger.instances[12110].definitionCopy=f.s.technique.definition /\ f.atomicLedger.instances[12110].expected[1].effects=ExpectedObservationSet99(f.context.initialEffects) ConditionalGraphReturnFromContextFixture911(f,option,nextWorldId) == LET op == RootBranchStepFixture911(f.atomicR,option,f.atomicWorld) actualReturn == [op.returned EXCEPT !.contextId=f.currentContext.id,!.instruction=f.currentContext.currentRef, !.effects=f.currentContext.actualEffects,!.snapshotId=f.atomicWorld.id] control == IF f.atomicR.technique.nodes[f.atomicR.pc].kind="Choice" THEN [op.control EXCEPT !.contextId=f.currentContext.id,!.instruction=f.currentContext.currentRef, !.actualEffects=f.currentContext.actualEffects,!.completion=actualReturn] ELSE op.control step == [op.step EXCEPT !.expectedReturn=actualReturn] after == IF f.atomicR.technique.nodes[f.atomicR.pc].kind="Choice" THEN [op.after EXCEPT !.choices[f.atomicPlan.index]=control] ELSE op.after candidate == [f.atomicLedger EXCEPT !.instances[12110].status=IF after.pc=0 THEN "Complete" ELSE "Resolving"] nextWorld == [f.atomicWorld EXCEPT !.id=nextWorldId, !.finishedInstances=@ \cup (IF after.pc=0 THEN {after.id} ELSE {}), !.activity.instances[12110]=[ability |-> f.s.d.syntax.id,sourceObject |-> 1,status |-> IF after.pc=0 THEN "Complete" ELSE "Resolving",owner |-> RuntimeLookOwner911(after)]] execution == [tag |-> "ActualObjectTransition",id |-> f.currentContext.id,snapshotId |-> nextWorldId, source |-> after.ability.source,instruction |-> f.currentContext.currentRef,return |-> actualReturn] authority == LifetimeAuthorityAfter910(f.atomicAuthority,LifetimeKernelTransition910(f.atomicWorld,nextWorld,execution)) registry == [f.atomicRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,nextWorld),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] snapshot == SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(nextWorldId,f.atomicSnapshot.checkpointId,"AfterGraphInstructionReturn",f.s.definitions,f.s.objects),candidate) returnedContext == [f.currentContext EXCEPT !.phase="Returned"] afterOrigin == [f.atomicOrigin EXCEPT !.plan=op.afterPlan,!.parent=after.ability] IN [f |-> f,op |-> op,actualReturn |-> actualReturn,control |-> control,step |-> step,after |-> after,candidate |-> candidate, nextWorld |-> nextWorld,execution |-> execution,authority |-> authority,registry |-> registry,snapshot |-> snapshot, returnedContext |-> returnedContext,afterOrigin |-> afterOrigin] ConditionalGraphFirstReturnFixture911 == ConditionalGraphReturnFromContextFixture911(ConditionalGraphFirstContextFixture911,"A",33) ConditionalGraphReturnProtocolValid911(q) == LET f == q.f IN /\ RecordObservedConditionalRuntimeUse911(f.atomicLedger,f.atomicLedger,f.atomicR,f.atomicPlan, ConditionalExecutionFixture96([id |-> f.atomicR.id,ability |-> f.atomicR.ability],f.atomicPlan,{1}), Empty9,Empty9,Empty9,Empty9,0,{},f.currentWorld,f.atomicRegistry,f.atomicAuthority) /\ FinishObservedConditionalRuntime911(f.atomicRegistry,q.registry,f.atomicLedger,q.candidate,q.candidate, <>,<>,f.atomicR,q.after,f.atomicPlan,q.op.afterPlan,f.currentContext,q.returnedContext, f.atomicOrigin,q.afterOrigin,f.currentWorld,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary, f.atomicSnapshot,q.snapshot,f.atomicAuthority,q.authority) ConditionalGraphFirstReturnValid911(q) == ConditionalGraphFirstContextValid911(q.f) /\ ConditionalGraphReturnProtocolValid911(q) ConditionalGraphFirstReturnChecks911 == LET q == ConditionalGraphFirstReturnFixture911 IN /\ ConditionalGraphFirstReturnValid911(q) /\ q.after.pc=11902 /\ q.after.visited= <<11901>> /\ q.after.choices[1].option="A" /\ q.candidate.instances[12110].definitionCopy=q.f.s.technique.definition /\ DOMAIN q.candidate.instances[12110].expected={1} /\ q.candidate.instances[12110].status="Resolving" /\ q.registry.frontier.position=3 /\ q.authority.current.activity.instances[12110].owner.technique=q.after.technique /\ q.returnedContext.initialWorld=q.f.context.initialWorld ConditionalGraphCheckpointFixture911(q,id,worldId) == LET world == [q.nextWorld EXCEPT !.id=worldId] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 300000+worldId,snapshotId |-> worldId,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(q.authority,LifetimeKernelTransition910(q.nextWorld,world,execution)) registry == [q.registry EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] current == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(worldId,id,"ProcedureCodee605a78f5d5e",q.f.s.definitions,world.objects),q.candidate) EXCEPT !.usedObjects=q.candidate.lastSnapshot.usedObjects \cup DOMAIN world.objects, !.activationEpoch=ConditionalEpochMap96(q.candidate,q.f.s.definitions),!.activationSerial=q.candidate.activationSerial] begin == [current EXCEPT !.id=1000000+worldId,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(q.candidate,id,begin,current,Empty9) EXCEPT !.caller=GraphBoundaryCaller911(q.op.boundary)] ledger == ConditionalCommittedFixture96(q.candidate,q.f.s.definitions,cp,Empty9,Empty9,Empty9) receipt == [tag |-> "GraphInstructionCheckpoint",id |-> id,instance |-> q.after.id,source |-> q.after.ability.source, boundary |-> q.op.boundary,complete |-> TRUE,allNewerChainsComplete |-> TRUE] ready == [q.after EXCEPT !.checkpoint=id,!.phase=IF q.after.pc=0 THEN "Complete" ELSE "Targets"] IN [q |-> q,world |-> world,execution |-> execution,authority |-> authority,registry |-> registry,current |-> current, cp |-> cp,ledger |-> ledger,receipt |-> receipt,ready |-> ready] ConditionalGraphCheckpointValid911(g) == /\ CommitLifetimeKernelCore910(g.q.authority,g.authority,g.world,g.execution) /\ PublishNextLifetime910(g.q.registry,g.registry,g.authority) /\ ProcessConditionalCheckpoint96(g.q.candidate,g.ledger,<>,<>,g.q.f.s.definitions,g.cp, ConditionalConditionsFixture96(g.q.f.s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{g.q.f.s.busy.id}) /\ CompleteObservedRuntimeCheckpoint911(g.q.after,g.ready,g.ledger,<>,g.receipt,g.registry,g.authority) ConditionalGraphNextSelectionFixture911(g,entryId) == LET s == g.q.f.s r == g.ready node == r.technique.nodes[r.pc] plan == OpenInstruction93(r.pc,"Ability",r.id,r.ability.source,r.ability.sourceZone,Len(r.visited)+1,"NoValue",node.steps,node.requiresTargets) targets == InstructionTargetsFixture93(plan) afterPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent",!.targets=targets.targets] imminent == [r EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.phase="Imminent",!.ability.cursor=@+1] selected == [g.ledger EXCEPT !.instances[12110].status="Imminent"] receipt == ReplacementOverlay99(InstructionEntryFixture93(plan),[checkpointId |-> r.checkpoint]) entry == [tag |-> "ActualGraphInstructionEntry",id |-> entryId,snapshotId |-> g.world.id,kind |-> "ConditionalNext", beforeLedger |-> g.ledger,afterLedger |-> selected,stackBefore |-> <>,stackAfter |-> <>, before |-> r,after |-> imminent,beforePlan |-> plan,afterPlan |-> afterPlan,targets |-> targets,receipt |-> receipt, owner |-> [windowId |-> r.windowId,option |-> r.option,transaction |-> r.transaction]] IN ReplacementOverlay99(s,[before |-> r,imminent |-> imminent,selected |-> selected,plan |-> plan,imminentPlan |-> afterPlan, targets |-> targets,receipt |-> receipt,entry |-> entry,entrySnapshot |-> g.current,lifeWorld |-> g.world, authority |-> g.authority,registry |-> g.registry]) ConditionalGraphNextSelectionValid911(g,s) == /\ ConditionalGraphCheckpointValid911(g) /\ EnterNextConditionalRuntime911(g.ledger,s.selected,<>,g.ready,s.imminent,s.plan,s.imminentPlan,s.targets,s.receipt,s.registry,s.authority) ConditionalGraphShortPathFixture911 == LET first == ConditionalGraphFirstReturnFixture911 cp4 == ConditionalGraphCheckpointFixture911(first,4,35) next == ConditionalGraphNextSelectionFixture911(cp4,12250) priorRegistry == [first.f.expectedRegistry EXCEPT !.contexts[first.f.context.id]=first.returnedContext] context == ConditionalGraphContextFromEntryFixture911(next,12300,12301,12302,123,36,priorRegistry,first.f.history) last == ConditionalGraphReturnFromContextFixture911(context,"NoValue",37) cp5 == ConditionalGraphCheckpointFixture911(last,5,39) receipt == PaidReturnFixture95(next.busy,5) afterStack == <> after == [cp5.ready EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN [first |-> first,cp4 |-> cp4,next |-> next,context |-> context,last |-> last,cp5 |-> cp5, receipt |-> receipt,afterStack |-> afterStack,after |-> after] ConditionalGraphShortPathChecks911 == LET f == ConditionalGraphShortPathFixture911 IN /\ ConditionalGraphFirstReturnValid911(f.first) /\ ConditionalGraphNextSelectionValid911(f.cp4,f.next) /\ ConditionalGraphContextProtocolValid911(f.context) /\ ConditionalGraphReturnProtocolValid911(f.last) /\ ConditionalGraphCheckpointValid911(f.cp5) /\ ReturnConditionalRuntime911(<>,f.afterStack,f.cp5.ready,f.after,f.cp5.ledger,f.receipt,f.cp5.registry,f.cp5.authority) /\ f.after.pc=0 /\ f.after.visited= <<11901,11902>> /\ f.after.choices[1].option="A" /\ f.after.ability.instructions= <<11901,11902>> /\ f.after.ability.returned /\ f.cp5.ledger.instances[12110].definitionCopy=f.next.technique.definition /\ f.next.technique.definition.instructions= <<11901,11902,11903,11904>> /\ DOMAIN f.cp5.ledger.instances[12110].expected={1,2} /\ f.cp5.ledger.instances[12110].status="Complete" /\ 12110 \in f.cp5.world.finishedInstances /\ DOMAIN f.context.expectedRegistry.contexts={12200,12300} /\ f.context.beforeHistory=f.first.f.history ConditionalGraphLongPathFixture911 == LET first == ConditionalGraphReturnFromContextFixture911(ConditionalGraphFirstContextFixture911,"B",33) cp4 == ConditionalGraphCheckpointFixture911(first,4,35) next == ConditionalGraphNextSelectionFixture911(cp4,12250) priorRegistry == [first.f.expectedRegistry EXCEPT !.contexts[first.f.context.id]=first.returnedContext] context == ConditionalGraphContextFromEntryFixture911(next,12300,12301,12302,123,36,priorRegistry,first.f.history) body == ConditionalGraphReturnFromContextFixture911(context,"NoValue",37) cp5 == ConditionalGraphCheckpointFixture911(body,5,39) lastSelection == ConditionalGraphNextSelectionFixture911(cp5,12350) lastRegistry == [context.expectedRegistry EXCEPT !.contexts[context.context.id]=body.returnedContext] lastContext == ConditionalGraphContextFromEntryFixture911(lastSelection,12400,12401,12402,124,40,lastRegistry,context.history) last == ConditionalGraphReturnFromContextFixture911(lastContext,"NoValue",41) cp6 == ConditionalGraphCheckpointFixture911(last,6,43) receipt == PaidReturnFixture95(next.busy,6) afterStack == <> after == [cp6.ready EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN [first |-> first,cp4 |-> cp4,next |-> next,context |-> context,body |-> body,cp5 |-> cp5,lastSelection |-> lastSelection, lastContext |-> lastContext,last |-> last,cp6 |-> cp6,receipt |-> receipt,afterStack |-> afterStack,after |-> after] ConditionalGraphLongPathChecks911 == LET f == ConditionalGraphLongPathFixture911 IN /\ ConditionalGraphFirstContextValid911(f.first.f) /\ ConditionalGraphReturnProtocolValid911(f.first) /\ ConditionalGraphNextSelectionValid911(f.cp4,f.next) /\ ConditionalGraphContextProtocolValid911(f.context) /\ ConditionalGraphReturnProtocolValid911(f.body) /\ ConditionalGraphNextSelectionValid911(f.cp5,f.lastSelection) /\ ConditionalGraphContextProtocolValid911(f.lastContext) /\ ConditionalGraphReturnProtocolValid911(f.last) /\ ConditionalGraphCheckpointValid911(f.cp6) /\ ReturnConditionalRuntime911(<>,f.afterStack,f.cp6.ready,f.after,f.cp6.ledger,f.receipt,f.cp6.registry,f.cp6.authority) /\ f.body.after.pc=11904 /\ f.body.candidate.instances[12110].status="Resolving" /\ f.after.pc=0 /\ f.after.visited= <<11901,11903,11904>> /\ f.after.choices[1].option="B" /\ f.after.ability.instructions= <<11901,11903,11904>> /\ f.after.ability.returned /\ f.cp6.ledger.instances[12110].definitionCopy=f.next.technique.definition /\ DOMAIN f.cp6.ledger.instances[12110].expected={1,2,3} /\ f.cp6.ledger.instances[12110].status="Complete" /\ 12110 \in f.cp6.world.finishedInstances /\ DOMAIN f.lastContext.expectedRegistry.contexts={12200,12300,12400} /\ f.lastContext.beforeHistory=f.context.history ConditionalGraphCapturedChoiceChecks911 == LET f == ConditionalGraphShortPathFixture911.context forged == [f.atomicR EXCEPT !.choices[1].option="B"] execution == ConditionalExecutionFixture96([id |-> forged.id,ability |-> forged.ability],f.atomicPlan,{1}) IN /\ RuntimeProfile911(forged) /\ ConditionalRuntimeBound911(f.atomicLedger,forged) /\ ~RecordObservedConditionalRuntimeUse911(f.atomicLedger,f.atomicLedger,forged,f.atomicPlan,execution, Empty9,Empty9,Empty9,Empty9,0,{},f.currentWorld,f.atomicRegistry,f.atomicAuthority) ConditionalGraphCapturedTurnChecks911 == LET f == ConditionalGraphShortPathFixture911.context forged == [f.atomicR EXCEPT !.turnId=2] execution == ConditionalExecutionFixture96([id |-> forged.id,ability |-> forged.ability],f.atomicPlan,{1}) IN /\ RuntimeProfile911(forged) /\ ConditionalRuntimeBound911(f.atomicLedger,forged) /\ ~RecordObservedConditionalRuntimeUse911(f.atomicLedger,f.atomicLedger,forged,f.atomicPlan,execution, Empty9,Empty9,Empty9,Empty9,0,{},f.currentWorld,f.atomicRegistry,f.atomicAuthority) ConditionalGraphUsedWorldChecks911 == LET f == ConditionalGraphShortPathFixture911.context world == [f.currentWorld EXCEPT !.id=35] IN ~RecordObservedConditionalRuntimeUse911(f.atomicLedger,f.atomicLedger,f.atomicR,f.atomicPlan, ConditionalExecutionFixture96([id |-> f.atomicR.id,ability |-> f.atomicR.ability],f.atomicPlan,{1}), Empty9,Empty9,Empty9,Empty9,0,{},world,f.atomicRegistry,f.atomicAuthority) ConditionalGraphHistoryRetentionChecks911 == LET q == ConditionalGraphShortPathFixture911.last candidate == [q.candidate EXCEPT !.instances[12110].expected=[i \in {2} |-> @[i]]] snapshot == SnapshotWithConditionalRegistry96(q.snapshot,candidate) IN ~FinishObservedConditionalRuntime911(q.f.atomicRegistry,q.registry,q.f.atomicLedger,candidate,candidate, <>,<>,q.f.atomicR,q.after,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.returnedContext, q.f.atomicOrigin,q.afterOrigin,q.f.currentWorld,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary, q.f.atomicSnapshot,snapshot,q.f.atomicAuthority,q.authority) ConditionalGraphReturnPublicationChecks911 == LET f == ConditionalGraphShortPathFixture911 stale == [f.cp5.authority EXCEPT !.current.finishedInstances={}] IN ~ReturnConditionalRuntime911(<>,f.afterStack,f.cp5.ready,f.after,f.cp5.ledger,f.receipt,f.cp5.registry,stale) ConditionalGraphTerminalOrdinalChecks911 == LET q == ConditionalGraphShortPathFixture911.last before == [q.f.atomicLedger EXCEPT !.instances[12110].expected=[i \in {2} |-> @[i]]] after == [q.candidate EXCEPT !.instances[12110].expected=[i \in {2} |-> @[i]]] IN ~FinishConditionalRuntimeCore911(before,after,<>,<>,q.f.atomicR,q.after,q.f.atomicPlan, q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary) ConditionalGraphFinishedAuthorityChecks911 == LET f == ConditionalGraphShortPathFixture911 world == [f.cp5.world EXCEPT !.finishedInstances={}] authority == NewLifetimeAuthority910(world) registry == [f.cp5.registry EXCEPT !.frontier=LifetimeFrontier910(authority,1)] IN /\ LifetimeReady910(registry,authority) /\ RuntimeOwnerCurrent911(f.cp5.ready,authority) /\ ~ReturnConditionalRuntime911(<>,f.afterStack,f.cp5.ready,f.after,f.cp5.ledger,f.receipt,registry,authority) CallerSingleTechniqueFixture911(d,card,steps) == LET id == d.instructions[1] IN [tag |-> "NormalizedInstructionTechnique",definition |-> d,source |-> d.syntax.source,ability |-> d.syntax.id, card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA,lexemes |-> LexicalReceiptFixture99(d,card,Empty9,CardFacts9),originalUnits |-> d.syntax.units, units |-> [u \in {1} |-> [category |-> "Trait",shape |-> "Single",sentence |-> 1]], nodes |-> [n \in {id} |-> InstructionNode911(id,"Plain",steps,FALSE,0,Empty9,0,{1})],entry |-> id, groups |-> <<[rule |-> "ProcedureCode8b36a14c1569",units |-> {1},nodes |-> <>,join |-> 0]>>,nonoperative |-> {},linked |-> {}] CallerTerminalFixture911(technique,entry,objects,checkpoint) == LET initial == AdoptedRuntimeValue911(technique,entry) runtime == [initial EXCEPT !.pc=0,!.visited= <>,!.phase="Complete",!.checkpoint=checkpoint, !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] world == [LifetimeWorldFixture910 EXCEPT !.id=12599,!.objects=objects,!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.finishedInstances={runtime.id},!.activity.instances=[id \in {runtime.id} |-> [ability |-> technique.ability, sourceObject |-> IF technique.source.kind="Object" THEN technique.source.object ELSE 0,status |-> "Complete",owner |-> RuntimeLookOwner911(runtime)]]] authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) returned == [runtime EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN [initial |-> initial,runtime |-> runtime,world |-> world,authority |-> authority,lifetimes |-> lifetimes,returned |-> returned] CallerTerminalValid911(f) == /\ RuntimeProfile911(f.runtime) /\ SourceRuntimeBound911(f.runtime) /\ LifetimeReady910(f.lifetimes,f.authority) /\ RuntimeOwnerCurrent911(f.runtime,f.authority) CallerPaidFixture911 == LET d == PaidDefinitionFixture95(12500,"Specimen0002",<<>>,<<[kind |-> "ResourceUnits",amount |-> 2]>>) objects == PaidSourceFixture95("Specimen0002") window == PaidWindowFixture95(12501,"Paid","SideB") option == PaidOptionFixture95(d,window) busy == StartedFixture92(window,option) p == OpenPaidProcedure95(12502,d,option,window,LegalityFixture92(window,option).transactionId,"Play") paid == PaidCommittedFixture95(p,Empty9,FALSE) planning == PaidTargetsFrame95(paid,12503) plan == OpenInstruction93(700,"Ability",p.id,p.ability.source,"Play",1,"NoValue",<<"PaidSourceEffect">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] imminent == PaidImminentFrame95(planning) entry == [kind |-> "Paid",after |-> imminent] technique == CallerSingleTechniqueFixture911(d,"Specimen0002",plan.steps) terminal == CallerTerminalFixture911(technique,entry,objects,12504) finalProcedure == [imminent EXCEPT !.ability=terminal.runtime.ability,!.phase="Complete",!.checkpoint=12504] afterProcedure == [finalProcedure EXCEPT !.ability.returned=TRUE,!.phase="Returned"] afterStack == <> receipt == PaidReturnFixture95(busy,12504) IN [d |-> d,objects |-> objects,window |-> window,option |-> option,busy |-> busy,p |-> p,paid |-> paid,planning |-> planning, plan |-> plan,imminentPlan |-> imminentPlan,imminent |-> imminent,entry |-> entry,technique |-> technique,terminal |-> terminal, finalProcedure |-> finalProcedure,afterProcedure |-> afterProcedure,afterStack |-> afterStack,receipt |-> receipt] CallerPaidValid911(f) == /\ ReservePaidAbility95(<>,<>,f.p,12502,f.d,PaidContextFixture95(f.d,f.objects,TurnFixture92("SideB")), f.option,LegalityFixture92(f.window,f.option),{}) /\ CommitPaidTrigger95(<>,f.p,f.paid,f.objects,f.objects,Empty9,Empty9,Empty9,DOMAIN f.objects, PaidPaymentFixture95(f.p,f.objects,f.objects,1,FALSE,FALSE),Empty9,PaidUsesFixture95(f.p),Empty9,PaidTurnUsesFixture95(f.p),1,{PaidUseFixture95(f.p)}) /\ PaidCheckpoint95(<>,f.paid,f.planning,f.objects,Empty9,PaidCheckpointFixture95(f.paid,12503)) /\ EnterPaidInstruction95(<>,f.planning,f.imminent,f.plan,f.imminentPlan,[InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}],PaidEntryFixture95(f.plan,12503)) /\ CompiledInstructionTechnique911(f.technique,f.objects,CardFacts9) /\ CallerTerminalValid911(f.terminal) /\ ReturnPaidRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure,f.receipt,f.objects,Empty9,f.terminal.lifetimes,f.terminal.authority) CallerPaidReturnChecks911 == LET f == CallerPaidFixture911 IN /\ CallerPaidValid911(f) /\ f.terminal.returned.ability.returned /\ f.afterProcedure.costPaid /\ f.afterProcedure.transaction=f.p.transaction /\ f.afterStack[1].stage="NeedCheckpoint" /\ f.afterStack[1].busy.id=0 /\ ~ReturnPaidRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure, [f.receipt EXCEPT !.finalCheckpointId=12503],f.objects,Empty9,f.terminal.lifetimes,f.terminal.authority) /\ ~ReturnPaidRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,[f.afterProcedure EXCEPT !.costPaid=FALSE], f.receipt,f.objects,Empty9,f.terminal.lifetimes,f.terminal.authority) CallerPlayFixture911 == LET s == ProcessStartFixture99(FALSE) d == CurrentPlayDefinition97(s.imminent) technique == CallerSingleTechniqueFixture911(d,"Specimen0185",s.plan.steps) terminal == CallerTerminalFixture911(technique,s.entry,s.world.objects,12514) afterCohort == PlayAdvanceDisposition97([s.imminent EXCEPT !.ability=terminal.runtime.ability],"Resolved",terminal.runtime.id) IN [s |-> s,technique |-> technique,terminal |-> terminal,afterCohort |-> afterCohort] CallerPlayValid911(f) == /\ ProcessStartValid99(f.s) /\ CompiledInstructionTechnique911(f.technique,f.s.world.objects,CardFacts9) /\ CallerTerminalValid911(f.terminal) /\ ReturnPlayRuntime911(f.terminal.runtime,f.terminal.returned,f.s.imminent,f.afterCohort,f.s.f,<>,f.terminal.lifetimes,f.terminal.authority) CallerPlayReturnChecks911 == LET f == CallerPlayFixture911 IN /\ CallerPlayValid911(f) /\ ~f.terminal.runtime.ability.detached /\ f.afterCohort.dispositions[9930]=[disposition |-> "Resolved",instance |-> 9940] /\ f.afterCohort.phase="Complete" /\ f.afterCohort.cursor=2 /\ f.afterCohort.id=0 /\ f.terminal.returned.ability.returned /\ f.terminal.returned.ability.caller=9700 /\ ~ReturnPlayRuntime911(f.terminal.runtime,f.terminal.returned,f.s.imminent, [f.afterCohort EXCEPT !.dispositions[9930].disposition="Prevented"],f.s.f,<>,f.terminal.lifetimes,f.terminal.authority) /\ ~ReturnPlayRuntime911(f.terminal.runtime,f.terminal.returned,[f.s.imminent EXCEPT !.source=ObjectAbilitySource9(2)], f.afterCohort,f.s.f,<>,f.terminal.lifetimes,f.terminal.authority) CallerMidItemInspectionFixture911 == LET d == PaidDefinitionFixture95("Imp","Specimen0115",<<"ItemInspection","OncePerTurn">>,<<[kind |-> "HostedCluster",amount |-> 1]>>) objects == [id \in {1,2,3} |-> CASE id=1 -> CardObject9("Specimen0115","Play",TRUE,"Up") [] id=2 -> CardObject9("Specimen0148","Play",TRUE,"Down") [] OTHER -> PaidCounterFixture95("SchemaAtom180",1)] c == [PaidContextFixture95(d,objects,TurnFixture92("SideB")) EXCEPT !.traversal=TraversalFixture92("ProcedureCoded75d879e00ff"),!.traversalControl=PaidTraversalControlFixture95(TraversalFixture92("ProcedureCoded75d879e00ff"))] itemInspection == [OpenItemInspection7(300,2,objects[2],2,40,"siteInspection",{}) EXCEPT !.step="ProcedureCode1dd0e8f05be2",!.active=TRUE,!.beginMet=TRUE] window == ReadyFixture92(WindowFixture92(12521,"MidItemInspection",ItemInspectionPrioritySite9(c.turn,itemInspection,objects),Empty9,0,NoTimingRef9)) option == [PaidOptionFixture95(d,window) EXCEPT !.target=2] busy == StartedFixture92(window,option) p == OpenPaidProcedure95(12522,d,option,window,LegalityFixture92(window,option).transactionId,"Play") paidObjects == [id \in {1,2} |-> objects[id]] paid == PaidCommittedFixture95(p,Empty9,FALSE) used == [itemInspection EXCEPT !.midUsed=TRUE,!.midResolving=TRUE] movedObjects == [id \in {1,12} |-> IF id=1 THEN objects[1] ELSE CardObject9("Specimen0148","SideADiscard",FALSE,"Up")] ended == [used EXCEPT !.active=FALSE,!.complete=TRUE,!.step="Complete",!.completionReason="Moved"] afterItemInspection == [ended EXCEPT !.midResolving=FALSE,!.midDone=TRUE] planning == PaidTargetsFrame95(paid,12523) plan == OpenInstruction93(700,"Ability",p.id,p.ability.source,"Play",1,"NoValue",<<"RetireItemInspectionedCard">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] imminent == PaidImminentFrame95(planning) technique == CallerSingleTechniqueFixture911(d,"Specimen0115",plan.steps) terminal == CallerTerminalFixture911(technique,[kind |-> "Paid",after |-> imminent],movedObjects,12524) finalProcedure == [imminent EXCEPT !.ability=terminal.runtime.ability,!.phase="Complete",!.checkpoint=12524] afterProcedure == [finalProcedure EXCEPT !.ability.returned=TRUE,!.phase="Returned"] afterStack == <> receipt == PaidReturnFixture95(busy,12524) IN [d |-> d,objects |-> objects,c |-> c,itemInspection |-> itemInspection,window |-> window,option |-> option,busy |-> busy,p |-> p, paidObjects |-> paidObjects,paid |-> paid,used |-> used,movedObjects |-> movedObjects,ended |-> ended,afterItemInspection |-> afterItemInspection, planning |-> planning,plan |-> plan,imminentPlan |-> imminentPlan,imminent |-> imminent,technique |-> technique,terminal |-> terminal, finalProcedure |-> finalProcedure,afterProcedure |-> afterProcedure,afterStack |-> afterStack,receipt |-> receipt] CallerMidItemInspectionValid911(f) == LET mid == MidOption7("Imp",TRUE,TRUE,TRUE) basic == MidOption7("BasicRetire",TRUE,TRUE,TRUE) begin == [tag |-> "MidItemInspectionBeginDrained",itemInspectionId |-> f.itemInspection.id,windowId |-> f.window.id,checkpointId |-> f.window.checkpoint,complete |-> TRUE] IN /\ ReservePaidMidItemInspection95(<>,<>,f.p,12522,f.d,f.c,f.option,LegalityFixture92(f.window,f.option),{},f.itemInspection,f.itemInspection,mid,{mid,basic},TRUE,FALSE) /\ PayPaidMidItemInspection95(<>,f.p,f.paid,f.objects,f.paidObjects,Empty9,Empty9,Empty9,DOMAIN f.objects, PaidPaymentFixture95(f.p,f.objects,f.paidObjects,1,FALSE,FALSE),Empty9,PaidUsesFixture95(f.p),Empty9,PaidTurnUsesFixture95(f.p),1,{PaidUseFixture95(f.p)}, f.itemInspection,f.used,mid,{mid,basic},TRUE,FALSE,begin,{}) /\ ItemInspectionMovementOutcome7(f.used,f.ended,f.movedObjects,TRUE,{ItemInspectionEndEvent7(f.used)}) /\ PaidCheckpoint95(<>,f.paid,f.planning,f.movedObjects,Empty9,PaidCheckpointFixture95(f.paid,12523)) /\ EnterPaidInstruction95(<>,f.planning,f.imminent,f.plan,f.imminentPlan,[InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}],PaidEntryFixture95(f.plan,12523)) /\ CompiledInstructionTechnique911(f.technique,f.objects,CardFacts9) /\ CallerTerminalValid911(f.terminal) /\ ReturnMidItemInspectionRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,f.ended,f.afterItemInspection,f.terminal.lifetimes,f.terminal.authority) CallerMidItemInspectionReturnChecks911 == LET f == CallerMidItemInspectionFixture911 IN /\ CallerMidItemInspectionValid911(f) /\ f.ended.midResolving /\ f.ended.complete /\ f.afterItemInspection.midUsed /\ f.afterItemInspection.midDone /\ ~f.afterItemInspection.midResolving /\ ~f.afterStack[1].open /\ f.terminal.returned.ability.returned /\ ~ReturnPaidRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,f.terminal.lifetimes,f.terminal.authority) /\ ~ReturnMidItemInspectionRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,[f.ended EXCEPT !.id=301],f.afterItemInspection,f.terminal.lifetimes,f.terminal.authority) /\ ~ReturnMidItemInspectionRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,f.ended,[f.afterItemInspection EXCEPT !.midResolving=TRUE],f.terminal.lifetimes,f.terminal.authority) CallerNestedFixture911 == LET b == SubStartFixture98("Specimen0267",<<"ResolveDonor">>,<<>>) donorDefinitions == [id \in {401,402} |-> OrderPrintedSubFixture98(id,4,IF id=401 THEN "Damage1" ELSE "GainResourceUnit")] donorState == NewBarrierInstructionOrder98(4,<<401,402>>,donorDefinitions,[id \in {401,402} |-> IF id=401 THEN "Damage1" ELSE "GainResourceUnit"]) objects == [id \in DOMAIN b.objects \cup {4} |-> IF id=4 THEN CardObject9("Specimen0245","Play",TRUE,"Up") ELSE b.objects[id]] definitions == ReplacementOverlay99(b.definitions,donorDefinitions) s == [b EXCEPT !.objects=objects,!.definitions=definitions,!.activity=SubActivityFixture98(b.e,objects,definitions)] parent == SubSingleFixture98(s,s.p,s.selected,"ResolveDonor",SubSeedFixture98(objects),2) parentRef == InstructionWindowRef93(parent.resolvingPlan) effect == [tag |-> "ExplicitResolveBarrierInstruction",id |-> 12601,step |-> 1,instruction |-> parentRef,barrierCard |-> 4,barrierInstruction |-> 401, encounter |-> 20,structure |-> TimingRef9("TraversalPhase",20),authorized |-> TRUE, sourceCard |-> "Specimen0267",sourceSHA |-> CardFacts9["Specimen0267"].sourceSHA,selector |-> "AnotherItemActivatedBarrier",currentSubtypes |-> {}, origin |-> [tag |-> "FixedAbilitySourceObservation",source |-> ObjectAbilitySource9(2),card |-> "Specimen0267",sourceSHA |-> CardFacts9["Specimen0267"].sourceSHA]] base == NewBarrierInstructionBarrierInstruction98(12602,401,donorDefinitions[401],[id |-> 20,barrierCard |-> 4],SubOwnerFixture98,"Play") child == [base EXCEPT !.origin="Instruction",!.caller=parent.resolvingPlan.id,!.ability.caller=parent.resolvingPlan.id,!.invocation=effect] calls == [id \in {12601} |-> [instruction |-> parentRef,instance |-> 12602,status |-> "Active",source |-> ObjectAbilitySource9(4),encounter |-> 20,barrierInstruction |-> 401,disposition |-> "NoValue"]] cleared == [child EXCEPT !.phase="FirstTargets"] plan == OpenInstruction93(2003,"Ability",12602,ObjectAbilitySource9(4),"Play",1,"NoValue",<<"Damage1FromSpecimen0245">>,FALSE) imPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] imminent == [cleared EXCEPT !.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE,!.phase="Imminent"] technique == CallerSingleTechniqueFixture911(child.payload,"Specimen0245",plan.steps) terminal == CallerTerminalFixture911(technique,[kind |-> "NestedBarrierInstructionFirst",after |-> imminent],objects,12604) afterCalls == [calls EXCEPT ![12601].status="Returned",![12601].disposition="Resolved"] receipt == [tag |-> "NestedBarrierInstructionReturn",instruction |-> parentRef,invocation |-> 12601,instance |-> 12602, source |-> ObjectAbilitySource9(4),barrierInstruction |-> 401,complete |-> TRUE,disposition |-> "Resolved",finalCheckpoint |-> 12604] IN [s |-> s,parent |-> parent,donorState |-> donorState,objects |-> objects,definitions |-> definitions,effect |-> effect, child |-> child,calls |-> calls,cleared |-> cleared,plan |-> plan,imPlan |-> imPlan,imminent |-> imminent,technique |-> technique, terminal |-> terminal,afterCalls |-> afterCalls,receipt |-> receipt] CallerNestedValid911(f) == /\ SubStartValid98(f.s) /\ NoBarrierInstructionInterrupt98(f.s.p,f.parent.cleared,<<>>,SubNoModifiersFixture98(f.s.p),SubClearanceFixture98(f.s.p,0,0)) /\ EnterFirstBarrierInstructionInstruction98(f.parent.cleared,f.parent.imminent,f.s.e,f.s.control,f.s.state,f.objects,DOMAIN f.definitions,f.s.activity, [player \in SetupPlayers |-> 0],<<>>,f.parent.plan,f.parent.imminentPlan,[InstructionTargetsFixture93(f.parent.plan) EXCEPT !.targets={}],InstructionEntryFixture93(f.parent.plan)) /\ ResolveBarrierInstructionWithoutInterrupt98(f.parent.imminent,f.parent.resolving,<<>>,f.parent.imminentPlan,f.parent.resolvingPlan, NoModifiersFixture95(f.parent.imminentPlan),InstructionClearanceFixture93(f.parent.imminentPlan,0,0)) /\ EnterInstructionBarrierInstruction98(Empty9,f.calls,f.child,f.parent.resolvingPlan,f.parent.resolving.ability,"NoValue",f.effect,f.donorState, 12602,{8000},SubOwnerFixture98,<<>>,f.objects,DOMAIN f.definitions,f.s.activity,[player \in SetupPlayers |-> 0],CardFacts9) /\ NoBarrierInstructionInterrupt98(f.child,f.cleared,<<>>,SubNoModifiersFixture98(f.child),SubClearanceFixture98(f.child,0,0)) /\ EnterFirstInstructionBarrierInstruction98(f.cleared,f.imminent,f.parent.resolvingPlan,f.parent.resolving.ability,"NoValue",f.donorState,f.objects, DOMAIN f.definitions,f.s.activity,[player \in SetupPlayers |-> 0],<<>>,f.plan,f.imPlan,[InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}],InstructionEntryFixture93(f.plan)) /\ CompiledInstructionTechnique911(f.technique,f.objects,CardFacts9) /\ CallerTerminalValid911(f.terminal) /\ ReturnNestedBarrierInstructionRuntime911(f.terminal.runtime,f.terminal.returned,f.calls,f.afterCalls,f.parent.resolvingPlan, f.parent.resolving.ability,"NoValue",<<>>,f.receipt,f.terminal.lifetimes,f.terminal.authority) CallerNestedReturnChecks911 == LET f == CallerNestedFixture911 IN /\ CallerNestedValid911(f) /\ f.afterCalls[12601].source=ObjectAbilitySource9(4) /\ f.afterCalls[12601].encounter=20 /\ f.afterCalls[12601].barrierInstruction=401 /\ f.afterCalls[12601].status="Returned" /\ f.afterCalls[12601].disposition="Resolved" /\ ResolvedBarrierInstructionCount98(f.s.selected,f.afterCalls,4,20)=1 /\ ResolvedBarrierInstructionCount98(f.s.selected,f.afterCalls,2,20)=0 /\ f.s.selected.current=8000 /\ f.s.selected.handled={} /\ f.terminal.returned.ability.source=ObjectAbilitySource9(4) /\ f.terminal.returned.ability.caller=f.parent.plan.id /\ f.terminal.returned.ability.returned /\ \A bad \in {[f.receipt EXCEPT !.source=ObjectAbilitySource9(2)],[f.receipt EXCEPT !.instance=12603], [f.receipt EXCEPT !.barrierInstruction=402],[f.receipt EXCEPT !.finalCheckpoint=12603]} : ~ReturnNestedBarrierInstructionRuntime911(f.terminal.runtime,f.terminal.returned,f.calls,f.afterCalls,f.parent.resolvingPlan, f.parent.resolving.ability,"NoValue",<<>>,bad,f.terminal.lifetimes,f.terminal.authority) /\ ~ReturnNestedBarrierInstructionRuntime911(f.terminal.runtime,f.terminal.returned,f.calls, [f.afterCalls EXCEPT ![12601].source=ObjectAbilitySource9(2)],f.parent.resolvingPlan,f.parent.resolving.ability,"NoValue",<<>>, f.receipt,f.terminal.lifetimes,f.terminal.authority) CallerNestedActiveHistoryChecks911 == LET f == CallerNestedFixture911 forgedCalls == [f.calls EXCEPT ![12601].source=ObjectAbilitySource9(2)] after == [forgedCalls EXCEPT ![12601].status="Returned",![12601].disposition="Resolved"] IN ~ReturnNestedBarrierInstructionRuntime911(f.terminal.runtime,f.terminal.returned,forgedCalls,after,f.parent.resolvingPlan, f.parent.resolving.ability,"NoValue",<<>>,f.receipt,f.terminal.lifetimes,f.terminal.authority) CallerPaidWorldAndRuntimeChecks911 == LET f == CallerPaidFixture911 wrongObjects == [f.objects EXCEPT ![1].face="Down"] notReturned == [f.terminal.returned EXCEPT !.ability.returned=FALSE] IN /\ SetAsideTrackingValid4(wrongObjects,Empty9) /\ ~ReturnPaidRuntime911(<>,f.afterStack,f.terminal.runtime,f.terminal.returned,f.afterProcedure,f.receipt, wrongObjects,Empty9,f.terminal.lifetimes,f.terminal.authority) /\ ~ReturnPaidRuntime911(<>,f.afterStack,f.terminal.runtime,notReturned,f.afterProcedure,f.receipt, f.objects,Empty9,f.terminal.lifetimes,f.terminal.authority) CallerPlayCapturedCohortChecks911 == LET f == CallerPlayFixture911 cohort == [f.s.imminent EXCEPT !.usedInstances={}] after == PlayAdvanceDisposition97([cohort EXCEPT !.ability=f.terminal.runtime.ability],"Resolved",f.terminal.runtime.id) IN /\ PlayOwnerAtTop97(cohort,f.s.f,<>) /\ CurrentPlayDefinition97(cohort)=f.technique.definition /\ ~ReturnPlayRuntime911(f.terminal.runtime,f.terminal.returned,cohort,after,f.s.f,<>,f.terminal.lifetimes,f.terminal.authority) SourceRuntimeSnapshotFixture911(template,ledger,world) == [SnapshotWithConditionalRegistry96(template,ledger) EXCEPT !.id=world.id,!.objects=world.objects, !.present=world.present,!.points=world.points,!.activity=[world.activity EXCEPT !.instances=ConditionalActivityRows96(ledger.instances)], !.activationEpoch=ConditionalEpochMap96(ledger,template.definitions),!.activationSerial=ledger.activationSerial] SourceRuntimeReturnFixture911(r,plan,context,origin,world,ledger,registry,authority,template,nextId) == LET next == r.technique.nodes[r.pc].next projected == RuntimeFinishFrame911(r,next) completed == IF next=0 THEN [projected EXCEPT !.phase="Complete",!.lastFinished=TRUE,!.complete=TRUE] ELSE [projected EXCEPT !.phase="Between"] afterPlan == [plan EXCEPT !.cursor=Len(plan.steps)+1,!.completedSteps=plan.steps,!.phase="Complete"] actualReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> world.id,effects |-> context.actualEffects,complete |-> TRUE,childrenReturned |-> TRUE] step == [tag |-> "InstructionStepReturn",instruction |-> plan.id,index |-> plan.cursor,step |-> plan.steps[plan.cursor], complete |-> TRUE,expectedReturn |-> actualReturn] boundary == GraphInstructionBoundary911(r,context,{"InstructionEnd"},0) after == [r EXCEPT !.ability=completed,!.visited=Append(@,r.pc),!.pc=next,!.phase="Checkpoint",!.checkpoint=0,!.boundary=boundary] nextWorld == [authority.current EXCEPT !.id=nextId,!.finishedInstances=@ \cup (IF next=0 THEN {r.id} ELSE {}), !.activity.instances[r.id]=ReplacementOverlay99(@,[ability |-> r.technique.definition.syntax.id,sourceObject |-> r.ability.source.object, status |-> IF next=0 THEN "Complete" ELSE "Resolving",owner |-> RuntimeLookOwner911(after)])] execution == [tag |-> "ActualObjectTransition",id |-> context.id,snapshotId |-> nextId,source |-> r.ability.source, instruction |-> context.currentRef,return |-> actualReturn] afterAuthority == LifetimeAuthorityAfter910(authority,LifetimeKernelTransition910(authority.current,nextWorld,execution)) afterRegistry == [registry EXCEPT !.effects=ObserveLingeringEffects910(@,nextWorld),!.frontier=LifetimeFrontier910(afterAuthority,Len(afterAuthority.order))] beforeSnapshot == SourceRuntimeSnapshotFixture911(template,ledger,authority.current) afterSnapshot == SourceRuntimeSnapshotFixture911(template,ledger,nextWorld) afterOrigin == [origin EXCEPT !.plan=afterPlan,!.parent=after.ability] afterContext == [context EXCEPT !.phase="Returned"] IN [r |-> r,plan |-> plan,context |-> context,origin |-> origin,world |-> world,ledger |-> ledger,registry |-> registry, authority |-> authority,after |-> after,afterPlan |-> afterPlan,actualReturn |-> actualReturn,step |-> step,boundary |-> boundary, nextWorld |-> nextWorld,execution |-> execution,afterAuthority |-> afterAuthority,afterRegistry |-> afterRegistry, beforeSnapshot |-> beforeSnapshot,afterSnapshot |-> afterSnapshot,afterOrigin |-> afterOrigin,afterContext |-> afterContext] SourceRuntimeReturnValid911(q) == FinishObservedSourceRuntime911(q.registry,q.afterRegistry,q.ledger,q.ledger,<<>>,<<>>,q.r,q.after,q.plan,q.afterPlan, q.context,q.afterContext,q.origin,q.afterOrigin,q.world,q.actualReturn,q.step,NoInstructionControl911,[tag |-> "NoInstructionPayment"], q.boundary,q.beforeSnapshot,q.afterSnapshot,q.authority,q.afterAuthority) SourceRuntimeCheckpointFixture911(q,id) == LET current == [q.afterSnapshot EXCEPT !.checkpointId=id,!.point="ProcedureCodee605a78f5d5e"] begin == [current EXCEPT !.id=10000+id,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(q.ledger,id,begin,current,Empty9) EXCEPT !.caller=GraphBoundaryCaller911(q.boundary)] ledger == ConditionalCommittedFixture96(q.ledger,current.definitions,cp,Empty9,Empty9,Empty9) receipt == [tag |-> "GraphInstructionCheckpoint",id |-> id,instance |-> q.after.id,source |-> q.after.ability.source, boundary |-> q.boundary,complete |-> TRUE,allNewerChainsComplete |-> TRUE] ready == [q.after EXCEPT !.phase=IF q.after.pc=0 THEN "Complete" ELSE "Targets",!.checkpoint=id] IN [q |-> q,cp |-> cp,ledger |-> ledger,receipt |-> receipt,ready |-> ready] SourceRuntimeCheckpointValid911(c) == /\ ProcessConditionalCheckpoint96(c.q.ledger,c.ledger,<<>>,<<>>,c.cp.processingSnapshot.definitions,c.cp, ConditionalConditionsFixture96(c.cp.processingSnapshot.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{}) /\ CompleteObservedRuntimeCheckpoint911(c.q.after,c.ready,c.ledger,<<>>,c.receipt,c.q.afterRegistry,c.q.afterAuthority) SourceSpecimen0015FirstReturnFixture911 == LET f == SourceSpecimen0015AdoptionFixture911 snapshot == SourceRuntimeSnapshotFixture911(f.s.world.conditional,f.s.ledger,f.observed.authority.current) world == [f.world EXCEPT !.id=2,!.conditional=snapshot] IN SourceRuntimeReturnFixture911(f.resolving,f.resolvingPlan,f.observedContext,f.atomicOrigin,world,f.s.ledger, f.lifetimes,f.observed.authority,snapshot,3) SourceSpecimen0015NextFixture911 == LET first == SourceSpecimen0015FirstReturnFixture911 c == SourceRuntimeCheckpointFixture911(first,1) r == c.ready node == r.technique.nodes[r.pc] plan == OpenInstruction93(r.pc,"Ability",r.id,r.ability.source,r.ability.sourceZone,2,"NoValue",node.steps,TRUE) targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={}] afterPlan == [plan EXCEPT !.announced=TRUE,!.targets={},!.phase="Imminent"] receipt == ReplacementOverlay99(InstructionEntryFixture93(plan),[checkpointId |-> 1]) imminent == [r EXCEPT !.ability.phase="Imminent",!.ability.cursor=@+1,!.phase="Imminent",!.checkpoint=0] entry == [tag |-> "ActualGraphInstructionEntry",id |-> 9010,snapshotId |-> 3,kind |-> "SourceNext",before |-> r,after |-> imminent, beforePlan |-> plan,afterPlan |-> afterPlan,targets |-> targets,receipt |-> receipt,ledger |-> c.ledger, stackBefore |-> <<>>,stackAfter |-> <<>>,owner |-> r.sourceOwner] origin == [kind |-> "Instruction",plan |-> afterPlan,parent |-> imminent.ability,ruleStep |-> "NoValue"] world == [first.world EXCEPT !.id=3,!.conditional=c.cp.processingSnapshot,!.entries=ReplacementOverlay99(@,[id \in {9010} |-> entry])] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> r.ability.source, snapshotId |-> 3,effects |-> Empty9,order |-> <<>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> 3,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(9011,9010,origin,world,description,Empty9,r.sourceOwner) observation == InitialWouldObservation99(context,9012) f == SourceSpecimen0015AdoptionFixture911 beforeExpected == [f.expected EXCEPT !.contexts[8961]=first.afterContext] expected == [beforeExpected EXCEPT !.entryIds=@ \cup {9010},!.usedContextIds=@ \cup {9011}, !.contexts=ReplacementOverlay99(@,[id \in {9011} |-> context])] history == InitialCaptureAfterFixture99(f.history,context,observation) prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=Empty9,!.openingRef=context.currentRef,!.windowId=9013,!.group=90] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=f.s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] resolvingPlan == [afterPlan EXCEPT !.phase="Resolving"] resolving == [imminent EXCEPT !.ability.phase="Resolving",!.phase="Resolve"] atomic == [cleared EXCEPT !.phase="Resolving",!.actualEffects=Empty9] atomicOrigin == [origin EXCEPT !.plan=resolvingPlan,!.parent=resolving.ability] observed == Specimen0015OwnerObservationFixture911(first.afterAuthority,RuntimeLookOwner911(resolving),4) lifetimes == [first.afterRegistry EXCEPT !.frontier=LifetimeFrontier910(observed.authority,Len(observed.authority.order))] observedContext == [atomic EXCEPT !.currentWorld=4] IN [first |-> first,c |-> c,r |-> r,plan |-> plan,targets |-> targets,afterPlan |-> afterPlan,receipt |-> receipt,imminent |-> imminent, entry |-> entry,origin |-> origin,world |-> world,description |-> description,projection |-> projection,context |-> context, observation |-> observation,beforeExpected |-> beforeExpected,expected |-> expected,history |-> history,prepared |-> prepared, noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared,resolvingPlan |-> resolvingPlan,resolving |-> resolving, atomic |-> atomic,atomicOrigin |-> atomicOrigin,observed |-> observed,lifetimes |-> lifetimes,observedContext |-> observedContext] SourceSpecimen0015NextValid911(s) == /\ SourceSpecimen0015AdoptionValid911(SourceSpecimen0015AdoptionFixture911) /\ SourceRuntimeReturnValid911(s.first) /\ SourceRuntimeCheckpointValid911(s.c) /\ EnterNextSourceRuntime911(s.r,s.imminent,s.plan,s.afterPlan,s.targets,s.receipt,s.c.ledger,<<>>,s.first.afterRegistry,s.first.afterAuthority) /\ BeginRuntimeExpectedContext911(s.beforeExpected,s.expected,9011,s.origin,s.world,s.entry,s.description,s.projection,Empty9,s.r.sourceOwner, CardFacts9,SourceSpecimen0015AdoptionFixture911.history,s.history,s.observation,s.first.afterRegistry,s.first.afterAuthority) /\ PrepareOpeningInterrupts99(s.context,s.prepared,s.c.ledger,s.c.ledger,s.origin,s.world,s.history,9013,90,Empty9,{},CardFacts9) /\ NoPreparedInterrupt99(s.prepared,s.noWindow,s.origin,s.world,s.history,s.c.ledger,<<>>,SourceSpecimen0015AdoptionFixture911.s.site,CardFacts9) /\ ClearPreparedInstruction99(s.noWindow,s.cleared,s.origin,s.world,s.history,s.c.ledger,<<>>,<<>>,"NoModifiers",s.clearance,CardFacts9) /\ BeginSourceRuntimeAtomic911(s.imminent,s.resolving,s.afterPlan,s.resolvingPlan,s.cleared,s.origin,s.clearance,s.world,<<>>, s.first.afterRegistry,s.first.afterAuthority) /\ CommitLifetimeKernelCore910(s.first.afterAuthority,s.observed.authority,s.observed.world,s.observed.execution) /\ PublishNextLifetime910(s.first.afterRegistry,s.lifetimes,s.observed.authority) /\ ObserveResolvingLifetimeContext910(s.atomic,s.observedContext,s.lifetimes,s.observed.authority,s.atomicOrigin) SourceSpecimen0015FinalReturnFixture911 == LET s == SourceSpecimen0015NextFixture911 snapshot == SourceRuntimeSnapshotFixture911(s.world.conditional,s.c.ledger,s.observed.authority.current) world == [s.world EXCEPT !.id=4,!.conditional=snapshot] IN SourceRuntimeReturnFixture911(s.resolving,s.resolvingPlan,s.observedContext,s.atomicOrigin,world,s.c.ledger, s.lifetimes,s.observed.authority,snapshot,5) SourceSpecimen0015WholeReturnChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 s == SourceSpecimen0015NextFixture911 q == SourceSpecimen0015FinalReturnFixture911 c == SourceRuntimeCheckpointFixture911(q,2) caller == f.s.f.s loop == [caller.loop EXCEPT !.current=0,!.handled={101},!.resolved={101}, !.history= <<[barrierInstruction |-> 101,instance |-> 8000,disposition |-> "Resolved",source |-> ObjectAbilitySource9(2)]>>] encounter == [caller.e EXCEPT !.resolved={101}] returned == [c.ready EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN /\ SourceSpecimen0015NextValid911(s) /\ SourceRuntimeReturnValid911(q) /\ SourceRuntimeCheckpointValid911(c) /\ ReturnEncounterBarrierInstructionRuntime911(c.ready,returned,caller.loop,loop,caller.e,encounter,<<>>,q.afterRegistry,q.afterAuthority) /\ c.ready.visited= <<8100,8101>> /\ c.ready.ability.complete /\ c.ready.ability.lastFinished /\ c.ready.technique.definition=f.technique.definition /\ c.ready.ability.source=ObjectAbilitySource9(2) /\ q.context.actualEffects=Empty9 /\ s.targets.targets={} /\ loop.history[1].disposition="Resolved" /\ loop.history[1].source=ObjectAbilitySource9(2) SourceRuntimeReceiptVariant911(q,receipt) == LET execution == [q.execution EXCEPT !.return=receipt] authority == LifetimeAuthorityAfter910(q.authority,LifetimeKernelTransition910(q.authority.current,q.nextWorld,execution)) IN [q EXCEPT !.actualReturn=receipt,!.step.expectedReturn=receipt,!.execution=execution,!.afterAuthority=authority, !.afterRegistry.frontier=LifetimeFrontier910(authority,Len(authority.order))] SourceSpecimen0015ReturnReceiptChecks911 == LET q == SourceSpecimen0015FirstReturnFixture911 IN /\ SourceRuntimeReturnValid911(q) /\ \A receipt \in {[q.actualReturn EXCEPT !.complete=FALSE],[q.actualReturn EXCEPT !.childrenReturned=FALSE], [q.actualReturn EXCEPT !.effects=Empty9],[q.actualReturn EXCEPT !.contextId=9999], [q.actualReturn EXCEPT !.instruction.id=8101],[q.actualReturn EXCEPT !.snapshotId=1], [q.actualReturn EXCEPT !.tag="NotAnExpectedReturn"]} : ~SourceRuntimeReturnValid911(SourceRuntimeReceiptVariant911(q,receipt)) /\ ~SourceRuntimeReturnValid911([q EXCEPT !.context.currentWorld=1,!.afterContext.currentWorld=1]) SourceSpecimen0015HistoryChecks911 == LET q == SourceSpecimen0015FinalReturnFixture911 fakeChoice == [mode |-> "Selected",option |-> "NeverChosen",chooser |-> "SideB"] before == [q.r EXCEPT !.choices=[i \in {1} |-> fakeChoice]] after == [q.after EXCEPT !.choices=before.choices] world == [q.nextWorld EXCEPT !.activity.instances[8000].owner=RuntimeLookOwner911(after)] authority == LifetimeAuthorityAfter910(q.authority,LifetimeKernelTransition910(q.authority.current,world,q.execution)) bad == [q EXCEPT !.r=before,!.after=after,!.nextWorld=world,!.afterAuthority=authority, !.afterOrigin.parent=after.ability,!.afterRegistry.frontier=LifetimeFrontier910(authority,Len(authority.order))] IN /\ SourceRuntimeReturnValid911(q) /\ RuntimeProfile911(before) /\ SourceRuntimeBound911(before) /\ ~SourceRuntimeReturnValid911(bad) SourceSpecimen0015NextReceiptChecks911 == LET s == SourceSpecimen0015NextFixture911 IN /\ SourceSpecimen0015NextValid911(s) /\ ~EnterNextSourceRuntime911(s.r,s.imminent,s.plan,s.afterPlan,[s.targets EXCEPT !.valid=FALSE],s.receipt,s.c.ledger,<<>>, s.first.afterRegistry,s.first.afterAuthority) /\ ~EnterNextSourceRuntime911(s.r,s.imminent,s.plan,s.afterPlan,[s.targets EXCEPT !.source=ObjectAbilitySource9(1)],s.receipt,s.c.ledger,<<>>, s.first.afterRegistry,s.first.afterAuthority) /\ ~EnterNextSourceRuntime911(s.r,s.imminent,s.plan,s.afterPlan,[s.targets EXCEPT !.index=1],s.receipt,s.c.ledger,<<>>, s.first.afterRegistry,s.first.afterAuthority) /\ ~EnterNextSourceRuntime911(s.r,s.imminent,s.plan,s.afterPlan,s.targets,[s.receipt EXCEPT !.checkpointAndAllNewerChainsComplete=FALSE],s.c.ledger,<<>>, s.first.afterRegistry,s.first.afterAuthority) SourceSpecimen0015RuntimeGrantFixture911 == LET f == SourceSpecimen0015AdoptionFixture911 execution == [f.s.execution EXCEPT !.context=f.observedContext] p == RuntimeLookOwner911(f.resolving) grants == [id \in {9900} |-> ScopedLookGrant911(9900,p,f.resolvingPlan,f.s.f.s.objects,f.s.f.s.deck,execution)] IN [f |-> f,execution |-> execution,grants |-> grants] SourceSpecimen0015RuntimeVisibilityChecks911 == LET g == SourceSpecimen0015RuntimeGrantFixture911 q == SourceSpecimen0015FinalReturnFixture911 first == SourceSpecimen0015FirstReturnFixture911 currentOwner == q.afterAuthority.current.activity.instances[8000].owner betweenOwner == first.afterAuthority.current.activity.instances[8000].owner owners == [id \in {8000} |-> currentOwner] betweenOwners == [id \in {8000} |-> betweenOwner] noPermission == [tag |-> "CurrentScopedLookPermission",worldId |-> q.nextWorld.id,grantId |-> 9900,viewer |-> "SideA",object |-> 10,allowed |-> FALSE] duringPermission == [noPermission EXCEPT !.worldId=first.nextWorld.id,!.allowed=TRUE] IN /\ SourceSpecimen0015NextValid911(SourceSpecimen0015NextFixture911) /\ SourceRuntimeReturnValid911(q) /\ GrantRuntimeInstructionLook911(Empty9,g.grants,9900,g.f.resolving,g.f.resolvingPlan,g.f.s.f.s.objects,g.f.s.f.s.deck, g.execution,g.f.lifetimes,g.f.observed.authority) /\ ReadScopedLookPermission911(g.grants,9900,"SideA",10,betweenOwners,first.nextWorld.objects,first.afterRegistry,first.afterAuthority,duringPermission) /\ ReadScopedLookPermission911(g.grants,9900,"SideA",10,owners,q.nextWorld.objects,q.afterRegistry,q.afterAuthority,noPermission) /\ ~currentOwner.ability.returned /\ currentOwner.ability.lastFinished /\ ~ReadScopedLookPermission911(g.grants,9900,"SideA",10,betweenOwners,q.nextWorld.objects,q.afterRegistry,q.afterAuthority, [noPermission EXCEPT !.allowed=TRUE]) SourceSpecimen0015CallerProvenanceChecks911 == LET f == SourceSpecimen0015AdoptionFixture911 q == SourceSpecimen0015FinalReturnFixture911 c == SourceRuntimeCheckpointFixture911(q,2) caller == f.s.f.s fake == [c.ready EXCEPT !.sourceEntry.after.barrierInstruction=102] returned == [fake EXCEPT !.ability.returned=TRUE,!.phase="Returned"] wrongLoop == [caller.loop EXCEPT !.current=0,!.handled={102},!.resolved={102}, !.history= <<[barrierInstruction |-> 102,instance |-> 8000,disposition |-> "Resolved",source |-> ObjectAbilitySource9(2)]>>] wrongEncounter == [caller.e EXCEPT !.resolved={102}] IN /\ SourceSpecimen0015NextValid911(SourceSpecimen0015NextFixture911) /\ SourceRuntimeReturnValid911(q) /\ SourceRuntimeCheckpointValid911(c) /\ SourceRuntimeBound911(fake) /\ RuntimeProfile911(fake) /\ ~ReturnEncounterBarrierInstructionRuntime911(fake,returned,caller.loop,wrongLoop,caller.e,wrongEncounter,<<>>,q.afterRegistry,q.afterAuthority) NestedCostBoundaryFixture911(pay) == LET base == RootBranchInitial911 technique == [base.technique EXCEPT !.nodes=[id \in {11901,11902} |-> IF id=11901 THEN [base.technique.nodes[id] EXCEPT !.kind="NestedCost",!.options=[Pay |-> 11902,Decline |-> 0]] ELSE base.technique.nodes[id]], !.definition.instructions= <<11901,11902>>,!.definition.partsByInstruction=[id \in {11901,11902} |-> {1}]] r == [base EXCEPT !.technique=technique] old == RootBranchStepFixture911(base,"A",RootBranchWorld911) specification == [resourceUnits |-> 2,actionPoints |-> 0,other |-> <<>>] effects == [old.context.actualEffects EXCEPT ![1].kind="NestedCostChoice",![1].options={"Pay","Decline"}] actual == ReplacementOverlay99(effects,[i \in {1} |-> ReplacementOverlay99(effects[1],[cost |-> specification,payer |-> "SideA"])]) context == [old.context EXCEPT !.actualEffects=actual] returned == [old.returned EXCEPT !.effects=actual] control == [old.control EXCEPT !.actualEffects=actual,!.completion=returned,!.option=IF pay THEN "Pay" ELSE "Decline"] next == RuntimeNext911(r,control) projected == RuntimeFinishFrame911(r,next) completed == IF next=0 THEN [projected EXCEPT !.phase="Complete",!.lastFinished=TRUE,!.complete=TRUE] ELSE [projected EXCEPT !.phase="Between"] finance == [tag |-> "CompletedCostTransaction",id |-> 11980,instance |-> r.id,instruction |-> context.currentRef, source |-> r.ability.source,payer |-> "SideA",specification |-> specification,allCostsPaid |-> TRUE] payment == IF pay THEN [tag |-> "CompletedInstructionCost",id |-> 11980,transaction |-> 11980,instance |-> r.id, instruction |-> context.currentRef,source |-> r.ability.source,operation |-> 1,payer |-> "SideA",specification |-> specification, receipt |-> finance,paid |-> TRUE,lastAction |-> TRUE,completion |-> returned] ELSE [tag |-> "NoInstructionPayment"] boundary == GraphInstructionBoundary911(r,context,IF pay THEN {"InstructionEnd","CostPaid"} ELSE {"InstructionEnd"},IF pay THEN 11980 ELSE 0) after == [r EXCEPT !.ability=completed,!.visited=Append(@,r.pc),!.pc=next, !.choices=ReplacementOverlay99(@,[id \in {1} |-> control]),!.phase="Checkpoint",!.checkpoint=0,!.boundary=boundary] IN [r |-> r,plan |-> old.plan,afterPlan |-> old.afterPlan,context |-> context,returned |-> returned,control |-> control, step |-> [old.step EXCEPT !.expectedReturn=returned],payment |-> payment,boundary |-> boundary,after |-> after] NestedCostBoundaryValid911(s,payment,boundary) == FinishRuntimeInstruction911(s.r,[s.after EXCEPT !.boundary=boundary],s.plan,s.afterPlan,s.context,s.returned,s.step,s.control,payment,boundary) NestedCostCheckpointChecks911 == LET paid == NestedCostBoundaryFixture911(TRUE) declined == NestedCostBoundaryFixture911(FALSE) IN /\ NestedCostBoundaryValid911(paid,paid.payment,paid.boundary) /\ paid.after.pc=11902 /\ paid.after.phase="Checkpoint" /\ paid.boundary.causes={"InstructionEnd","CostPaid"} /\ paid.boundary.costTransaction=11980 /\ NestedCostBoundaryValid911(declined,declined.payment,declined.boundary) /\ declined.after.pc=0 /\ declined.boundary.causes={"InstructionEnd"} /\ declined.boundary.costTransaction=0 /\ ~NestedCostBoundaryValid911(paid,[tag |-> "NoInstructionPayment"], [paid.boundary EXCEPT !.causes={"InstructionEnd"},!.costTransaction=0]) NestedCostReceiptChecks911 == LET s == NestedCostBoundaryFixture911(TRUE) IN /\ \A field \in {"paid","lastAction"} : ~NestedCostBoundaryValid911(s,[s.payment EXCEPT ![field]=FALSE],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.allCostsPaid=FALSE],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.completion.snapshotId=999],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.id=11981],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.instance=11911],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.instruction.id=11902],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.source=ObjectAbilitySource9(2)],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.payer="SideB"],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.receipt.specification.resourceUnits=1],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.payer="SideB",!.receipt.payer="SideB"],s.boundary) /\ ~NestedCostBoundaryValid911(s,[s.payment EXCEPT !.specification.resourceUnits=1,!.receipt.specification.resourceUnits=1],s.boundary) NestedCostCoLocationChecks911 == LET s == NestedCostBoundaryFixture911(TRUE) IN /\ ~NestedCostBoundaryValid911(s,s.payment,[s.boundary EXCEPT !.causes={"InstructionEnd"}]) /\ ~NestedCostBoundaryValid911(s,s.payment,[s.boundary EXCEPT !.causes={"CostPaid"}]) /\ ~NestedCostBoundaryValid911(s,s.payment,[s.boundary EXCEPT !.costTransaction=11981]) /\ ~NestedCostBoundaryValid911(s,s.payment,[s.boundary EXCEPT !.instruction.id=11902]) /\ ~NestedCostBoundaryValid911(s,s.payment,[s.boundary EXCEPT !.source=ObjectAbilitySource9(2)]) NestedCostDeclineEffectChecks911 == LET s == NestedCostBoundaryFixture911(FALSE) r == [s.r EXCEPT !.technique.nodes[11901].options=[Pay |-> 0,Decline |-> 11902]] frame == RuntimeFinishFrame911(r,11902) after == [s.after EXCEPT !.technique=r.technique,!.pc=11902,!.ability=[frame EXCEPT !.phase="Between"]] IN /\ FinishRuntimeInstruction911(r,after,s.plan,s.afterPlan,s.context,s.returned,s.step,s.control,s.payment,s.boundary) /\ after.pc=11902 /\ ~after.ability.complete /\ s.boundary.causes={"InstructionEnd"} TimingStepEntryFixture911(structure) == LET s == StaticProjectionFixture99 entry == [s.entry EXCEPT !.sourceProcedure=structure] world == [s.world EXCEPT !.entries[entry.id]=entry,!.ruleInvocations[entry.ruleInvocation].structure=structure] context == NewExpectedContext99(4500,entry.id,s.origin,world,s.description,s.initial,entry.owner) observation == InitialWouldObservation99(context,4500) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,observation) registry == [NewExpectedRegistry99 EXCEPT !.entryIds={entry.id},!.usedContextIds={4500},!.contexts=[id \in {4500} |-> context]] lifetimeWorld == [LifetimeWorldFixture910 EXCEPT !.id=world.id,!.objects=world.objects,!.turn=world.turn,!.control=world.traversalControl] authority == NewLifetimeAuthority910(lifetimeWorld) lifetimes == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) IN [s |-> s,entry |-> entry,world |-> world,context |-> context,observation |-> observation,history |-> history, registry |-> registry,authority |-> authority,lifetimes |-> lifetimes] TimingStepEntryValid911(f) == BeginTimingStepExpected911(NewExpectedRegistry99,f.registry,4500,f.s.origin,f.world,f.entry,f.s.description,f.s.projection, f.s.initial,f.entry.owner,CardFacts9,NewWouldAccounting99,f.history,f.observation,f.lifetimes,f.authority) TimingStepKindChecks911 == /\ TimingStructureKinds9={"Turn","TurnPhase","SchemaAtom138","TraversalPhase","Inspection","ItemInspection"} /\ \A kind \in TimingStructureKinds9 : LET f == TimingStepEntryFixture911(TimingRef9(kind,4200)) IN /\ ProcedureStepIsInstruction911(kind) /\ TimingStepInvocation911(f.entry,f.world) /\ TimingStepEntryValid911(f) /\ InitialWouldCaptured99(f.context,f.history) /\ f.context.currentRef.origin="Rule" /\ f.context.currentRef.abilityInstance=0 /\ \A kind \in {"Deploy","EscalatingResourceContest","Checkpoint","Draw","Play"} : LET f == TimingStepEntryFixture911(TimingRef9(kind,4200)) IN /\ ~ProcedureStepIsInstruction911(kind) /\ ~TimingStepInvocation911(f.entry,f.world) /\ ~TimingStepEntryValid911(f) TimingStepProvenanceChecks911 == LET f == TimingStepEntryFixture911(TimingRef9("Turn",4200)) returned == [f.world EXCEPT !.ruleInvocations[f.entry.ruleInvocation].returned=TRUE] foreign == [f.world EXCEPT !.ruleInvocations[f.entry.ruleInvocation].step="DifferentStep"] IN /\ ~TimingStepInvocation911(f.entry,returned) /\ ~TimingStepInvocation911(f.entry,foreign) /\ ~BeginTimingStepExpected911(NewExpectedRegistry99,f.registry,4500,f.s.origin,f.world,f.entry,f.s.description,f.s.projection, f.s.initial,f.entry.owner,CardFacts9,NewWouldAccounting99,NewWouldAccounting99,f.observation,f.lifetimes,f.authority) /\ ~BeginTimingStepExpected911(NewExpectedRegistry99,f.registry,4500,f.s.origin,[f.world EXCEPT !.id=502],f.entry, f.s.description,f.s.projection,f.s.initial,f.entry.owner,CardFacts9,NewWouldAccounting99,f.history,f.observation,f.lifetimes,f.authority) LinkedTimingFixture911 == LET p == RootBranchTechnique911 linked == [p.definition EXCEPT !.syntax.id=11950,!.activity.id=11950] technique == [p EXCEPT !.units=ReplacementOverlay99(@,[id \in {5} |-> [category |-> "LinkedAbility",definition |-> linked]]),!.linked={5}] r == RootBranchStepFixture911(RootBranchInitial911,"A",RootBranchWorld911) context == [r.context EXCEPT !.actualEffects[1].kind="OpenTimingStructure"] started == [tag |-> "ActualTimingStructureStarted",structure |-> TimingRef9("SchemaAtom138",11960),parent |-> context.currentRef, source |-> technique.source,operation |-> 1] association == [tag |-> "LinkedTimingAbility",definition |-> ConditionalKey96(linked),source |-> technique.source, structure |-> started.structure,parentInstruction |-> context.currentRef,sourceUnit |-> 5] IN [technique |-> technique,linked |-> linked,context |-> context,started |-> started,association |-> association] LinkedAbilitySeparationChecks911 == LET s == LinkedTimingFixture911 IN /\ LinkedTimingAbility911(s.technique,5,s.linked,s.context,1,s.started,s.association) /\ s.linked.syntax.id#s.technique.definition.syntax.id /\ \A id \in DOMAIN s.technique.nodes : 5 \notin s.technique.nodes[id].segments /\ s.technique.definition=RootBranchTechnique911.definition /\ ~LinkedTimingAbility911(s.technique,5,s.linked,s.context,1,[s.started EXCEPT !.parent.id=11902],s.association) /\ ~LinkedTimingAbility911(s.technique,5,s.linked,s.context,1,[s.started EXCEPT !.source=ObjectAbilitySource9(2)],s.association) /\ ~LinkedTimingAbility911(s.technique,5,s.linked,s.context,1,[s.started EXCEPT !.operation=2],s.association) /\ ~LinkedTimingAbility911(s.technique,5,s.linked,[s.context EXCEPT !.actualEffects[1].kind="Plain"],1,s.started,s.association) /\ ~LinkedTimingAbility911(s.technique,5,s.linked,s.context,1,[s.started EXCEPT !.structure=TimingRef9("EscalatingResourceContest",11960)], [s.association EXCEPT !.structure=TimingRef9("EscalatingResourceContest",11960)]) /\ ~LinkedTimingAbility911([s.technique EXCEPT !.nodes[11902].segments={2,5}],5,s.linked,s.context,1,s.started,s.association) TimingStepStaleLifetimeChecks911 == LET f == TimingStepEntryFixture911(TimingRef9("Turn",4200)) old == [f.authority.current EXCEPT !.id=500] seed == NewLifetimeAuthority910(old) execution == [tag |-> "ActualObjectTransition",id |-> 91199,snapshotId |-> f.world.id,source |-> f.s.origin.plan.source] transition == LifetimeKernelTransition910(seed.current,f.authority.current,execution) authority == LifetimeAuthorityAfter910(seed,transition) stale == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) IN /\ AppendLifetimeTransitionCore910(seed,authority,transition) /\ ~BeginTimingStepExpected911(NewExpectedRegistry99,f.registry,4500,f.s.origin,f.world,f.entry,f.s.description,f.s.projection, f.s.initial,f.entry.owner,CardFacts9,NewWouldAccounting99,f.history,f.observation,stale,authority) GraphSpecimen0105EntryFixture911 == LET s == RelevanceOpeningFixture99("Specimen0105") cp1 == RelevanceCheckpointFixture99(s.prepared.ledger,1,s.objects,ConditionalPriorityCaller96(s.window)) ledger1 == ConditionalCommittedFixture96(s.prepared.ledger,RelevanceDefinitions99,cp1,Empty9,Empty9,Empty9) sideA == [ReadyFixture92(s.window) EXCEPT !.checkpoint=1] passed == PassPriorityFrame9(sideA) cp2 == RelevanceCheckpointFixture99(ledger1,2,s.objects,ConditionalPriorityCaller96(passed)) ledger2 == ConditionalCommittedFixture96(ledger1,RelevanceDefinitions99,cp2,Empty9,Empty9,Empty9) sideB == [ReadyFixture92(passed) EXCEPT !.checkpoint=2] parentWorld == RelevanceObserveWorld99(s.postWorld,ledger2) d == RelevanceSpecimen0105Definition99 key == ConditionalKey96(d) technique == [CallerSingleTechniqueFixture911(d,"NeutralValue00009",<<"DeploySourceFacedownInsteadOfRetire">>) EXCEPT !.lexemes=parentWorld.lexemes[key]] option == ConditionalOptionFixture92(sideB,5001) legality == LegalityFixture92(sideB,option) busy == StartedFixture92(sideB,option) before == OpenConditionalRuntime911(5001,technique,sideB,option,legality.transactionId,"Play") plan == OpenInstruction93(700,"Ability",5001,d.syntax.source,"Play",1,"NoValue",technique.nodes[700].steps,FALSE) targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={}] afterPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] imminent == [before EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [ledger2 EXCEPT !.instances[5001].status="Imminent"] receipt == ReplacementOverlay99(InstructionEntryFixture93(plan),[checkpointId |-> 2]) restrictions == [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9] entry == [tag |-> "ActualGraphInstructionEntry",id |-> 12701,snapshotId |-> parentWorld.id,kind |-> "ConditionalFirst", beforeLedger |-> ledger2,afterLedger |-> selected,stackBefore |-> <>,stackAfter |-> <>, before |-> before,after |-> imminent,snapshot |-> parentWorld.conditional,option |-> option,legality |-> legality, beforePlan |-> plan,afterPlan |-> afterPlan,targets |-> targets,receipt |-> receipt,turnUses |-> parentWorld.turnUses,restrictions |-> restrictions, parentContext |-> s.opened,parentOrigin |-> s.base.origin,parentWorld |-> parentWorld,parentHistory |-> s.history, owner |-> [windowId |-> sideB.id,option |-> option,transaction |-> legality.transactionId]] world == [RelevanceObserveWorld99(parentWorld,selected) EXCEPT !.entries=ReplacementOverlay99(@,[id \in {entry.id} |-> entry])] lifeWorld == [LifetimeWorldFixture910 EXCEPT !.id=world.id,!.objects=world.objects,!.turn=world.turn,!.control=world.traversalControl, !.points=world.conditional.points,!.present=world.conditional.present,!.activity=world.conditional.activity, !.activity.instances=[id \in {5001} |-> [ability |-> d.syntax.id,sourceObject |-> 3,status |-> "Imminent",owner |-> RuntimeLookOwner911(imminent)]], !.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}] authority == NewLifetimeAuthority910(lifeWorld) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) origin == [kind |-> "Instruction",plan |-> afterPlan,parent |-> imminent.ability,ruleStep |-> "NoValue"] effect == ReplacementOverlay99(ReplacementAtomFixture99(1,1,"DeployInstead",FALSE,0), [value |-> 1,actor |-> "SideB",baseController |-> "SideB",baseOrigin |-> d.syntax.source,targetSite |-> "NoValue"]) effects == [id \in {1} |-> effect] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> d.syntax.source, snapshotId |-> world.id,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> world.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(12702,entry.id,origin,world,description,effects,entry.owner) observation == InitialWouldObservation99(context,12703) history == InitialCaptureAfterFixture99(s.history,context,observation) expected == [s.registry EXCEPT !.entryIds=@ \cup {entry.id},!.usedContextIds=@ \cup {context.id}, !.contexts=ReplacementOverlay99(@,[id \in {context.id} |-> context])] IN [s |-> s,cp1 |-> cp1,ledger1 |-> ledger1,sideA |-> sideA,passed |-> passed,cp2 |-> cp2,ledger2 |-> ledger2,sideB |-> sideB, parentWorld |-> parentWorld,d |-> d,key |-> key,technique |-> technique,option |-> option,legality |-> legality,busy |-> busy, before |-> before,plan |-> plan,targets |-> targets,afterPlan |-> afterPlan,imminent |-> imminent,selected |-> selected, receipt |-> receipt,restrictions |-> restrictions,entry |-> entry,world |-> world,lifeWorld |-> lifeWorld,authority |-> authority,lifetimes |-> lifetimes, origin |-> origin,effects |-> effects,description |-> description,projection |-> projection,context |-> context, observation |-> observation,history |-> history,expected |-> expected] GraphSpecimen0105EntryValid911(f) == /\ RelevanceOpeningValid99(f.s) /\ f.s.opened.conditionalIds={5001} /\ RelevanceCheckpointValid99(f.s.prepared.ledger,f.ledger1,<>,f.cp1) /\ CheckpointPriorityWithConditionals96(f.ledger1,<>,<>,[CheckpointFixture92(f.s.window) EXCEPT !.id=1]) /\ PassCurrentInterrupt99(f.ledger1,f.ledger1,f.ledger1,<>,<>,"SideA",f.s.opened,f.s.base.origin,f.s.postWorld,f.s.history, f.s.postWorld.conditional,RelevanceSnapshot99(610,1,"AfterSideAPass",f.s.objects,f.ledger1),CardFacts9) /\ RelevanceCheckpointValid99(f.ledger1,f.ledger2,<>,f.cp2) /\ CheckpointPriorityWithConditionals96(f.ledger2,<>,<>,[CheckpointFixture92(f.passed) EXCEPT !.id=2]) /\ CurrentInterruptWorld99(f.parentWorld,f.ledger2,CardFacts9) /\ CurrentPendingRelevant99(f.s.opened,f.parentWorld,f.s.history,f.ledger2)={5001} /\ CompiledInstructionTechnique911(f.technique,f.world.objects,CardFacts9) /\ BeginInterruptRuntime911(f.ledger2,f.selected,<>,<>,f.before,f.imminent,f.parentWorld.conditional,f.option,f.legality, f.plan,f.afterPlan,f.targets,f.receipt,f.parentWorld.turnUses,f.restrictions,f.lifetimes,f.authority, f.s.opened,f.s.base.origin,f.parentWorld,f.s.history,CardFacts9) /\ ActualRuntimeEntry911(f.entry,f.origin,f.world,f.lifetimes,f.authority,CardFacts9) /\ BeginRuntimeExpectedContext911(f.s.registry,f.expected,f.context.id,f.origin,f.world,f.entry,f.description,f.projection,f.effects, f.entry.owner,CardFacts9,f.s.history,f.history,f.observation,f.lifetimes,f.authority) GraphSpecimen0105EntryChecks911 == LET f == GraphSpecimen0105EntryFixture911 IN /\ GraphSpecimen0105EntryValid911(f) /\ f.imminent.ability.detached /\ f.imminent.ability.firstImminent /\ f.technique.source=ObjectAbilitySource9(3) /\ f.technique.card="NeutralValue00009" /\ f.technique.sourceSHA=CardFacts9["NeutralValue00009"].sourceSHA /\ f.expected.entryIds=f.s.registry.entryIds \cup {12701} /\ InitialWouldCaptured99(f.context,f.history) /\ InitialWouldCaptured99(f.s.before,f.history) /\ f.context.initialWorld=f.world.id /\ f.context.initialRef.abilityInstance=5001 GraphSpecimen0105ParentVariant911(f,variant) == LET changed == CASE variant="Id" -> [f.parentWorld EXCEPT !.id=500,!.conditional.id=500] [] variant="Turn" -> [f.parentWorld EXCEPT !.turn.begunCounts["SideA"]=@+1] [] variant="Points" -> [f.parentWorld EXCEPT !.conditional.points["SideA"]=@+1] [] variant="TurnUses" -> [f.parentWorld EXCEPT !.turnUses=[id \in {12799} |-> [turnId |-> 1,ability |-> 9199,source |-> ObjectAbilitySource9(5),useId |-> 12799]]] [] OTHER -> f.parentWorld world == [changed EXCEPT !.paidContexts=[key \in DOMAIN @ |-> [@[key] EXCEPT !.turn=changed.turn, !.points=changed.conditional.points,!.uses=changed.turnUses]]] context == [f.s.opened EXCEPT !.currentWorld=world.id,!.state.effects=IF variant="Irrelevant" THEN Empty9 ELSE @] receipt == RuleWouldReceiptFixture99(12790,context,world,IF variant="Irrelevant" THEN <<>> ELSE <<1>>) history == RuleWouldAfterFixture99(f.s.history,context,world,IF variant="Irrelevant" THEN <<>> ELSE <<1>>,receipt) entry == [f.entry EXCEPT !.snapshot=world.conditional,!.turnUses=world.turnUses,!.parentContext=context, !.parentWorld=world,!.parentHistory=history] actualWorld == [f.world EXCEPT !.entries[entry.id]=entry] IN [world |-> world,context |-> context,receipt |-> receipt,history |-> history,entry |-> entry,actualWorld |-> actualWorld] GraphSpecimen0105ParentVariantValid911(f,v) == /\ CurrentInterruptWorld99(v.world,f.ledger2,CardFacts9) /\ ExpectedContextOrigin99(v.context,f.s.base.origin) /\ ExpectedContextWorld99(v.context,v.world) /\ ObserveCurrentExpectedWould99(f.s.history,v.history,v.context,f.s.base.origin,v.world, IF DOMAIN v.context.state.effects={} THEN <<>> ELSE <<1>>,v.receipt) /\ WouldViewCurrent99(v.history,v.context,v.world) /\ CurrentInterruptWindow99(v.context,<>) GraphSpecimen0105ParentTurnChecks911 == LET f == GraphSpecimen0105EntryFixture911 v == GraphSpecimen0105ParentVariant911(f,"Turn") IN /\ GraphSpecimen0105ParentVariantValid911(f,v) /\ v.world.turn#f.world.turn /\ CurrentPendingRelevant99(v.context,v.world,v.history,f.ledger2)={5001} /\ ~ActualRuntimeEntry911(v.entry,f.origin,v.actualWorld,f.lifetimes,f.authority,CardFacts9) GraphSpecimen0105ParentIdChecks911 == LET f == GraphSpecimen0105EntryFixture911 v == GraphSpecimen0105ParentVariant911(f,"Id") IN /\ GraphSpecimen0105ParentVariantValid911(f,v) /\ v.world.id#f.world.id /\ CurrentPendingRelevant99(v.context,v.world,v.history,f.ledger2)={5001} /\ ~ActualRuntimeEntry911(v.entry,f.origin,v.actualWorld,f.lifetimes,f.authority,CardFacts9) GraphSpecimen0105ParentConditionalChecks911 == LET f == GraphSpecimen0105EntryFixture911 v == GraphSpecimen0105ParentVariant911(f,"Points") IN /\ GraphSpecimen0105ParentVariantValid911(f,v) /\ v.world.conditional.points#f.world.conditional.points /\ CurrentPendingRelevant99(v.context,v.world,v.history,f.ledger2)={5001} /\ ~ActualRuntimeEntry911(v.entry,f.origin,v.actualWorld,f.lifetimes,f.authority,CardFacts9) GraphSpecimen0105ParentTurnUsesChecks911 == LET f == GraphSpecimen0105EntryFixture911 v == GraphSpecimen0105ParentVariant911(f,"TurnUses") IN /\ GraphSpecimen0105ParentVariantValid911(f,v) /\ v.world.turnUses#f.world.turnUses /\ CurrentPendingRelevant99(v.context,v.world,v.history,f.ledger2)={5001} /\ ~ActualRuntimeEntry911(v.entry,f.origin,v.actualWorld,f.lifetimes,f.authority,CardFacts9) GraphSpecimen0105CurrentRelevanceChecks911 == LET f == GraphSpecimen0105EntryFixture911 v == GraphSpecimen0105ParentVariant911(f,"Irrelevant") IN /\ GraphSpecimen0105ParentVariantValid911(f,v) /\ f.sideB.pending={5001} /\ v.context.openingMembers=f.s.opened.openingMembers /\ CurrentPendingRelevant99(v.context,v.world,v.history,f.ledger2)={} /\ ~BeginInterruptRuntime911(f.ledger2,f.selected,<>,<>,f.before,f.imminent,v.world.conditional,f.option,f.legality, f.plan,f.afterPlan,f.targets,f.receipt,v.world.turnUses,f.restrictions,f.lifetimes,f.authority, v.context,f.s.base.origin,v.world,v.history,CardFacts9) /\ ~ActualRuntimeEntry911(v.entry,f.origin,v.actualWorld,f.lifetimes,f.authority,CardFacts9) LifetimeTechniqueFixture911(d,nodes,entry) == [tag |-> "NormalizedInstructionTechnique",source |-> d.syntax.source,ability |-> d.syntax.id,definition |-> d, nodes |-> nodes,entry |-> entry,units |-> [i \in {1} |-> [category |-> "Trait"]],nonoperative |-> {},linked |-> {},originalUnits |-> d.syntax.units] LifetimeUseDefinitionFixture911(optionalAbility,hasOptionalPart,once) == LET raw == ConditionalDefinitionFixture96(12800,"Specimen0007","Trigger","TurnBegins","SchemaAtom016","SideB","SideB") IN [raw EXCEPT !.syntax.units=IF once THEN <> \o @ ELSE @, !.effectChoices=IF optionalAbility THEN {{},{1}} ELSE {{1}},!.optionalParts=IF hasOptionalPart THEN {1} ELSE {}] LifetimeUseFixture911(optionalAbility,hasOptionalPart,once,turnId) == LET d == LifetimeUseDefinitionFixture911(optionalAbility,hasOptionalPart,once) original == ConditionalUseScenario96(d,"Specimen0007") turn == [TurnFixture92("SideB") EXCEPT !.id=turnId] site == TurnPrioritySite9(turn,"ProcedureCodef53fc09e15ad",10,4,TurnContextFixture92(turn,"ProcedureCodef53fc09e15ad")) open == [original.open EXCEPT !.site=site] ready == [original.ready EXCEPT !.site=site] busy == [original.busy EXCEPT !.site=site] p == OpenConditionalProcedure96(201,d,ready,original.option,original.p.transaction,"Play") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] s == [original EXCEPT !.site=site,!.open=open,!.ready=ready,!.busy=busy,!.p=p,!.imminentP=imminentP,!.resolvingP=resolvingP] node == InstructionNode911(700,"Plain",s.resolvingPlan.steps,FALSE,0,Empty9,1,{1}) technique == LifetimeTechniqueFixture911(d,[id \in {700} |-> node],700) r0 == OpenConditionalRuntime911(201,technique,s.ready,s.option,s.p.transaction,"Play") r == [r0 EXCEPT !.phase="Resolve",!.ability=s.resolvingP.ability] world == [LifetimeWorldFixture910 EXCEPT !.id=21,!.objects=s.current.objects,!.turn=turn, !.present=s.current.present,!.activity=s.current.activity,!.points=s.current.points, !.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}] currentWorld == [world EXCEPT !.activity.instances=[id \in {201} |-> [ability |-> d.syntax.id,sourceObject |-> 1,status |-> "Resolving",owner |-> RuntimeLookOwner911(r)]]] authority == NewLifetimeAuthority910(currentWorld) registry == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) snapshot == SnapshotWithConditionalRegistry96(s.current,s.resolving) world99 == [id |-> currentWorld.id,objects |-> currentWorld.objects,turn |-> currentWorld.turn,conditional |-> snapshot,turnUses |-> Empty9] IN [d |-> d,s |-> s,r |-> r,plan |-> s.resolvingPlan,ledger |-> s.resolving, world |-> currentWorld,authority |-> authority,registry |-> registry,world99 |-> world99] LifetimeUseExecutionFixture911(f,parts) == ReplacementOverlay99(ConditionalExecutionFixture96([id |-> f.r.id,ability |-> f.r.ability],f.plan,parts),[netWorldDelta |-> 0]) LifetimeUseEventFixture911(f,id,instance) == [tag |-> "AbilityUsed",useId |-> id,abilityInstance |-> instance,source |-> f.r.ability.source,player |-> f.d.syntax.controller] LifetimeUseTurnFixture911(f,id,turnId) == [turnId |-> turnId,ability |-> f.d.syntax.id,source |-> f.d.syntax.source,useId |-> id] LifetimeUsePublication911(f,before,after,execution,beforeUses,afterUses,beforeTurns,afterTurns,useId,events) == LET snapshot == SnapshotWithConditionalRegistry96(f.world99.conditional,before) current == [f.world EXCEPT !.activity.instances=ReplacementOverlay99(ConditionalActivityRows96(before.instances), [id \in {201} |-> f.world.activity.instances[201]])] authority == NewLifetimeAuthority910(current) registry == [f.registry EXCEPT !.frontier=LifetimeFrontier910(authority,1)] world == [f.world99 EXCEPT !.conditional=snapshot,!.turnUses=beforeTurns] IN RecordObservedConditionalRuntimeUse911(before,after,f.r,f.plan,execution,beforeUses,afterUses,beforeTurns,afterTurns,useId,events, world,registry,authority) LifetimeCarriedOutUseChecks911 == /\ \A optionalAbility,hasOptionalPart \in BOOLEAN : LET f == LifetimeUseFixture911(optionalAbility,hasOptionalPart,FALSE,1) optional == optionalAbility \/ hasOptionalPart event == LifetimeUseEventFixture911(f,12801,201) used == [f.ledger EXCEPT !.instances[201].used=optional] uses == IF optional THEN [i \in {12801} |-> event] ELSE Empty9 turns == IF optional THEN [i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,1)] ELSE Empty9 IN /\ ConditionalUseScenarioValid96(f.s) /\ ConditionalRuntimeBound911(f.ledger,f.r) /\ RuntimeOwnerCurrent911(f.r,f.authority) /\ LifetimeUsePublication911(f,f.ledger,f.ledger,LifetimeUseExecutionFixture911(f,{}),Empty9,Empty9,Empty9,Empty9,0,{}) /\ LifetimeUsePublication911(f,f.ledger,used,LifetimeUseExecutionFixture911(f,{1}),Empty9,uses,Empty9,turns,12801,IF optional THEN {event} ELSE {}) /\ LifetimeUseExecutionFixture911(f,{1}).netWorldDelta=0 /\ used.instances[201].used=optional LifetimeOnceUsePointChecks911 == LET f == LifetimeUseFixture911(FALSE,TRUE,TRUE,1) priorEvent == LifetimeUseEventFixture911(f,12809,202) priorUses == [i \in {12809} |-> priorEvent] priorTurns == [i \in {12809} |-> LifetimeUseTurnFixture911(f,12809,1)] event == LifetimeUseEventFixture911(f,12801,201) afterUses == ReplacementOverlay99(priorUses,[i \in {12801} |-> event]) afterTurns == ReplacementOverlay99(priorTurns,[i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,1)]) historical == [f.ledger.instances[201] EXCEPT !.member.id=202,!.member.windowId=401,!.status="Complete",!.used=TRUE] before == [f.ledger EXCEPT !.instances=ReplacementOverlay99(@,[i \in {202} |-> historical])] after == [before EXCEPT !.instances[201].used=TRUE] IN /\ ConditionalUseScenarioValid96(f.s) /\ ~LifetimeUsePublication911(f,before,after,LifetimeUseExecutionFixture911(f,{1}),priorUses,afterUses,priorTurns,afterTurns,12801,{event}) /\ LifetimeUsePublication911(f,[before EXCEPT !.instances[201].used=TRUE],[before EXCEPT !.instances[201].used=TRUE], LifetimeUseExecutionFixture911(f,{1}),priorUses,priorUses,priorTurns,priorTurns,0,{}) /\ LifetimeUsePublication911(f,before,before,LifetimeUseExecutionFixture911(f,{}),priorUses,priorUses,priorTurns,priorTurns,0,{}) LifetimeNewTurnUseChecks911 == LET f == LifetimeUseFixture911(FALSE,TRUE,TRUE,2) priorEvent == LifetimeUseEventFixture911(f,12809,202) priorUses == [i \in {12809} |-> priorEvent] priorTurns == [i \in {12809} |-> LifetimeUseTurnFixture911(f,12809,1)] event == LifetimeUseEventFixture911(f,12801,201) uses == ReplacementOverlay99(priorUses,[i \in {12801} |-> event]) turns == ReplacementOverlay99(priorTurns,[i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,2)]) historical == [f.ledger.instances[201] EXCEPT !.member.id=202,!.member.windowId=401,!.status="Complete",!.used=TRUE] before == [f.ledger EXCEPT !.instances=ReplacementOverlay99(@,[i \in {202} |-> historical])] used == [before EXCEPT !.instances[201].used=TRUE] IN /\ ConditionalUseScenarioValid96(f.s) /\ f.s.site.turnId=2 /\ f.s.ready.site.turnId=2 /\ f.s.p.turnId=2 /\ f.s.resolvingP.turnId=2 /\ f.r.turnId=f.authority.current.turn.id /\ ConditionalRuntimeBound911(before,f.r) /\ LifetimeUsePublication911(f,before,used,LifetimeUseExecutionFixture911(f,{1}),priorUses,uses,priorTurns,turns,12801,{event}) LifetimeUseBindingChecks911 == LET f == LifetimeUseFixture911(FALSE,TRUE,TRUE,1) event == LifetimeUseEventFixture911(f,12801,201) uses == [i \in {12801} |-> event] turns == [i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,1)] used == [f.ledger EXCEPT !.instances[201].used=TRUE] execution == LifetimeUseExecutionFixture911(f,{1}) IN /\ \A bad \in {[execution EXCEPT !.source.object=2],[execution EXCEPT !.abilityInstance=202], [execution EXCEPT !.instruction.id=701]} : ~LifetimeUsePublication911(f,f.ledger,used,bad,Empty9,uses,Empty9,turns,12801,{event}) /\ ~LifetimeUsePublication911(f,f.ledger,f.ledger,[execution EXCEPT !.partIds={2}],Empty9,Empty9,Empty9,Empty9,0,{}) /\ ~RecordObservedConditionalRuntimeUse911(f.ledger,used,f.r,f.plan,execution,Empty9,uses,Empty9,turns,12801,{event}, [f.world99 EXCEPT !.id=999],f.registry,f.authority) LifetimeStaticTerminalFixture911(expectedNonempty) == LET raw == RootBranchTechnique911 source == RuleAbilitySource9("StructuralStaticConditional911") d == [raw.definition EXCEPT !.primaryKind="Static",!.syntax.units[1].subtype="Static",!.syntax.source=source, !.syntax.cardKind="NoValue",!.activity.source=source,!.activity.provider="Rule"] nodes == [id \in DOMAIN raw.nodes |-> [raw.nodes[id] EXCEPT !.segments={1}]] technique == LifetimeTechniqueFixture911(d,nodes,raw.entry) key == ConditionalKey96(d) initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",[k \in {key} |-> d],RootBranchObjects911) EXCEPT !.activity.activeRules={source.rule}] seed == [NewConditionalLedger96(initial) EXCEPT !.stepSerial=7] cp == ConditionalCheckpointFixture96(seed,1,[initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"], [initial EXCEPT !.id=11,!.checkpointId=1],Empty9) instance == [NewConditionalInstance96(11910,d,cp,0,11920,119) EXCEPT !.status="Resolving", !.expected=[i \in {1} |-> [instruction |-> [id |-> 11901],effects |-> IF expectedNonempty THEN {"ExpectedChoice"} ELSE {}]]] ledger == [seed EXCEPT !.instances=[i \in {11910} |-> instance]] members == [i \in {11910} |-> instance.member] w == ReadyFixture92(WindowFixture92(11920,"Reaction",TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",2),members,119,NoTimingRef9)) option == ConditionalOptionFixture92(w,11910) busy == StartedFixture92(w,option) base == OpenConditionalRuntime911(11910,technique,w,option,LegalityFixture92(w,option).transactionId,"Rule") r == [base EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == [OpenInstruction93(11901,"Ability",11910,r.ability.source,r.ability.sourceZone,1,"NoValue",technique.nodes[11901].steps,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] context == [id |-> 12830,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(plan),actualEffects |-> Empty9] returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> 1,effects |-> Empty9,complete |-> TRUE,childrenReturned |-> TRUE] control == [tag |-> "ResolvedInstructionControl",instance |-> r.id,node |-> r.pc,instruction |-> context.currentRef, contextId |-> context.id,actualEffects |-> Empty9,completion |-> returned,mode |-> "Removed"] afterPlan == [plan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=plan.steps] step == [tag |-> "InstructionStepReturn",instruction |-> plan.id,index |-> 1,step |-> Head(plan.steps),complete |-> TRUE,expectedReturn |-> returned] boundary == GraphInstructionBoundary911(r,context,{"InstructionEnd"},0) after == [r EXCEPT !.phase="Checkpoint",!.visited= <<11901>>,!.pc=0,!.choices=[i \in {1} |-> control],!.boundary=boundary, !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] afterLedger == [ledger EXCEPT !.instances[11910].status="Complete", !.throttle=IF expectedNonempty THEN @ ELSE ReplacementOverlay99(@,[k \in {key} |-> 7])] IN [d |-> d,key |-> key,r |-> r,plan |-> plan,context |-> context,returned |-> returned,control |-> control, afterPlan |-> afterPlan,step |-> step,boundary |-> boundary,after |-> after,ledger |-> ledger,afterLedger |-> afterLedger,busy |-> busy] LifetimeStaticTerminalValid911(f) == FinishConditionalRuntimeCore911(f.ledger,f.afterLedger,<>,<>,f.r,f.after,f.plan,f.afterPlan,f.context, f.returned,f.step,f.control,[tag |-> "NoInstructionPayment"],f.boundary) LifetimeStaticActualTerminalChecks911 == LET empty == LifetimeStaticTerminalFixture911(FALSE) nonempty == LifetimeStaticTerminalFixture911(TRUE) IN /\ ConditionalDefinitionValid96(empty.d) /\ LifetimeStaticTerminalValid911(empty) /\ LifetimeStaticTerminalValid911(nonempty) /\ empty.afterLedger.throttle[empty.key]=7 /\ empty.after.visited= <<11901>> /\ empty.after.pc=0 /\ empty.r.technique.definition.instructions= <<11901,11902,11903,11904>> /\ DOMAIN empty.afterLedger.instances[11910].expected={1} /\ ~StaticRetryAllowed96(empty.d,empty.afterLedger) /\ StaticRetryAllowed96(empty.d,[empty.afterLedger EXCEPT !.stepSerial=8]) /\ nonempty.afterLedger.throttle=Empty9 /\ empty.after.ability.lastFinished /\ ~empty.after.ability.returned LifetimeDelayedCreationFixture911 == LET source == RuleAbilitySource9("StructuralDelayedFactory911") raw == ConditionalDefinitionFixture96(12900,"Specimen0007","Trigger","StructuralOccurrence","SchemaAtom016","SideB","SideB") template == [raw EXCEPT !.syntax.source=source,!.syntax.cardKind="NoValue",!.activity.source=source,!.activity.provider="Rule"] plan == OpenInstruction93(12901,"Rule",0,source,"NoValue",0,source.rule,<<"CreateStructuralDelayed">>,FALSE) announced == [plan EXCEPT !.announced=TRUE] imminent == [announced EXCEPT !.phase="Imminent"] resolving == [imminent EXCEPT !.phase="Resolving"] origin == [kind |-> "Instruction",plan |-> resolving,parent |-> Empty9,ruleStep |-> source.rule] world == [LifetimeWorldFixture910 EXCEPT !.turn=TurnFixture92("SideB"),!.objects=Empty9,!.present={},!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.activity.activeRules={source.rule},!.activity.instances=Empty9] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,Empty9) EXCEPT !.activity=world.activity] seed == NewConditionalLedger96(initial) creation == DelayedCreationReceiptFixture96(template,resolving,NoTimingRef9,NoTimingRef9) created == DelayedCreatedFixture96(seed,12910,12920,template,resolving,creation,NoTraversal6) d == created.effects[12910].definition definitions == [key \in {ConditionalKey96(d)} |-> d] blueprints == [id \in {12910} |-> DelayedLifetimeBlueprint910(created.effects[id],origin,world)] context == [id |-> 12902,imminenceId |-> 12903,currentRef |-> InstructionWindowRef93(resolving),currentWorld |-> world.id, phase |-> "Resolving",actualEffects |-> [id \in {1} |-> [kind |-> "CreateLingering",blueprints |-> blueprints]]] execution == [tag |-> "LingeringEffectExecution",contextId |-> context.id,instruction |-> context.currentRef,operation |-> 1, snapshotId |-> world.id,source |-> source,blueprints |-> blueprints,carriedOut |-> TRUE] rows == [id \in {12910} |-> NewLingeringEffect910(id,blueprints[id],context,1,world)] registry == [NewLingeringRegistry910 EXCEPT !.effects=ObserveLingeringEffects910(rows,world),!.usedEffects={12910}, !.creations={LingeringCreationKey910(context,1)}] snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(2,0,"CreatedDelayed",definitions,Empty9),created) EXCEPT !.activity=world.activity],registry,created,world) published == [created EXCEPT !.activationEpoch=snapshot.activationEpoch,!.activationSerial=snapshot.activationSerial] IN [source |-> source,template |-> template,plan |-> plan,announced |-> announced,imminent |-> imminent,resolving |-> resolving,origin |-> origin, world |-> world,initial |-> initial,seed |-> seed,creation |-> creation,created |-> created,d |-> d,definitions |-> definitions, context |-> context,execution |-> execution,registry |-> registry,snapshot |-> snapshot,published |-> published] LifetimeDelayedCreationValid911(f) == /\ AnnounceInstructionTargets93(f.plan,f.announced,[InstructionTargetsFixture93(f.plan) EXCEPT !.targets={}],Empty9,f.source.rule) /\ EnterRuleInstruction93(f.announced,f.imminent,f.source.rule) /\ NoInstructionInterrupt93(f.imminent,Empty9,f.source.rule,NoModifiersFixture95(f.imminent),InstructionClearanceFixture93(f.imminent,0,0)) /\ BeginRuleInstructionAtomic93(f.imminent,f.resolving,f.source.rule,InstructionClearanceFixture93(f.imminent,0,0)) /\ PublishCreatedDelayedLingering910(NewLingeringRegistry910,f.registry,f.seed,f.created,f.published,<<>>,<<>>,f.initial,f.snapshot, 12910,12920,f.template,f.context,f.origin,1,f.execution,f.creation,f.world,{12900}) LifetimeDelayedResolvingFixture911 == LET f == LifetimeDelayedCreationFixture911 initial == f.snapshot begin == [initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] events == [id \in {12931,12932} |-> ConditionalEventFixture96(id,"StructuralOccurrence",0,"SideB","SideB",initial,12901)] cp1 == ConditionalCheckpointFixture96(f.published,1,begin,current,events) keys == {[definition |-> ConditionalKey96(f.d),occurrence |-> id] : id \in DOMAIN events} allocation == [key \in keys |-> IF key.occurrence=12931 THEN 12940 ELSE 12941] bindings == ConditionalBindingsFixture96(keys,1,12950,129) pending == ConditionalCommittedFixture96(f.published,f.definitions,cp1,allocation,bindings,Empty9) site == TurnPrioritySite9(f.world.turn,"ProcedureCode989abc27e0c6",10,2,TurnContextFixture92(f.world.turn,"ProcedureCode989abc27e0c6")) members == ConditionalWindowMembers96(pending.instances,12950) open == WindowFixture92(12950,"Reaction",site,members,129,NoTimingRef9) begin2 == [SnapshotWithConditionalRegistry96(current,pending) EXCEPT !.id=20,!.checkpointId=2,!.point="CheckpointBeginning"] current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(pending,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] received == ConditionalCommittedFixture96(pending,f.definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,12940) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(12940,f.d,ready,option,LegalityFixture92(ready,option).transactionId,"Rule") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received EXCEPT !.instances[12940].status="Imminent"] plan == OpenInstruction93(700,"Ability",12940,f.source,"Rule",1,"NoValue",<<"ResolveSyntheticDelayed">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] effects == [id \in {1} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id,"StructuralDelayedEffect",FALSE,0), [value |-> 0,baseOrigin |-> f.source,actor |-> "SideB",baseController |-> "SideB",targetSite |-> "NoValue"])] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> ExpectedObservationSet99(effects)] ledger == [selected EXCEPT !.instances[12940].status="Resolving",!.instances[12940].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> ExpectedObservationSet99(effects)]]] technique == LifetimeTechniqueFixture911(f.d,[id \in {700} |-> InstructionNode911(700,"Plain",resolvingPlan.steps,FALSE,0,Empty9,1,{1})],700) base == OpenConditionalRuntime911(12940,technique,ready,option,p.transaction,"Rule") r == [base EXCEPT !.phase="Resolve",!.ability=resolvingP.ability] world0 == [f.world EXCEPT !.id=21,!.activity.instances=ReplacementOverlay99(ConditionalActivityRows96(ledger.instances), [id \in {12940} |-> [ability |-> f.d.syntax.id,sourceObject |-> 0,status |-> "Resolving",owner |-> RuntimeLookOwner911(r)]])] authority == NewLifetimeAuthority910(world0) registry == ReplacementOverlay99(f.registry,[frontier |-> LifetimeFrontier910(authority,1)]) snapshot == LingeringConditionalSnapshot910(SnapshotWithConditionalRegistry96(current2,ledger),registry,ledger,world0) context == [id |-> 12960,imminenceId |-> 12961,phase |-> "Resolving",initialRef |-> InstructionWindowRef93(imminentPlan), currentRef |-> InstructionWindowRef93(resolvingPlan),currentWorld |-> world0.id,initialEffects |-> effects,actualEffects |-> effects] origin == [kind |-> "Instruction",plan |-> resolvingPlan,parent |-> r.ability,ruleStep |-> "NoValue"] world99 == ReplacementOverlay99(world0,[tag |-> "CurrentInterruptWorld",traversalControl |-> world0.control, controllers |-> Empty9,activePeriods |-> Empty9,conditional |-> snapshot]) IN [f |-> f,events |-> events,cp1 |-> cp1,allocation |-> allocation,bindings |-> bindings,pending |-> pending,site |-> site,open |-> open, current2 |-> current2,cp2 |-> cp2,received |-> received,ready |-> ready,option |-> option,busy |-> busy,p |-> p,imminentP |-> imminentP, selected |-> selected,plan |-> plan,imminentPlan |-> imminentPlan,resolvingPlan |-> resolvingPlan,resolvingP |-> resolvingP, effects |-> effects,expected |-> expected,ledger |-> ledger,r |-> r,world |-> world0,authority |-> authority,registry |-> registry, snapshot |-> snapshot,context |-> context,origin |-> origin,world99 |-> world99] LifetimeDelayedResolvingValid911(s) == /\ LifetimeDelayedCreationValid911(s.f) /\ ProcessConditionalCheckpoint96(s.f.published,s.pending,<<>>,<<>>,s.f.definitions,s.cp1, ConditionalConditionsFixture96(s.f.definitions,s.events),s.allocation,s.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,s.pending,12950,s.site,OpeningFixture92(12950,"Reaction",s.site,s.open.members,129,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.received,<>,<>,s.f.definitions,s.cp2, ConditionalConditionsFixture96(s.f.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12950}) /\ CheckpointPriorityWithConditionals96(s.received,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(s.received,s.selected,<>,<>,s.p,s.imminentP,s.f.d, SnapshotWithConditionalRegistry96(s.current2,s.received),12940,s.option,LegalityFixture92(s.ready,s.option),Empty9,s.plan,s.imminentPlan, [InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}],InstructionEntryFixture93(s.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> s.f.d.syntax.id,source |-> s.f.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(s.selected,s.ledger,<>,s.imminentP,s.resolvingP,s.imminentPlan,s.resolvingPlan, NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),s.expected) /\ ConditionalRuntimeBound911(s.ledger,s.r) /\ RuntimeOwnerCurrent911(s.r,s.authority) LifetimeDelayedReturnFixture911 == LET s == LifetimeDelayedResolvingFixture911 IN [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> s.context.id,instruction |-> s.context.currentRef, snapshotId |-> s.world.id,effects |-> s.effects,complete |-> TRUE,childrenReturned |-> TRUE] LifetimeDelayedFinishFixture911(returned) == LET s == LifetimeDelayedResolvingFixture911 afterPlan == [s.resolvingPlan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=s.resolvingPlan.steps] step == [tag |-> "InstructionStepReturn",instruction |-> 700,index |-> 1,step |-> Head(s.resolvingPlan.steps),complete |-> TRUE,expectedReturn |-> returned] boundary == GraphInstructionBoundary911(s.r,s.context,{"InstructionEnd"},0) completeR == [s.r EXCEPT !.phase="Checkpoint",!.pc=0,!.visited= <<700>>,!.boundary=boundary, !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] candidate == [s.ledger EXCEPT !.instances[12940].status="Complete"] midWorld == [s.world EXCEPT !.id=30,!.finishedInstances={12940}, !.activity.instances[12940]=[ability |-> s.f.d.syntax.id,sourceObject |-> 0,status |-> "Complete",owner |-> RuntimeLookOwner911(completeR)]] midExecution == [tag |-> "ActualObjectTransition",id |-> s.context.id,snapshotId |-> 30, source |-> s.f.source,instruction |-> s.context.currentRef,return |-> returned] midAuthority == LifetimeAuthorityAfter910(s.authority,LifetimeKernelTransition910(s.world,midWorld,midExecution)) midRegistry == [s.registry EXCEPT !.effects=ObserveLingeringEffects910(@,midWorld),!.frontier=LifetimeFrontier910(midAuthority,2)] midSnapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(s.snapshot,candidate) EXCEPT !.id=30],midRegistry,candidate,midWorld) afterWorld == [midWorld EXCEPT !.id=31,!.finishedDelayedEffects={12910}] acknowledgement == DelayedRuntimePublicationAck911(returned,midWorld) execution == [tag |-> "ActualDelayedReturn",id |-> s.context.id,snapshotId |-> 31,source |-> s.f.source, instruction |-> s.context.currentRef,return |-> acknowledgement] authority == LifetimeAuthorityAfter910(midAuthority,LifetimeKernelTransition910(midWorld,afterWorld,execution)) registry == [midRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,afterWorld),!.frontier=LifetimeFrontier910(authority,3)] key == ConditionalKey96(s.f.d) afterLedger == [candidate EXCEPT !.instances[12941].status="Lost",!.activationEpoch[key]=1,!.activationSerial=1] afterStack == <<[s.busy EXCEPT !.pending={},!.lostPending={12941}]>> snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(midSnapshot,candidate) EXCEPT !.id=31, !.activationEpoch=afterLedger.activationEpoch,!.activationSerial=afterLedger.activationSerial],registry,candidate,afterWorld) before == [registry |-> s.registry,ledger |-> s.ledger,stack |-> <>,snapshot |-> s.snapshot,authority |-> s.authority] mid == [registry |-> midRegistry,ledger |-> candidate,stack |-> <>,snapshot |-> midSnapshot,authority |-> midAuthority] after == [registry |-> registry,ledger |-> afterLedger,stack |-> afterStack,snapshot |-> snapshot,authority |-> authority] call == [before |-> s.r,after |-> completeR,plan |-> s.resolvingPlan,afterPlan |-> afterPlan,context |-> s.context, afterContext |-> [s.context EXCEPT !.phase="Returned"],origin |-> s.origin, afterOrigin |-> [s.origin EXCEPT !.plan=afterPlan,!.parent=completeR.ability],world |-> s.world99, actualReturn |-> returned,step |-> step,control |-> NoInstructionControl911,payment |-> [tag |-> "NoInstructionPayment"], boundary |-> boundary,candidateLedger |-> candidate] IN [s |-> s,before |-> before,mid |-> mid,after |-> after,call |-> call,acknowledgement |-> acknowledgement] LifetimeDelayedTwoRowChecks911 == LET f == LifetimeDelayedFinishFixture911(LifetimeDelayedReturnFixture911) IN /\ LifetimeDelayedResolvingValid911(f.s) /\ FinishObservedDelayedRuntime911(f.before,f.mid,f.after,f.call) /\ f.call.actualReturn.snapshotId=21 /\ f.call.step.expectedReturn=f.call.actualReturn /\ f.acknowledgement.snapshotId=30 /\ f.acknowledgement.originatingReturn=f.call.actualReturn /\ f.call.after.ability.lastFinished /\ ~f.call.after.ability.returned /\ f.mid.registry.effects[12910].status="Active" /\ f.after.registry.effects[12910].status="Expired" /\ DOMAIN f.after.registry.effects={12910} /\ DOMAIN f.after.ledger.effects={12910} /\ f.after.ledger.instances[12940].status="Complete" /\ f.after.ledger.instances[12941].status="Lost" /\ f.after.ledger.activationEpoch[ConditionalKey96(f.s.f.d)]=1 /\ f.after.stack[1].pending={} /\ f.after.stack[1].busy.instance=12940 /\ f.s.site.turnId=f.s.world.turn.id /\ f.call.before.turnId=f.s.world.turn.id /\ f.after.authority.order= <<21,30,31>> /\ LifetimeReady910(f.after.registry,f.after.authority) LifetimeDelayedReceiptChecks911 == LET original == LifetimeDelayedReturnFixture911 IN /\ \A receipt \in {[original EXCEPT !.tag="UnboundReturn"],[original EXCEPT !.contextId=12999], [original EXCEPT !.instruction.id=701],[original EXCEPT !.snapshotId=999], [original EXCEPT !.effects=Empty9],[original EXCEPT !.complete=FALSE],[original EXCEPT !.childrenReturned=FALSE]} : LET f == LifetimeDelayedFinishFixture911(receipt) IN /\ f.call.step.expectedReturn=receipt /\ f.mid.authority.transitions[30].receipt.execution.return=receipt /\ f.after.authority.transitions[31].receipt.execution.return.originatingReturn=receipt /\ ~FinishObservedDelayedRuntime911(f.before,f.mid,f.after,f.call) LifetimeDelayedJournalBindingChecks911 == LET f == LifetimeDelayedFinishFixture911(LifetimeDelayedReturnFixture911) badMidAuthority == [f.mid.authority EXCEPT !.transitions[30].receipt.execution.return.effects=Empty9] badMidRegistry == [f.mid.registry EXCEPT !.frontier=LifetimeFrontier910(badMidAuthority,2)] badMid == [f.mid EXCEPT !.authority=badMidAuthority,!.registry=badMidRegistry] inheritedAuthority == [f.after.authority EXCEPT !.transitions[30]=badMidAuthority.transitions[30]] inheritedRegistry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(inheritedAuthority,3)] inheritedAfter == [f.after EXCEPT !.authority=inheritedAuthority,!.registry=inheritedRegistry] badAfterAuthority == [f.after.authority EXCEPT !.transitions[31].receipt.execution.return.originatingReturn.snapshotId=30] badAfterRegistry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(badAfterAuthority,3)] badAfter == [f.after EXCEPT !.authority=badAfterAuthority,!.registry=badAfterRegistry] IN /\ LifetimeAuthorityValid910(badMidAuthority) /\ LifetimeAuthorityValid910(inheritedAuthority) /\ LifetimeReady910(badMidRegistry,badMidAuthority) /\ LifetimeReady910(inheritedRegistry,inheritedAuthority) /\ ~FinishObservedDelayedRuntime911(f.before,badMid,inheritedAfter,f.call) /\ LifetimeAuthorityValid910(badAfterAuthority) /\ LifetimeReady910(badAfterRegistry,badAfterAuthority) /\ ~FinishObservedDelayedRuntime911(f.before,f.mid,badAfter,f.call) LifetimeDelayedCleanupFixture911 == LET f == LifetimeDelayedFinishFixture911(LifetimeDelayedReturnFixture911) beforeSnapshot == SnapshotWithConditionalRegistry96(f.after.snapshot,f.after.ledger) world == [f.after.authority.current EXCEPT !.id=41] evaluation == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 12980,snapshotId |-> 41,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(f.after.authority,LifetimeKernelTransition910(f.after.authority.current,world,evaluation)) registry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(authority,4)] current == [SnapshotWithConditionalRegistry96(f.after.snapshot,f.after.ledger) EXCEPT !.id=41,!.checkpointId=3,!.point="ProcedureCodee605a78f5d5e"] begin == [current EXCEPT !.id=40,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(f.after.ledger,3,begin,current,Empty9) EXCEPT !.caller=GraphBoundaryCaller911(f.call.boundary)] received == ConditionalCommittedFixture96(f.after.ledger,f.s.f.definitions,cp,Empty9,Empty9,Empty9) frame == LingeringCheckpointFrame910(received,cp,world) cleanup == [tag |-> "LingeringCheckpointCleanup",frame |-> frame,expired |-> {12910},complete |-> TRUE] cleanedRegistry == [registry EXCEPT !.effects=Empty9,!.cleanupIds={3}] candidate == [received EXCEPT !.effects=Empty9] snapshot == LingeringConditionalSnapshot910(SnapshotWithConditionalRegistry96(current,candidate),cleanedRegistry,candidate,world) afterFrame == [frame EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"] IN [f |-> f,beforeSnapshot |-> beforeSnapshot,world |-> world,evaluation |-> evaluation,authority |-> authority,registry |-> registry, current |-> current,cp |-> cp,received |-> received,frame |-> frame,cleanup |-> cleanup,cleanedRegistry |-> cleanedRegistry, candidate |-> candidate,snapshot |-> snapshot,afterFrame |-> afterFrame] LifetimeDelayedCleanupValid911(g) == /\ FinishObservedDelayedRuntime911(g.f.before,g.f.mid,g.f.after,g.f.call) /\ CommitLifetimeKernelCore910(g.f.after.authority,g.authority,g.world,g.evaluation) /\ PublishNextLingeringActivity910(g.f.after.registry,g.registry,g.f.after.ledger,g.f.after.ledger,g.f.after.stack,g.f.after.stack, g.beforeSnapshot,g.current,g.authority) /\ ProcessConditionalCheckpoint96(g.f.after.ledger,g.received,g.f.after.stack,g.f.after.stack,g.f.s.f.definitions,g.cp, ConditionalConditionsFixture96(g.f.s.f.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12950}) /\ CleanupObservedLingeringConditionals910(g.registry,g.cleanedRegistry,g.received,g.candidate,g.candidate,g.f.after.stack,g.f.after.stack, SnapshotWithConditionalRegistry96(g.current,g.received),g.snapshot,g.authority,g.frame,g.afterFrame,g.cleanup) LifetimeDelayedCheckpointCleanupChecks911 == LET g == LifetimeDelayedCleanupFixture911 IN /\ LifetimeDelayedCleanupValid911(g) /\ g.f.after.registry.effects[12910].status="Expired" /\ DOMAIN g.f.after.ledger.effects={12910} /\ g.cleanedRegistry.effects=Empty9 /\ g.candidate.effects=Empty9 /\ g.cleanedRegistry.usedEffects={12910} /\ g.candidate.usedDelayedEffects={12910} /\ g.candidate.usedDelayedDefinitions={12920} /\ ~CleanupObservedLingeringConditionals910(g.registry,g.cleanedRegistry,g.received,g.candidate,g.candidate,g.f.after.stack,g.f.after.stack, SnapshotWithConditionalRegistry96(g.current,g.received),g.snapshot,g.authority,[g.frame EXCEPT !.point="ProcedureCodee605a78f5d5e"], g.afterFrame,[g.cleanup EXCEPT !.frame.point="ProcedureCodee605a78f5d5e"]) LifetimeStaticHistoryFixture911(missingPrior) == LET base == LifetimeStaticTerminalFixture911(TRUE) first == RootBranchStepFixture911(base.r,"A",RootBranchWorld911) r == [first.after EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.cursor=2] plan == [OpenInstruction93(11902,"Ability",r.id,r.ability.source,"Rule",2,"NoValue",r.technique.nodes[11902].steps,TRUE) EXCEPT !.phase="Resolving",!.announced=TRUE,!.targets={2}] expected == [i \in IF missingPrior THEN {2} ELSE {1,2} |-> [instruction |-> IF i=1 THEN InstructionWindowRef93(first.plan) ELSE InstructionWindowRef93(plan),effects |-> IF i=1 THEN {"ExpectedChoice"} ELSE {}]] ledger == [base.ledger EXCEPT !.instances[11910].expected=expected] context == [id |-> 12831,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(plan),actualEffects |-> Empty9] returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> 1,effects |-> Empty9,complete |-> TRUE,childrenReturned |-> TRUE] afterPlan == [plan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=plan.steps] step == [tag |-> "InstructionStepReturn",instruction |-> 11902,index |-> 1,step |-> Head(plan.steps),complete |-> TRUE,expectedReturn |-> returned] boundary == GraphInstructionBoundary911(r,context,{"InstructionEnd"},0) after == [r EXCEPT !.phase="Checkpoint",!.pc=0,!.visited= <<11901,11902>>,!.boundary=boundary, !.ability.phase="Complete",!.ability.lastFinished=TRUE,!.ability.complete=TRUE] afterLedger == [ledger EXCEPT !.instances[11910].status="Complete"] IN [base |-> base,first |-> first,r |-> r,plan |-> plan,ledger |-> ledger,context |-> context,returned |-> returned, afterPlan |-> afterPlan,step |-> step,boundary |-> boundary,after |-> after,afterLedger |-> afterLedger] LifetimeStaticHistoryValid911(f) == FinishConditionalRuntimeCore911(f.ledger,f.afterLedger,<>,<>,f.r,f.after,f.plan,f.afterPlan,f.context, f.returned,f.step,NoInstructionControl911,[tag |-> "NoInstructionPayment"],f.boundary) LifetimeStaticHistoryChecks911 == LET f == LifetimeStaticHistoryFixture911(FALSE) missing == LifetimeStaticHistoryFixture911(TRUE) nonempty == LifetimeStaticTerminalFixture911(TRUE) forgedThrottle == [nonempty.afterLedger EXCEPT !.throttle=ReplacementOverlay99(@,[key \in {nonempty.key} |-> 7])] IN /\ LifetimeStaticHistoryValid911(f) /\ ~LifetimeStaticHistoryValid911(missing) /\ f.after.visited= <<11901,11902>> /\ f.afterLedger.throttle=Empty9 /\ DOMAIN missing.ledger.instances[11910].expected={2} /\ ~FinishConditionalRuntimeCore911(nonempty.ledger,forgedThrottle,<>,<>,nonempty.r,nonempty.after, nonempty.plan,nonempty.afterPlan,nonempty.context,nonempty.returned,nonempty.step,nonempty.control, [tag |-> "NoInstructionPayment"],nonempty.boundary) LifetimeCurrentUseHistoryChecks911 == LET f == LifetimeUseFixture911(FALSE,TRUE,TRUE,1) priorTurns == [i \in {12809} |-> LifetimeUseTurnFixture911(f,12809,1)] event == LifetimeUseEventFixture911(f,12801,201) used == [f.ledger EXCEPT !.instances[201].used=TRUE] uses == [i \in {12801} |-> event] turns == [i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,1)] currentWorld == [f.world99 EXCEPT !.turnUses=priorTurns] IN ~RecordObservedConditionalRuntimeUse911(f.ledger,used,f.r,f.plan,LifetimeUseExecutionFixture911(f,{1}), Empty9,uses,Empty9,turns,12801,{event},currentWorld,f.registry,f.authority) LifetimeDetachedUseChecks911 == LET f == LifetimeUseFixture911(FALSE,TRUE,TRUE,1) objects == [id \in {2} |-> [f.world.objects[1] EXCEPT !.zone="SideBDiscard",!.loc="SideBDiscard",!.deployed=FALSE]] world == [f.world EXCEPT !.id=22,!.objects=objects,!.present={}] execution == [tag |-> "ActualObjectTransition",id |-> 12890,snapshotId |-> 22,source |-> RuleAbilitySource9("AuthorizedExternalMovement911")] authority == LifetimeAuthorityAfter910(f.authority,LifetimeKernelTransition910(f.world,world,execution)) registry == [f.registry EXCEPT !.frontier=LifetimeFrontier910(authority,2)] key == ConditionalKey96(f.d) ledger == [f.ledger EXCEPT !.activationEpoch[key]=1,!.activationSerial=1] snapshot == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(22,2,"SourceDeparted",Empty9,objects),f.ledger) EXCEPT !.activationEpoch=ledger.activationEpoch,!.activationSerial=1,!.usedObjects={1,2}] world99 == [f.world99 EXCEPT !.id=22,!.objects=objects,!.conditional=snapshot] event == LifetimeUseEventFixture911(f,12801,201) used == [ledger EXCEPT !.instances[201].used=TRUE] uses == [i \in {12801} |-> event] turns == [i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,1)] IN /\ CardBatchTransfer8(f.world.objects,objects,{1},[id \in {1} |-> 2],{1},"SideBDiscard","Up",[id \in {1} |-> "SideBDiscard"]) /\ CommitLifetimeKernelCore910(f.authority,authority,world,execution) /\ PublishNextLifetime910(f.registry,registry,authority) /\ ObserveConditionalActivity96(f.ledger,f.ledger,ledger,<>,<>,f.world99.conditional,snapshot) /\ RecordObservedConditionalRuntimeUse911(ledger,used,f.r,f.plan,LifetimeUseExecutionFixture911(f,{1}), Empty9,uses,Empty9,turns,12801,{event},world99,registry,authority) /\ 1 \notin DOMAIN objects /\ objects[2].card="Specimen0007" /\ event.source=ObjectAbilitySource9(1) /\ f.r.technique.definition.syntax.source=ObjectAbilitySource9(1) /\ ~RecordObservedConditionalRuntimeUse911(ledger,used,f.r,f.plan,LifetimeUseExecutionFixture911(f,{1}), Empty9,uses,Empty9,turns,12801,{event},world99,f.registry,authority) LifetimeDelayedOmittedExpiryFixture911(f) == LET world == [f.mid.authority.current EXCEPT !.id=31] acknowledgement == DelayedRuntimePublicationAck911(f.call.actualReturn,f.mid.authority.current) execution == [tag |-> "ActualDelayedReturn",id |-> f.call.context.id,snapshotId |-> 31,source |-> f.s.f.source, instruction |-> f.call.context.currentRef,return |-> acknowledgement] authority == LifetimeAuthorityAfter910(f.mid.authority,LifetimeKernelTransition910(f.mid.authority.current,world,execution)) registry == [f.mid.registry EXCEPT !.frontier=LifetimeFrontier910(authority,3)] snapshot == [f.mid.snapshot EXCEPT !.id=31] IN [registry |-> registry,ledger |-> f.mid.ledger,stack |-> f.mid.stack,snapshot |-> snapshot,authority |-> authority] LifetimeDelayedExpiryObligationChecks911 == LET f == LifetimeDelayedFinishFixture911(LifetimeDelayedReturnFixture911) omitted == LifetimeDelayedOmittedExpiryFixture911(f) badStep == [f.call EXCEPT !.step.expectedReturn=f.acknowledgement] IN /\ LifetimeReady910(omitted.registry,omitted.authority) /\ DelayedLifetimeBound910(omitted.registry,omitted.ledger) /\ omitted.registry.effects[12910].status="Active" /\ omitted.ledger.instances[12941].status="Pending" /\ ~FinishObservedDelayedRuntime911(f.before,f.mid,omitted,f.call) /\ f.acknowledgement.originatingReturn=f.call.actualReturn /\ ~FinishObservedDelayedRuntime911(f.before,f.mid,f.after,badStep) LifetimeUseCapturedOwnerChecks911 == LET f == LifetimeUseFixture911(FALSE,TRUE,TRUE,1) forged == [f.r EXCEPT !.turnId=2] event == LifetimeUseEventFixture911(f,12801,201) used == [f.ledger EXCEPT !.instances[201].used=TRUE] uses == [i \in {12801} |-> event] turns == [i \in {12801} |-> LifetimeUseTurnFixture911(f,12801,2)] IN /\ RuntimeProfile911(forged) /\ ConditionalRuntimeBound911(f.ledger,forged) /\ ~RecordObservedConditionalRuntimeUse911(f.ledger,used,forged,f.plan,LifetimeUseExecutionFixture911(f,{1}), Empty9,uses,Empty9,turns,12801,{event},f.world99,f.registry,f.authority) CapturedDefinitionContinuationRepairChecks911 == LET path == ConditionalGraphShortPathFixture911 g == path.cp4 s == path.next wrong == [g.ledger EXCEPT !.instances[12110].definitionCopy.effectChoices={{},{1}}] selected == [wrong EXCEPT !.instances[12110].status="Imminent"] IN /\ ConditionalGraphNextSelectionValid911(g,s) /\ wrong.instances[12110].definitionCopy#s.before.technique.definition /\ ConditionalKey96(wrong.instances[12110].definitionCopy)=ConditionalKey96(s.before.technique.definition) /\ ~EnterNextConditionalRuntime911(wrong,selected,<>,g.ready,s.imminent,s.plan,s.imminentPlan, s.targets,s.receipt,s.registry,s.authority) ConsumedEmptyEntryRepairChecks911 == LET path == ConditionalGraphShortPathFixture911 original == path.context used == path.first.f.s.entry.id next == [path.next EXCEPT !.entry.id=used] f == ConditionalGraphContextFromEntryFixture911(next,original.context.id,original.observation.id,original.prepared.windowId, original.prepared.group,original.atomicWorld.id,original.beforeExpectedRegistry,original.beforeHistory) projection == [f.projection EXCEPT !.forbiddenIds=DOMAIN f.description.effects] context == NewExpectedContext99(f.context.id,used,f.origin,f.world,f.description,Empty9,f.s.entry.owner) observation == InitialWouldObservation99(context,f.observation.id) history == InitialCaptureAfterFixture99(f.beforeHistory,context,observation) registry == [f.expectedRegistry EXCEPT !.contexts[context.id]=context] IN /\ ConditionalGraphShortPathChecks911 /\ used \in f.beforeExpectedRegistry.entryIds /\ ActualRuntimeEntry911(f.s.entry,f.origin,f.world,f.s.registry,f.s.authority,RootBranchFacts911) /\ InitialExpectedProjection99(f.origin,f.world,f.description,projection,Empty9) /\ \A old \in DOMAIN f.beforeExpectedRegistry.contexts : WouldContextKey99(f.beforeExpectedRegistry.contexts[old].initialRef)#WouldContextKey99(context.initialRef) /\ ~BeginRuntimeExpectedContext911(f.beforeExpectedRegistry,registry,context.id,f.origin,f.world,f.s.entry, f.description,projection,Empty9,f.s.entry.owner,RootBranchFacts911,f.beforeHistory,history,observation,f.s.registry,f.s.authority) DelayedOrdinaryRouteRepairChecks911 == LET f == LifetimeDelayedFinishFixture911(LifetimeDelayedReturnFixture911) c == f.call IN /\ LifetimeDelayedTwoRowChecks911 /\ f.mid.registry.effects[12910].status="Active" /\ f.mid.ledger.instances[12941].status="Pending" /\ ~FinishObservedConditionalRuntime911(f.before.registry,f.mid.registry,f.before.ledger,c.candidateLedger,f.mid.ledger, f.before.stack,f.mid.stack,c.before,c.after,c.plan,c.afterPlan,c.context,c.afterContext,c.origin,c.afterOrigin,c.world, c.actualReturn,c.step,c.control,c.payment,c.boundary,f.before.snapshot,f.mid.snapshot,f.before.authority,f.mid.authority) PerCardCountJoinRepairChecks911 == LET original == NormalizationRuntimeShapeFixture911(NormalizationPerCardSchemaFixture911("Deploy",3,TRUE)) bad == [original EXCEPT !.units[1].count=2,!.groups[1].join=3] IN /\ InstructionTechniqueValid911(original) /\ InstructionPartitionValid911(original) /\ InstructionTechniqueValid911(bad) /\ InstructionSourceFlow911(bad) /\ bad.units[1].count=2 /\ Len(bad.groups[1].nodes)=3 /\ ~InstructionPartitionValid911(bad) IdentifyingInstructionsChecks911 == /\ CapturedDefinitionContinuationRepairChecks911 /\ ConsumedEmptyEntryRepairChecks911 /\ DelayedOrdinaryRouteRepairChecks911 /\ PerCardCountJoinRepairChecks911 /\ RootBranchShortPathChecks911 /\ RootBranchLongPathChecks911 /\ RootBranchSelectedEdgeChecks911 /\ RootBranchCompletionGuardChecks911 /\ RootBranchActualChoiceChecks911 /\ RootBranchRemovedChoiceChecks911 /\ RootBranchProfileReplayChecks911 /\ RootBranchPendingBoundaryChecks911 /\ RootBranchEarlyEntryChecks911 /\ RootBranchDetachedSourceChecks911 /\ RootBranchReturnCompletionChecks911 /\ SearchProtocolChecks911 /\ SearchRecognitionChecks911 /\ SearchExampleFamily041AtomicChecks911 /\ SearchReactionDrainChecks911 /\ SearchRandomCohortChecks911 /\ Specimen0015VisibilityProcedureChecks911 /\ Specimen0015VisibilityBoundaryChecks911 /\ Specimen0015LookGrantScopeChecks911 /\ Specimen0015LookLifetimeChecks911 /\ Specimen0015LookOwnerProfileChecks911 /\ Specimen0015LookObjectProfileChecks911 /\ Specimen0015LookSourceIndependenceChecks911 /\ Specimen0015LookExecutionProfileChecks911 /\ Specimen0015LookSourceTechniqueChecks911 /\ Specimen0015LookCurrentAuthorityChecks911 /\ Specimen0015LookAuthoritativeOwnerChecks911 /\ Specimen0015LookReplayChecks911 /\ Specimen0015LookWorldAndMetadataChecks911 /\ Specimen0015Full99LookPrefixChecks911 /\ Specimen0015LookPrivatePhaseChecks911 /\ Specimen0015LookCompleteProjectionChecks911 /\ Specimen0015LookFiniteDeckChecks911 /\ NormalizationNamedBaseChecks911 /\ NormalizationRepairRegressionChecks911 /\ NormalizationRemainingNamedChecks911 /\ NormalizationSpecimen0243MergeChecks911 /\ NormalizationExampleFamily057SlotChecks911 /\ NormalizationSpecimen0075ShuffleChecks911 /\ NormalizationSpecimen0068ChooserChecks911 /\ NormalizationOrderRegressionChecks911 /\ NormalizationPerCardMatrixChecks911 /\ NormalizationOmissionMatrixChecks911 /\ NormalizationPartitionCoverageChecks911 /\ NormalizationBranchMatrixChecks911 /\ NormalizationInternalSlotOrderChecks911 /\ NormalizationSearchPrimaryChecks911 /\ NormalizationNestedCostLabelsChecks911 /\ NormalizationSourceBindingChecks911 /\ NormalizationLegacyLocalContractChecks911 /\ NormalizationReachabilityContractChecks911 /\ PauseAllCausesChecks911 /\ PauseDrawActualStepChecks911 /\ PausePlayActualStepChecks911 /\ PauseOwnedReceiptChecks911 /\ PauseResumeBindingChecks911 /\ PauseReplayChecks911 /\ PausePendingChainChecks911 /\ PauseJournalFreshnessChecks911 /\ PauseWorkAndSuspensionChecks911 /\ PauseCostTransactionBindingChecks911 /\ PauseTraceTimingOwnershipChecks911 /\ PauseCannotFinishWhileChildCheckpointOpenChecks911 /\ PauseConcreteInspectionStepChecks911 /\ PauseOperationAndRequestChecks911 /\ PauseCrossCursorAndOperationReplayChecks911 /\ SourceSpecimen0015AdoptionChecks911 /\ SourceSpecimen0015AtomicChecks911 /\ SourceSpecimen0015ProfileChecks911 /\ SourceSpecimen0015CaptureChecks911 /\ SourceSpecimen0015ReplayChecks911 /\ SourceSpecimen0015SourceBoundChecks911 /\ SourceSpecimen0015GraphWitnessChecks911 /\ SourceProcessPlayNoDetachChecks911 /\ ConditionalGraphCaptureChecks911 /\ ConditionalGraphFirstReturnChecks911 /\ ConditionalGraphShortPathChecks911 /\ ConditionalGraphLongPathChecks911 /\ ConditionalGraphCapturedChoiceChecks911 /\ ConditionalGraphCapturedTurnChecks911 /\ ConditionalGraphUsedWorldChecks911 /\ ConditionalGraphHistoryRetentionChecks911 /\ ConditionalGraphReturnPublicationChecks911 /\ ConditionalGraphTerminalOrdinalChecks911 /\ ConditionalGraphFinishedAuthorityChecks911 /\ CallerPaidReturnChecks911 /\ CallerPlayReturnChecks911 /\ CallerMidItemInspectionReturnChecks911 /\ CallerNestedReturnChecks911 /\ CallerNestedActiveHistoryChecks911 /\ CallerPaidWorldAndRuntimeChecks911 /\ CallerPlayCapturedCohortChecks911 /\ SourceSpecimen0015WholeReturnChecks911 /\ SourceSpecimen0015ReturnReceiptChecks911 /\ SourceSpecimen0015HistoryChecks911 /\ SourceSpecimen0015NextReceiptChecks911 /\ SourceSpecimen0015RuntimeVisibilityChecks911 /\ SourceSpecimen0015CallerProvenanceChecks911 /\ NestedCostCheckpointChecks911 /\ NestedCostReceiptChecks911 /\ NestedCostCoLocationChecks911 /\ NestedCostDeclineEffectChecks911 /\ TimingStepKindChecks911 /\ TimingStepProvenanceChecks911 /\ LinkedAbilitySeparationChecks911 /\ TimingStepStaleLifetimeChecks911 /\ GraphSpecimen0105EntryChecks911 /\ GraphSpecimen0105ParentTurnChecks911 /\ GraphSpecimen0105ParentIdChecks911 /\ GraphSpecimen0105ParentConditionalChecks911 /\ GraphSpecimen0105ParentTurnUsesChecks911 /\ GraphSpecimen0105CurrentRelevanceChecks911 /\ LifetimeCarriedOutUseChecks911 /\ LifetimeOnceUsePointChecks911 /\ LifetimeNewTurnUseChecks911 /\ LifetimeUseBindingChecks911 /\ LifetimeStaticActualTerminalChecks911 /\ LifetimeDelayedTwoRowChecks911 /\ LifetimeDelayedReceiptChecks911 /\ LifetimeDelayedJournalBindingChecks911 /\ LifetimeDelayedCheckpointCleanupChecks911 /\ LifetimeStaticHistoryChecks911 /\ LifetimeCurrentUseHistoryChecks911 /\ LifetimeDetachedUseChecks911 /\ LifetimeDelayedExpiryObligationChecks911 /\ LifetimeUseCapturedOwnerChecks911 SimultaneousNumericChecks912 == /\ \A default \in {-2,0,4} : \A setValue \in {0,3} : \A up,down \in 0..2 : LET mods == {[id |-> 1,operation |-> "Set",value |-> setValue], [id |-> 2,operation |-> "Increase",value |-> up],[id |-> 3,operation |-> "SchemaAtom100",value |-> down]} IN NumericFinal912(default,mods).value=setValue+up-down /\ NumericFinal912(4,{[id |-> 1,operation |-> "Increase",value |-> 3],[id |-> 2,operation |-> "SchemaAtom100",value |-> 2]}).value=5 /\ NumericFinal912(4,{[id |-> 1,operation |-> "Set",value |-> 2],[id |-> 2,operation |-> "Set",value |-> 3]}).status="NormalizationRequired" /\ NumericFinal912(4,{[id |-> 1,operation |-> "Set",value |-> 2],[id |-> 2,operation |-> "Set",value |-> 2]}).value=2 /\ NumericFinal912(4,{[id |-> 1,operation |-> "Increase",value |-> 2],[id |-> 2,operation |-> "Increase",value |-> 2], [id |-> 3,operation |-> "SchemaAtom100",value |-> 1],[id |-> 4,operation |-> "SchemaAtom100",value |-> 1]}).value=6 SimultaneousSubtypeChecks912 == /\ \A printed \in BOOLEAN : \A adds,removes \in 0..3 : LET rows == [id \in 1..(adds+removes) |-> [id |-> id,subtype |-> "SchemaAtom024",amount |-> IF id<=adds THEN 1 ELSE -1]] contributions == {rows[id] : id \in DOMAIN rows} IN SubtypePresent912(IF printed THEN {"SchemaAtom024"} ELSE {},contributions,"SchemaAtom024")=((IF printed THEN 1 ELSE 0)+adds>removes) /\ SubtypePresent912({}, {[id |-> 1,subtype |-> "SchemaAtom024",amount |-> 1],[id |-> 2,subtype |-> "SchemaAtom024",amount |-> 1], [id |-> 3,subtype |-> "SchemaAtom024",amount |-> -1]},"SchemaAtom024") SimultaneousObjectFixture912(card,host) == [CardObject9(card,"Play",CardFacts9[card].kind#"Profile","Up") EXCEPT !.host=host, !.activated=CardFacts9[card].kind \in {"Facility","Barrier","Attachment"}] SimultaneousDefinitionFixture912(id,source,card) == LET syntax == [SyntaxFixture93(id,"Static",IF card="NoValue" THEN "SideA" ELSE CardFacts9[card].side, IF card="NoValue" THEN "Profile" ELSE CardFacts9[card].kind,<>) EXCEPT !.source=source] IN [syntax |-> syntax,activity |-> AbilityDefinition9(id,"Static",source,"Printed"),instructions |-> <<>>] SimultaneousEffectFixture912(id,object,card,query,action) == LET source == IF card="NoValue" THEN RuleAbilitySource9("StructuralSimultaneous912") ELSE ObjectAbilitySource9(object) definition == SimultaneousDefinitionFixture912(object*100,source,card) sha == IF card="NoValue" THEN "0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e" ELSE CardFacts9[card].sourceSHA lexemes == [tag |-> "NormalizedAbilityLexemes",definition |-> definition,source |-> source,card |-> card,sourceSHA |-> sha,mentions |-> Empty9, origin |-> [tag |-> "AbilityTextOrigin",recipientSource |-> source,provider |-> "Printed",card |-> card,sourceSHA |-> sha, rule |-> IF card="NoValue" THEN source.rule ELSE "NoValue"]] IN [id |-> id,provider |-> IF card="NoValue" THEN "Rule" ELSE "Static",source |-> source,card |-> card, sourceSHA |-> IF card="NoValue" THEN "0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e" ELSE CardFacts9[card].sourceSHA, definition |-> definition,lexemes |-> lexemes,query |-> query,action |-> action] SimultaneousPrintedFixture912(card,object) == LET subtypes == CASE card="Specimen0146" -> {"SchemaAtom110"} [] card="Specimen0012" -> {"Sentry","SchemaAtom024","SchemaAtom058"} [] card="Specimen0112" -> {"SchemaAtom171"} [] card="NeutralValue00011" -> {"CodeGate"} [] card="Specimen0262" -> {"SchemaAtom034"} [] card="Specimen0244" -> {"SchemaAtom049"} [] OTHER -> {"SchemaAtom062"} subs == CASE card="Specimen0146" \/ card="NeutralValue00011" -> {object*100+1} [] card="Specimen0012" -> {object*100+1,object*100+2,object*100+3} [] OTHER -> {} abilities == subs \cup {object*100} \cup (IF card="Specimen0112" THEN {object*100+1} ELSE IF card="NeutralValue00011" THEN {object*100+2} ELSE {}) IN [card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA,subtypes |-> subtypes,abilities |-> abilities, printedBarrierInstructions |-> subs,values |-> [key \in (IF CardFacts9[card].kind="Barrier" THEN {"Strength"} ELSE {}) |-> IF card="NeutralValue00011" THEN 3 ELSE 4]] SimultaneousWorldFixture912(objects,present,owner) == [LifetimeWorldFixture910 EXCEPT !.objects=objects,!.present=present,!.turn=TurnFixture92(owner),!.control=[traversal |-> NoTraversal6,phaseEndedIds |-> {}], !.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}] SimultaneousNamedFixture912(kind) == LET cards == IF kind="Specimen0135" THEN [id \in {1,2} |-> IF id=1 THEN "NeutralValue00011" ELSE "Specimen0112"] ELSE [id \in 1..(IF kind="ExampleFamily030NoSpecimen0112" THEN 3 ELSE 4) |-> CASE id=1 -> "Specimen0146" [] id=2 -> "Specimen0012" [] id=3 -> "Specimen0262" [] OTHER -> "Specimen0112"] objects == [id \in DOMAIN cards |-> SimultaneousObjectFixture912(cards[id],IF cards[id]="Specimen0112" THEN 1 ELSE 0)] printed == [id \in DOMAIN cards |-> SimultaneousPrintedFixture912(cards[id],id)] world == SimultaneousWorldFixture912(objects,UNION {printed[id].abilities : id \in DOMAIN printed},"SideB") authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) effects == IF kind="Specimen0135" THEN [id \in {1,2} |-> IF id=1 THEN SimultaneousEffectFixture912(1,1,"NeutralValue00011",[kind |-> "HostedTechniques"],[kind |-> "LoseAllAbilities"]) ELSE SimultaneousEffectFixture912(2,2,"Specimen0112",[kind |-> "Host"],[kind |-> "LoseExceptPrintedBarrierInstructions"])] ELSE [id \in IF kind="ExampleFamily030NoSpecimen0112" THEN {1,3} ELSE {1,3,4} |-> CASE id=1 -> SimultaneousEffectFixture912(1,1,"Specimen0146",[kind |-> "Self"],[kind |-> "CopyItemActivatedBarrierSubtypes"]) [] id=3 -> SimultaneousEffectFixture912(3,3,"Specimen0262",[kind |-> "ItemActivatedSubtype",subtype |-> "SchemaAtom024"], [kind |-> "GrantAbility",ability |-> 3001,placement |-> "BeforeOtherBarrierInstructions"]) [] OTHER -> SimultaneousEffectFixture912(4,4,"Specimen0112",[kind |-> "Host"],[kind |-> "LoseExceptPrintedBarrierInstructions"])] start == NewSimultaneousEvaluation912(authority.current,printed,effects,lifetimes) IN [world |-> authority.current,printed |-> printed,effects |-> effects,authority |-> authority,lifetimes |-> lifetimes,start |-> start] SimultaneousStepFixture912(s,id) == LET view == SimultaneousView912(s,id) receipt == [tag |-> "AppliedCharacteristicEffect",worldId |-> s.world.id,effect |-> id,source |-> s.effects[id].source, before |-> s.chars,view |-> view,dependencies |-> SimultaneousDependencies912(s)] preview == SimultaneousPreview912(s,id) after == [preview EXCEPT !.waiting=@ \ {id},!.applied=IF view.enabled THEN Append(@,id) ELSE @, !.skipped=IF view.enabled THEN @ ELSE @ \cup {id},!.trace=Append(@,receipt)] IN [receipt |-> receipt,after |-> after] SimultaneousStepValid912(s,id,f) == ApplySimultaneousEffect912(s,f.after,id,f.receipt) SimultaneousExampleFamily030DependenciesChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") first == SimultaneousStepFixture912(f.start,1) bad == SimultaneousStepFixture912(f.start,3) SchemaAtom187 == SimultaneousStepFixture912(first.after,3) IN /\ OpenSimultaneousEvaluation912(f.start,f.world,f.printed,f.effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousEligible912(f.start)={1} /\ [dependent |-> 3,prerequisite |-> 1] \in SimultaneousRawDependencies912(f.start) /\ ~SimultaneousStepValid912(f.start,3,bad) /\ SimultaneousStepValid912(f.start,1,first) /\ SimultaneousStepValid912(first.after,3,SchemaAtom187) /\ "SchemaAtom024" \in first.after.chars[1].subtypes /\ 3001 \in SchemaAtom187.after.chars[1].abilities /\ 3001 \in SchemaAtom187.after.chars[2].abilities /\ first.after.effects=f.effects /\ SchemaAtom187.after.waiting={} /\ SchemaAtom187.after.applied= <<1,3>> SimultaneousExampleFamily030Specimen0112Checks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030") Specimen0112 == SimultaneousStepFixture912(f.start,4) exampleFamily074 == SimultaneousStepFixture912(Specimen0112.after,3) skip == SimultaneousStepFixture912(exampleFamily074.after,1) skipFirst == SimultaneousStepFixture912(Specimen0112.after,1) exampleFamily074Last == SimultaneousStepFixture912(skipFirst.after,3) IN /\ OpenSimultaneousEvaluation912(f.start,f.world,f.printed,f.effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousEligible912(f.start)={4} /\ SimultaneousStepValid912(f.start,4,Specimen0112) /\ 100 \notin Specimen0112.after.chars[1].abilities /\ Specimen0112.after.chars[1].abilities={101} /\ Specimen0112.after.chars[1].cannotGain /\ SimultaneousEligible912(Specimen0112.after)={1,3} /\ SimultaneousStepValid912(Specimen0112.after,3,exampleFamily074) /\ SimultaneousStepValid912(exampleFamily074.after,1,skip) /\ SimultaneousStepValid912(Specimen0112.after,1,skipFirst) /\ SimultaneousStepValid912(skipFirst.after,3,exampleFamily074Last) /\ skip.after.chars=exampleFamily074Last.after.chars /\ skip.after.skipped={1} /\ skip.after.applied= <<4,3>> /\ skip.after.chars[1].subtypes={"SchemaAtom110"} /\ 3001 \notin skip.after.chars[1].abilities /\ 3001 \in skip.after.chars[2].abilities /\ {201,202,203,3001} \subseteq skip.after.chars[2].abilities SimultaneousSpecimen0135CycleChecks912 == LET f == SimultaneousNamedFixture912("Specimen0135") raw == SimultaneousRawDependencies912(f.start) Specimen0112 == SimultaneousStepFixture912(f.start,2) skip == SimultaneousStepFixture912(Specimen0112.after,1) wrong == SimultaneousStepFixture912(f.start,1) IN /\ OpenSimultaneousEvaluation912(f.start,f.world,f.printed,f.effects,f.lifetimes,f.authority,CardFacts9) /\ raw={[dependent |-> 1,prerequisite |-> 2],[dependent |-> 2,prerequisite |-> 1]} /\ SimultaneousIndependent912(f.start,raw)={} /\ SimultaneousEligible912(f.start)={2} /\ ~SimultaneousStepValid912(f.start,1,wrong) /\ SimultaneousStepValid912(f.start,2,Specimen0112) /\ SimultaneousStepValid912(Specimen0112.after,1,skip) /\ skip.after.chars[1].abilities={101} /\ skip.after.chars[1].cannotGain /\ skip.after.chars[2].abilities={200,201} /\ ~skip.after.chars[2].cannotGain /\ skip.after.skipped={1} /\ skip.after.applied= <<2>> SimultaneousRuleNumericFixture912(id,target,operation,value) == SimultaneousEffectFixture912(id,id,"NoValue",[kind |-> "Explicit",objects |-> {target}], [kind |-> "Numeric",attribute |-> "Strength",operation |-> operation,value |-> value]) SimultaneousWithEffectsFixture912(f,effects) == NewSimultaneousEvaluation912(f.world,f.printed,effects,f.lifetimes) SimultaneousNumericOrderChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [id \in {10,11,12} |-> SimultaneousRuleNumericFixture912(id,1, CASE id=10 -> "Set" [] id=11 -> "Increase" [] OTHER -> "SchemaAtom100", [kind |-> "Literal",value |-> CASE id=10 -> 2 [] id=11 -> 3 [] OTHER -> 1])] start == SimultaneousWithEffectsFixture912(f,effects) IN /\ OpenSimultaneousEvaluation912(start,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousEligible912(start)={10,11,12} /\ \A order \in {<<10,11,12>>,<<10,12,11>>,<<11,10,12>>,<<11,12,10>>,<<12,10,11>>,<<12,11,10>>} : LET a == SimultaneousStepFixture912(start,order[1]) b == SimultaneousStepFixture912(a.after,order[2]) c == SimultaneousStepFixture912(b.after,order[3]) IN /\ SimultaneousStepValid912(start,order[1],a) /\ SimultaneousStepValid912(a.after,order[2],b) /\ SimultaneousStepValid912(b.after,order[3],c) /\ c.after.chars[1].values["Strength"]=4 /\ c.after.waiting={} /\ DOMAIN c.after.outputs={10,11,12} /\ ~ApplySimultaneousEffect912(c.after,c.after,order[1],c.receipt) /\ start.chars[1].values["Strength"]=4 SimultaneousDynamicValueChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [id \in {10,11} |-> IF id=10 THEN SimultaneousRuleNumericFixture912(10,1,"Increase",[kind |-> "Literal",value |-> 1]) ELSE SimultaneousRuleNumericFixture912(11,2,"Increase",[kind |-> "Attribute",object |-> 1,attribute |-> "Strength"])] start == SimultaneousWithEffectsFixture912(f,effects) a == SimultaneousStepFixture912(start,10) b == SimultaneousStepFixture912(a.after,11) wrong == SimultaneousStepFixture912(start,11) IN /\ OpenSimultaneousEvaluation912(start,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousRawDependencies912(start)={[dependent |-> 11,prerequisite |-> 10]} /\ ~SimultaneousStepValid912(start,11,wrong) /\ SimultaneousStepValid912(start,10,a) /\ SimultaneousRawDependencies912(a.after)={} /\ SimultaneousStepValid912(a.after,11,b) /\ b.after.chars[1].values["Strength"]=5 /\ b.after.chars[2].values["Strength"]=9 /\ ~ApplySimultaneousEffect912(a.after,b.after,11,[b.receipt EXCEPT !.dependencies=SimultaneousRawDependencies912(start)]) SimultaneousHostedOnlyInCycleChecks912 == LET f == SimultaneousNamedFixture912("Specimen0135") independent == SimultaneousRuleNumericFixture912(9,1,"Increase",[kind |-> "Literal",value |-> 1]) effects == ReplacementOverlay99(f.effects,[id \in {9} |-> independent]) start == SimultaneousWithEffectsFixture912(f,effects) a == SimultaneousStepFixture912(start,9) bad == SimultaneousStepFixture912(start,2) IN /\ OpenSimultaneousEvaluation912(start,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousIndependent912(start,SimultaneousRawDependencies912(start))={9} /\ SimultaneousEligible912(start)={9} /\ ~SimultaneousStepValid912(start,2,bad) /\ SimultaneousStepValid912(start,9,a) /\ SimultaneousEligible912(a.after)={2} SimultaneousSetterBoundaryChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [id \in {10,11} |-> SimultaneousRuleNumericFixture912(id,1,"Set",[kind |-> "Literal",value |-> id-8])] start == SimultaneousWithEffectsFixture912(f,effects) a == SimultaneousStepFixture912(start,10) b == SimultaneousStepFixture912(a.after,11) IN /\ SimultaneousStepValid912(start,10,a) /\ SimultaneousEligible912(a.after)={11} /\ SimultaneousBoundary912(b.after)="SetterNormalizationRequired" /\ ~SimultaneousStepValid912(a.after,11,b) SimultaneousResidualCycleChecks912 == LET objects == [id \in {1,2} |-> SimultaneousObjectFixture912(IF id=1 THEN "Specimen0146" ELSE "NeutralValue00011",0)] printed == [id \in {1,2} |-> SimultaneousPrintedFixture912(IF id=1 THEN "Specimen0146" ELSE "NeutralValue00011",id)] world == SimultaneousWorldFixture912(objects,UNION {printed[id].abilities : id \in DOMAIN printed},"SideB") authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) effects == [id \in {10,11} |-> SimultaneousRuleNumericFixture912(id,IF id=10 THEN 1 ELSE 2,"Set", [kind |-> "Attribute",object |-> IF id=10 THEN 2 ELSE 1,attribute |-> "Strength"])] start == NewSimultaneousEvaluation912(authority.current,printed,effects,lifetimes) bad == SimultaneousStepFixture912(start,10) IN /\ OpenSimultaneousEvaluation912(start,authority.current,printed,effects,lifetimes,authority,CardFacts9) /\ SimultaneousIndependent912(start,SimultaneousRawDependencies912(start))={} /\ SimultaneousEligible912(start)={} /\ SimultaneousBoundary912(start)="ResidualCycleNormalizationRequired" /\ ~SimultaneousStepValid912(start,10,bad) SimultaneousChoiceRowsFixture912(exampleFamily009) == LET key == [procedure |-> "Damage",instance |-> 9001,decision |-> "RetireBHandCard",ordinal |-> 1] IN [id \in IF exampleFamily009 THEN {1,2} ELSE {2} |-> LET card == IF id=1 THEN "Specimen0051" ELSE "Specimen0244" source == ObjectAbilitySource9(id) chooser == IF id=1 THEN "SideA" ELSE "SideB" remainder == IF id=1 THEN {[kind |-> "Look",viewer |-> "SideA",zone |-> "SideBHand",objects |-> {20,21}]} ELSE {} grant == [tag |-> "ResolvedOnceChoiceGrant",occurrence |-> id,decision |-> key,source |-> source, card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA,chooser |-> chooser,options |-> {20,21},remainder |-> remainder] IN [tag |-> "SourceBoundOnceChoiceEffect",occurrence |-> id,key |-> key,source |-> source,card |-> card, sourceSHA |-> CardFacts9[card].sourceSHA,chooser |-> chooser,options |-> {20,21},remainder |-> remainder,grant |-> grant]] SimultaneousChoiceFixture912(owner,exampleFamily009,chooser) == LET objects == [id \in {1,2,20,21} |-> IF id<=2 THEN SimultaneousObjectFixture912( IF id=1 THEN "Specimen0051" ELSE "Specimen0244",0) ELSE CardObject9(IF id=20 THEN "Specimen0070" ELSE "Specimen0115","SideBHand",FALSE,"Down")] world == SimultaneousWorldFixture912(objects,{},owner) authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) rows == SimultaneousChoiceRowsFixture912(exampleFamily009) key == rows[2].key choice == [player |-> chooser,selection |-> 20] package == [tag |-> "AuthoritativeResolvedChoiceGrants",worldId |-> world.id,turnId |-> world.turn.id,decision |-> key,effects |-> rows] receipt == [tag |-> "OnceOnlySimultaneousChoice",key |-> key,turnId |-> world.turn.id,active |-> owner, chooser |-> chooser,choice |-> 20,remainder |-> [id \in DOMAIN rows |-> rows[id].remainder],sources |-> rows] after == [id \in {key} |-> receipt] IN [world |-> authority.current,authority |-> authority,lifetimes |-> lifetimes,rows |-> rows,key |-> key, choice |-> choice,package |-> package,receipt |-> receipt,after |-> after] SimultaneousChoiceValid912(f) == ResolveCurrentOnceChoice912(Empty9,f.after,f.key,f.rows,f.world,f.lifetimes,f.authority,f.package,f.choice,f.receipt,CardFacts9) SimultaneousExampleFamily009ExampleFamily067Checks912 == /\ \A owner \in SetupPlayers : LET f == SimultaneousChoiceFixture912(owner,TRUE,owner) wrong == SimultaneousChoiceFixture912(owner,TRUE,TurnOtherPlayer5(owner)) IN /\ SimultaneousChoiceValid912(f) /\ ~SimultaneousChoiceValid912(wrong) /\ f.receipt.chooser=owner /\ f.receipt.remainder[1]={[kind |-> "Look",viewer |-> "SideA",zone |-> "SideBHand",objects |-> {20,21}]} /\ f.receipt.remainder[2]={} /\ ~ResolveCurrentOnceChoice912(f.after,f.after,f.key,f.rows,f.world,f.lifetimes,f.authority,f.package,f.choice,f.receipt,CardFacts9) /\ LET f == SimultaneousChoiceFixture912("SideA",FALSE,"SideB") IN /\ SimultaneousChoiceValid912(f) /\ DOMAIN f.receipt.remainder={2} /\ f.receipt.remainder[2]={} /\ f.receipt.chooser#f.world.turn.owner SimultaneousChoiceBindingChecks912 == LET f == SimultaneousChoiceFixture912("SideB",TRUE,"SideB") foreignRows == [f.rows EXCEPT ![1].sourceSHA="ForeignExampleFamily009SHA912",![1].grant.sourceSHA="ForeignExampleFamily009SHA912"] foreignPackage == [f.package EXCEPT !.effects=foreignRows] foreignReceipt == [f.receipt EXCEPT !.sources=foreignRows] foreignAfter == [id \in {f.key} |-> foreignReceipt] invalidChoice == [f.choice EXCEPT !.selection=22] invalidReceipt == [f.receipt EXCEPT !.choice=22] invalidAfter == [id \in {f.key} |-> invalidReceipt] truncatedRows == [f.rows EXCEPT ![1].remainder={}] truncatedPackage == [f.package EXCEPT !.effects=truncatedRows] truncatedReceipt == [f.receipt EXCEPT !.sources=truncatedRows,!.remainder=[id \in DOMAIN truncatedRows |-> truncatedRows[id].remainder]] truncatedAfter == [id \in {f.key} |-> truncatedReceipt] IN /\ SimultaneousChoiceValid912(f) /\ ~ResolveCurrentOnceChoice912(Empty9,foreignAfter,f.key,foreignRows,f.world,f.lifetimes,f.authority,foreignPackage,f.choice,foreignReceipt,CardFacts9) /\ \A bad \in {[f.package EXCEPT !.worldId=2],[f.package EXCEPT !.turnId=999],[f.package EXCEPT !.decision.instance=999], [f.package EXCEPT !.effects=[id \in {2} |-> f.rows[2]]]} : ~ResolveCurrentOnceChoice912(Empty9,f.after,f.key,f.rows,f.world,f.lifetimes,f.authority,bad,f.choice,f.receipt,CardFacts9) /\ ~ResolveCurrentOnceChoice912(Empty9,invalidAfter,f.key,f.rows,f.world,f.lifetimes,f.authority,f.package, invalidChoice,invalidReceipt,CardFacts9) /\ ~ResolveCurrentOnceChoice912(Empty9,truncatedAfter,f.key,truncatedRows,f.world,f.lifetimes,f.authority,truncatedPackage, f.choice,truncatedReceipt,CardFacts9) SimultaneousSourceAndReceiptChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [f.effects EXCEPT ![1].sourceSHA="ForeignExampleFamily030SHA912"] badStart == SimultaneousWithEffectsFixture912(f,effects) unknown == [f.effects EXCEPT ![1].action.kind="UnknownCompilerOperation"] a == SimultaneousStepFixture912(f.start,1) foreignWorld == [f.world EXCEPT !.turn=TurnFixture92("SideA")] IN /\ OpenSimultaneousEvaluation912(f.start,f.world,f.printed,f.effects,f.lifetimes,f.authority,CardFacts9) /\ ~OpenSimultaneousEvaluation912(badStart,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ ~OpenSimultaneousEvaluation912(SimultaneousWithEffectsFixture912(f,unknown),f.world,f.printed,unknown,f.lifetimes,f.authority,CardFacts9) /\ ~OpenSimultaneousEvaluation912(NewSimultaneousEvaluation912(foreignWorld,f.printed,f.effects,f.lifetimes),foreignWorld,f.printed, f.effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousStepValid912(f.start,1,a) /\ \A bad \in {[a.receipt EXCEPT !.worldId=2],[a.receipt EXCEPT !.source=ObjectAbilitySource9(2)], [a.receipt EXCEPT !.view.targets={}],[a.receipt EXCEPT !.dependencies={}]} : ~ApplySimultaneousEffect912(f.start,[a.after EXCEPT !.trace=Append(f.start.trace,bad)],1,bad) SimultaneousInactiveStaticChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") world == [f.world EXCEPT !.objects[3].activated=FALSE] authority == NewLifetimeAuthority910(world) lifetimes == ObservedWithFrontier910(NewLingeringRegistry910,authority,1) start == NewSimultaneousEvaluation912(authority.current,f.printed,f.effects,lifetimes) skip == SimultaneousStepFixture912(start,3) IN /\ OpenSimultaneousEvaluation912(start,authority.current,f.printed,f.effects,lifetimes,authority,CardFacts9) /\ ~SimultaneousView912(start,3).enabled /\ SimultaneousView912(start,3).actions={} /\ SimultaneousStepValid912(start,3,skip) /\ skip.after.skipped={3} /\ 3001 \notin skip.after.chars[1].abilities /\ 3001 \notin skip.after.chars[2].abilities SimultaneousSubtypeProvenanceChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [id \in {10,11,12} |-> SimultaneousEffectFixture912(id,id,"NoValue",[kind |-> "Explicit",objects |-> {1}], [kind |-> "Subtype",subtype |-> "SchemaAtom024",amount |-> IF id=12 THEN -1 ELSE 1])] start == SimultaneousWithEffectsFixture912(f,effects) a == SimultaneousStepFixture912(start,10) b == SimultaneousStepFixture912(a.after,11) c == SimultaneousStepFixture912(b.after,12) fewer == [id \in {10,12} |-> effects[id]] fresh == SimultaneousWithEffectsFixture912(f,fewer) d == SimultaneousStepFixture912(fresh,10) e == SimultaneousStepFixture912(d.after,12) IN /\ OpenSimultaneousEvaluation912(start,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ SimultaneousStepValid912(start,10,a) /\ SimultaneousStepValid912(a.after,11,b) /\ SimultaneousStepValid912(b.after,12,c) /\ "SchemaAtom024" \in c.after.chars[1].subtypes /\ DOMAIN c.after.outputs={10,11,12} /\ SimultaneousStepValid912(fresh,10,d) /\ SimultaneousStepValid912(d.after,12,e) /\ "SchemaAtom024" \notin e.after.chars[1].subtypes /\ fresh.chars=CharacteristicInitial912(f.printed) SimultaneousLingeringProviderChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") source == RuleAbilitySource9("StructuralSimultaneous912") duration == [kind |-> "Timing",ref |-> TimingRef9("Turn",f.world.turn.id)] blueprint == [BlueprintFixture910("Strength",duration) EXCEPT !.source=source,!.originKind="Rule",!.target=1,!.value=1] c == LifetimeContextFixture910(source) effect == NewLingeringEffect910(9900,blueprint,c.context,1,f.world) lifetimes == [f.lifetimes EXCEPT !.effects=[id \in {9900} |-> effect],!.usedEffects={9900}] row == ReplacementOverlay99([SimultaneousRuleNumericFixture912(10,1,"Increase",[kind |-> "Literal",value |-> 1]) EXCEPT !.provider="Lingering"], [lifetimeId |-> 9900]) rows == [id \in {10} |-> row] start == NewSimultaneousEvaluation912(f.world,f.printed,rows,lifetimes) a == SimultaneousStepFixture912(start,10) expired == [lifetimes EXCEPT !.effects[9900].status="Expired"] inactive == NewSimultaneousEvaluation912(f.world,f.printed,rows,expired) skip == SimultaneousStepFixture912(inactive,10) IN /\ OpenSimultaneousEvaluation912(start,f.world,f.printed,rows,lifetimes,f.authority,CardFacts9) /\ SimultaneousView912(start,10).enabled /\ SimultaneousStepValid912(start,10,a) /\ a.after.chars[1].values["Strength"]=5 /\ ~SimultaneousView912(inactive,10).enabled /\ SimultaneousStepValid912(inactive,10,skip) /\ skip.after.skipped={10} /\ \A bad \in {[row EXCEPT !.action.value.value=2],[row EXCEPT !.query.objects={2}]} : LET badRows == [id \in {10} |-> bad] IN ~OpenSimultaneousEvaluation912(NewSimultaneousEvaluation912(f.world,f.printed,badRows,lifetimes),f.world,f.printed, badRows,lifetimes,f.authority,CardFacts9) SimultaneousTextOriginChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [f.effects EXCEPT ![1].lexemes.origin.recipientSource=ObjectAbilitySource9(2)] bad == SimultaneousWithEffectsFixture912(f,effects) printed == [f.printed EXCEPT ![1].sourceSHA="ForeignPrintedSHA912"] IN /\ OpenSimultaneousEvaluation912(f.start,f.world,f.printed,f.effects,f.lifetimes,f.authority,CardFacts9) /\ ~OpenSimultaneousEvaluation912(bad,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ ~OpenSimultaneousEvaluation912(NewSimultaneousEvaluation912(f.world,printed,f.effects,f.lifetimes),f.world,printed, f.effects,f.lifetimes,f.authority,CardFacts9) SimultaneousCannotGainChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030") grant == SimultaneousEffectFixture912(9,9,"NoValue",[kind |-> "Explicit",objects |-> {1}], [kind |-> "GrantAbility",ability |-> 9999,placement |-> "AfterOtherBarrierInstructions"]) effects == ReplacementOverlay99(f.effects,[id \in {9} |-> grant]) start == SimultaneousWithEffectsFixture912(f,effects) Specimen0112 == SimultaneousStepFixture912(start,4) applied == SimultaneousStepFixture912(Specimen0112.after,9) IN /\ OpenSimultaneousEvaluation912(start,f.world,f.printed,effects,f.lifetimes,f.authority,CardFacts9) /\ [dependent |-> 9,prerequisite |-> 4] \in SimultaneousRawDependencies912(start) /\ SimultaneousStepValid912(start,4,Specimen0112) /\ Specimen0112.after.chars[1].cannotGain /\ SimultaneousView912(Specimen0112.after,9).actions={} /\ SimultaneousStepValid912(Specimen0112.after,9,applied) /\ 9999 \notin applied.after.chars[1].abilities /\ applied.after.chars[1].abilities={101} SimultaneousCompletionReceiptFixture912(s) == [tag |-> "CompleteCharacteristicProjection",worldId |-> s.world.id,printed |-> s.printed,effects |-> s.effects, characteristics |-> s.chars,applied |-> s.applied,skipped |-> s.skipped,trace |-> s.trace] SimultaneousCompletionChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030") a == SimultaneousStepFixture912(f.start,4) b == SimultaneousStepFixture912(a.after,3) c == SimultaneousStepFixture912(b.after,1) result == SimultaneousCompletionReceiptFixture912(c.after) foreignWorld == [f.world EXCEPT !.id=2] foreignAuthority == NewLifetimeAuthority910(foreignWorld) foreignLifetimes == ObservedWithFrontier910(NewLingeringRegistry910,foreignAuthority,1) IN /\ SimultaneousStepValid912(f.start,4,a) /\ SimultaneousStepValid912(a.after,3,b) /\ SimultaneousStepValid912(b.after,1,c) /\ CompleteSimultaneousEvaluation912(c.after,f.lifetimes,f.authority,result) /\ ~CompleteSimultaneousEvaluation912(f.start,f.lifetimes,f.authority,SimultaneousCompletionReceiptFixture912(f.start)) /\ ~CompleteSimultaneousEvaluation912(c.after,foreignLifetimes,foreignAuthority,result) /\ ~CompleteSimultaneousEvaluation912(c.after,f.lifetimes,f.authority,[result EXCEPT !.characteristics[1].abilities=@ \cup {9999}]) SimultaneousUnresolvedCompletionChecks912 == LET f == SimultaneousNamedFixture912("ExampleFamily030NoSpecimen0112") effects == [id \in {10,11} |-> SimultaneousRuleNumericFixture912(id,1,"Set",[kind |-> "Literal",value |-> id-8])] start == SimultaneousWithEffectsFixture912(f,effects) a == SimultaneousStepFixture912(start,10) b == SimultaneousStepFixture912(a.after,11) result == SimultaneousCompletionReceiptFixture912(b.after) IN /\ b.after.waiting={} /\ DOMAIN b.after.outputs=DOMAIN effects /\ SubIds6(b.after.applied)=DOMAIN effects /\ b.after.skipped={} /\ ~CompleteSimultaneousEvaluation912(b.after,f.lifetimes,f.authority,result) QuantityPartFixture912(id,operation,basePresent,base,unit,specifications) == [id |-> id,operation |-> operation,basePresent |-> basePresent,base |-> base,unit |-> unit, specifications |-> specifications,arguments |-> [location |-> "SideBDeck"],baseArguments |-> [location |-> "SideBDeck"]] QuantityFixture912(card,operation,count,basePresent,base,unit) == LET source == ObjectAbilitySource9(1) plan == OpenInstruction93(14001,"Ability",14000,source,"Play",1,"NoValue",<<"QuantifiedSourceEffect">>,FALSE) reference == InstructionWindowRef93(plan) world == [id |-> 14010,objects |-> [id \in {1} |-> CardObject9(card,"Play",FALSE,"Up")],actionPoints |-> [p \in SetupPlayers |-> IF p="SideB" THEN count ELSE 3]] part == QuantityPartFixture912(1,operation,basePresent,base,unit,[actor |-> CardFacts9[card].side,damageType |-> "HarmClassA",location |-> "SideBBHand"]) origin == [tag |-> "FixedAbilitySourceObservation",source |-> source,card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA] g == [tag |-> "NormalizedQuantityGroup",id |-> 14002,mode |-> "Count",count |-> count,partOrder |-> <<1>>,parts |-> [id \in {1} |-> part], instruction |-> reference,source |-> source,snapshotId |-> world.id,origin |-> origin,card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA] IN [world |-> world,plan |-> plan,reference |-> reference,g |-> g,emissions |-> QuantityEmissions912(g)] QuantityStructuralFixture912(operation,count,basePresent,base,unit) == LET b == QuantityFixture912("Specimen0202",operation,count,basePresent,base,unit) source == RuleAbilitySource9("StructuralQuantity912") plan == OpenInstruction93(14001,"Rule",0,source,"NoValue",0,"StructuralQuantity912",<<"StructuralQuantity">>,FALSE) reference == InstructionWindowRef93(plan) origin == [tag |-> "FixedAbilitySourceObservation",source |-> source,card |-> "Rule", sourceSHA |-> "0186148ecd6da8170b6555aa90d3f0115a8d5150d807078b75ac2339a2a1421e"] g == [b.g EXCEPT !.instruction=reference,!.source=source,!.card="Rule",!.sourceSHA=origin.sourceSHA,!.origin=origin] world == [id |-> b.world.id,objects |-> Empty9] IN [world |-> world,plan |-> plan,reference |-> reference,g |-> g,emissions |-> QuantityEmissions912(g)] QuantitySpecimen0202Checks912 == LET f == QuantityFixture912("Specimen0202","Draw",3,FALSE,0,1) IN /\ NormalizeQuantityGroup912(f.g,f.reference,f.world,CardFacts9,f.emissions) /\ f.g.count=f.world.actionPoints["SideB"] /\ Len(f.emissions)=1 /\ f.emissions[1].value=3 /\ f.emissions[1].aggregated /\ f.emissions[1].instruction=f.reference /\ f.emissions[1].source=ObjectAbilitySource9(1) /\ f.emissions[1].specifications=f.g.parts[1].specifications /\ ~NormalizeQuantityGroup912([f.g EXCEPT !.sourceSHA="ForgedSpecimen0202Source912"],f.reference,f.world,CardFacts9,f.emissions) /\ ~NormalizeQuantityGroup912([f.g EXCEPT !.snapshotId=14009],f.reference,f.world,CardFacts9,f.emissions) QuantitySuppressionChecks912 == /\ \A count \in -3..3 : LET f == QuantityStructuralFixture912("Damage",count,TRUE,2,1) IN /\ NormalizeQuantityGroup912(f.g,f.reference,f.world,CardFacts9,f.emissions) /\ Len(f.emissions)=IF 2+count>0 THEN 1 ELSE 0 /\ 2+count>0 => f.emissions[1].value=2+count /\ LET f == QuantityStructuralFixture912("Draw",0,FALSE,0,1) IN f.emissions= <<>> QuantityIndependentPartsChecks912 == LET f == QuantityStructuralFixture912("Draw",0,FALSE,0,1) positive == QuantityPartFixture912(2,"GainResourceUnits",TRUE,2,0,[actor |-> "SideB",purpose |-> "SeparatePositivePart"]) g == [f.g EXCEPT !.partOrder= <<1,2>>,!.parts=ReplacementOverlay99(@,[id \in {2} |-> positive])] emissions == QuantityEmissions912(g) IN /\ NormalizeQuantityGroup912(g,f.reference,f.world,CardFacts9,emissions) /\ Len(emissions)=1 /\ emissions[1].part=2 /\ emissions[1].value=2 QuantityWhitelistChecks912 == /\ \A operation \in AggregatedOperations912 : LET f == QuantityStructuralFixture912(operation,3,FALSE,0,1) IN /\ QuantityGroupShape912(f.g) /\ QuantityAggregates912(f.g) /\ Len(f.emissions)=1 /\ f.emissions[1].value=3 /\ \A operation \in {"Deploy","Deactivation","AddCounters","GenericMove","ShuffleDeck","ReturnToHand"} : LET f == QuantityStructuralFixture912(operation,3,FALSE,0,1) IN /\ ~QuantityAggregates912(f.g) /\ Len(f.emissions)=3 /\ \A i \in 1..3 : f.emissions[i].value=1 /\ ~f.emissions[i].aggregated /\ f.emissions[i].occurrence=i QuantitySpecimen0195Fixture912 == LET f == QuantityFixture912("Specimen0195","GainResourceUnits",2,FALSE,0,1) barrierCard == [id \in {2,3} |-> [CardObject9(IF id=2 THEN "Specimen0245" ELSE "Specimen0204","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] world == ReplacementOverlay99([f.world EXCEPT !.objects=ReplacementOverlay99(@,barrierCard)], [printedActivationCosts |-> [id \in {2,3} |-> IF id=2 THEN 1 ELSE 4]]) resourceUnits == ReplacementOverlay99(f.g.parts[1],[units |-> world.printedActivationCosts,arguments |-> [id \in {2,3} |-> [chosenBarrier |-> id]]]) deactivation == ReplacementOverlay99(QuantityPartFixture912(2,"Deactivation",FALSE,0,1,[actor |-> "SideA",purpose |-> "SameForEach"]), [units |-> [id \in {2,3} |-> 1],arguments |-> [id \in {2,3} |-> [chosenBarrier |-> id]]]) g == ReplacementOverlay99(f.g,[mode |-> "Items",items |-> <<2,3>>,partOrder |-> <<1,2>>,parts |-> [id \in {1,2} |-> IF id=1 THEN resourceUnits ELSE deactivation]]) IN [f |-> f,world |-> world,g |-> g,emissions |-> QuantityEmissions912(g)] QuantityMixedSpecimen0195Checks912 == LET f == QuantitySpecimen0195Fixture912 IN /\ NormalizeQuantityGroup912(f.g,f.f.reference,f.world,CardFacts9,f.emissions) /\ ~QuantityAggregates912(f.g) /\ Len(f.emissions)=4 /\ f.emissions[1].operation="GainResourceUnits" /\ f.emissions[1].value=1 /\ f.emissions[2].operation="Deactivation" /\ f.emissions[2].arguments.chosenBarrier=2 /\ f.emissions[3].operation="GainResourceUnits" /\ f.emissions[3].value=4 /\ f.emissions[4].operation="Deactivation" /\ f.emissions[4].arguments.chosenBarrier=3 /\ \A i \in 1..4 : ~f.emissions[i].aggregated QuantityNonaggregatedZeroChecks912 == LET f == QuantitySpecimen0195Fixture912 g == [f.g EXCEPT !.parts[1].units[2]=0] effects == QuantityEmissions912(g) IN /\ QuantityGroupShape912(g) /\ ~QuantityAggregates912(g) /\ Len(effects)=4 /\ effects[1].operation="GainResourceUnits" /\ effects[1].value=0 QuantityVacuousAllChecks912 == LET e == OpenEncounter6(14500,2,2,FALSE,"traversal",<<>>) begun == [e EXCEPT !.stage="BeginReactions"] paid == WithFullySuppressInstruction6([begun EXCEPT !.stage="Paid",!.paidReached=TRUE]) aborted == [begun EXCEPT !.aborted=TRUE] events == NewFullySuppressInstructionEvents6(begun,paid) IN /\ ~EncounterAllSubsSatisfied912(e) /\ ~EncounterAllSubsSatisfied912(begun) /\ BeginEncounter6(e,begun,TRUE,{[tag |-> "EncounterBarrier",encounterId |-> e.id,barrierCard |-> 2,traversalId |-> 2]}) /\ BeginEncounterPaid6(begun,paid,TRUE,events) /\ EncounterAllSubsSatisfied912(paid) /\ paid.fullyBarrierInstructionSuppressed /\ Cardinality(events)=1 /\ ~EncounterAllSubsSatisfied912(aborted) /\ ~BeginEncounterPaid6(aborted,paid,TRUE,events) /\ ~AllSetSatisfied912({1},{},[structure |-> TimingRef9("TraversalPhase",e.id),ordinal |-> 1],[structure |-> TimingRef9("TraversalPhase",e.id),ordinal |-> 1]) QuantityXFixture912 == LET syntax == SyntaxFixture93(14501,"Static","SideA","Barrier",BaseUnits93("Static")) d == [syntax |-> syntax,activity |-> AbilityDefinition9(14501,"Static",syntax.source,"Printed")] objects == [id \in {1,2,3} |-> IF id \in {1,2} THEN [CardObject9(IF id=1 THEN "Specimen0232" ELSE "Specimen0245","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.area="Protecting",!.targetSite="auxiliarySite1",!.targetSiteKind="SchemaAtom132"] ELSE [CardObject9("Specimen0269","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.area="Root",!.targetSite="auxiliarySite1",!.targetSiteKind="SchemaAtom132"]] world == [id |-> 14502,objects |-> objects,cardActivity |-> [id \in DOMAIN objects |-> ConditionalCardActivityFixture96(objects[id])],gameStarted |-> TRUE,present |-> {14501},activity |-> ActivityContext9,points |-> [p \in SetupPlayers |-> 0]] evaluation == Specimen0232XEvaluation912(d,world) afterObjects == [id \in {2,3,11} |-> IF id=11 THEN [CardObject9("Specimen0232","SideADiscard",FALSE,"Up") EXCEPT !.loc="Discard"] ELSE objects[id]] afterWorld == [world EXCEPT !.id=14503,!.objects=afterObjects,!.cardActivity=[id \in DOMAIN afterObjects |-> ConditionalCardActivityFixture96(afterObjects[id])]] afterEvaluation == Specimen0232XEvaluation912(d,afterWorld) capturedBarrierInstruction == [OpenAbilityResolution9(14510,"BarrierInstruction",ObjectAbilitySource9(1),"Play",<<14511>>,14500) EXCEPT !.phase="Resolving",!.firstImminent=TRUE,!.detached=TRUE] exampleFamily027Objects == ReplacementOverlay99(objects,[id \in {4} |-> [CardObject9("Specimen0112","Play",TRUE,"Up") EXCEPT !.host=1]]) exampleFamily027Applied == [world EXCEPT !.id=14504,!.objects=exampleFamily027Objects,!.present={},!.cardActivity=[id \in DOMAIN exampleFamily027Objects |-> ConditionalCardActivityFixture96(exampleFamily027Objects[id])]] exampleFamily027Cause == [tag |-> "SourceBoundCharacteristicRemoval",card |-> "Specimen0112",sourceSHA |-> CardFacts9["Specimen0112"].sourceSHA, source |-> ObjectAbilitySource9(4),host |-> 1,removed |-> {14501}] exampleFamily079Selection == [tag |-> "CapturedExampleFamily079BarrierInstructionSelection",card |-> "Specimen0269",sourceSHA |-> CardFacts9["Specimen0269"].sourceSHA, source |-> ObjectAbilitySource9(3),donor |-> ObjectAbilitySource9(1),donorSHA |-> CardFacts9["Specimen0232"].sourceSHA,barrierInstruction |-> "EscalatingResourceContestX"] IN [d |-> d,world |-> world,evaluation |-> evaluation,afterObjects |-> afterObjects,afterWorld |-> afterWorld, afterEvaluation |-> afterEvaluation,capturedBarrierInstruction |-> capturedBarrierInstruction,exampleFamily027Applied |-> exampleFamily027Applied,exampleFamily027Cause |-> exampleFamily027Cause,exampleFamily079Selection |-> exampleFamily079Selection] QuantitySpecimen0232ActiveChecks912 == LET f == QuantityXFixture912 IN /\ CurrentXDefinitionActive912(f.d,f.world,CardFacts9) /\ Specimen0232ProtectingBarrier912(f.d.syntax.source,f.world.objects)={1,2} /\ ObserveVariableX912(f.d,f.world,CardFacts9,f.evaluation,4) /\ ~ObserveVariableX912(f.d,f.world,CardFacts9,[f.evaluation EXCEPT !.snapshotId=14500],4) /\ ~ObserveVariableX912(f.d,f.world,CardFacts9,[f.evaluation EXCEPT !.source=ObjectAbilitySource9(2)],4) QuantitySpecimen0232InactiveChecks912 == LET f == QuantityXFixture912 IN /\ f.exampleFamily079Selection.sourceSHA=CardFacts9["Specimen0269"].sourceSHA /\ f.exampleFamily079Selection.donorSHA=CardFacts9["Specimen0232"].sourceSHA /\ CardBatchTransfer8(f.world.objects,f.afterObjects,{1},[id \in {1} |-> 11],DOMAIN f.world.objects,"SideADiscard","Up",[id \in {1} |-> "Discard"]) /\ f.capturedBarrierInstruction.detached /\ f.capturedBarrierInstruction.source=ObjectAbilitySource9(1) /\ ~CurrentXDefinitionActive912(f.d,f.afterWorld,CardFacts9) /\ ObserveVariableX912(f.d,f.afterWorld,CardFacts9,f.afterEvaluation,0) /\ ~ObserveVariableX912(f.d,f.afterWorld,CardFacts9,[f.afterEvaluation EXCEPT !.value=4],4) QuantitySpecimen0232LostAndUnavailableChecks912 == LET f == QuantityXFixture912 lost == [Specimen0232XEvaluation912(f.d,f.exampleFamily027Applied) EXCEPT !.value=4] unavailable == [f.evaluation EXCEPT !.available=FALSE] IN /\ f.exampleFamily027Applied.objects[4].card="Specimen0112" /\ f.exampleFamily027Applied.objects[4].host=1 /\ f.exampleFamily027Cause.removed={f.d.syntax.id} /\ f.d.syntax.kind#"BarrierInstruction" /\ ~CurrentXDefinitionActive912(f.d,f.exampleFamily027Applied,CardFacts9) /\ ObserveVariableX912(f.d,f.exampleFamily027Applied,CardFacts9,lost,0) /\ CurrentXDefinitionActive912(f.d,f.world,CardFacts9) /\ ObserveVariableX912(f.d,f.world,CardFacts9,unavailable,0) QuantityRealSourceQueriesChecks912 == LET r == QuantityFixture912("Specimen0202","Draw",3,FALSE,0,1) u == QuantityFixture912("Specimen0255","Damage",3,TRUE,2,1) counters == [id \in {2,3,4} |-> PaidCounterFixture95("Progress",1)] objects == ReplacementOverlay99([u.world.objects EXCEPT ![1].deployed=TRUE],counters) world == [u.world EXCEPT !.objects=objects] IN /\ Specimen0202DrawQuantity912(r.g,r.reference,r.world,CardFacts9,r.emissions) /\ ~Specimen0202DrawQuantity912([r.g EXCEPT !.count=2],r.reference,r.world,CardFacts9,QuantityEmissions912([r.g EXCEPT !.count=2])) /\ HostedQuantityCounters912(objects,1,"Progress")={2,3,4} /\ ExampleFamily072DamageQuantity912(u.g,u.reference,world,CardFacts9,u.emissions) /\ Len(u.emissions)=1 /\ u.emissions[1].operation="Damage" /\ u.emissions[1].value=5 /\ u.emissions[1].specifications.damageType="HarmClassA" /\ ~ExampleFamily072DamageQuantity912([u.g EXCEPT !.count=2],u.reference,world,CardFacts9,QuantityEmissions912([u.g EXCEPT !.count=2])) QuantitySpecimen0219Fixture912 == LET objects == [id \in {1,2,3} |-> IF id=3 THEN CardObject9("NeutralValue00015","Play",FALSE,"Up") ELSE [CardObject9(IF id=1 THEN "Specimen0110" ELSE "Specimen0263","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.area="Root",!.targetSite="auxiliarySite1",!.targetSiteKind="SchemaAtom132"]] initialTraversal == [TraversalFixture92("ProcedureCodebbb14496b09b") EXCEPT !.attacked="auxiliarySite1",!.position="NoValue",!.reachedSuccess=TRUE] success == OpenSuccess6(initialTraversal) declared == [success EXCEPT !.declarationProcessed=TRUE,!.traversal.successful=TRUE] ready == [declared EXCEPT !.traversal.step=NextTraversalStep6("ProcedureCodebbb14496b09b","Next")] chosen == [ready EXCEPT !.siteInspectionChosen=TRUE] directive == [kind |-> "Replacement",choice |-> "Specimen0219",traversalId |-> initialTraversal.id,targetSite |-> "auxiliarySite1",origin |-> "RulesTraversalInspection"] world == [id |-> 15010,objects |-> objects,traversal |-> ready.traversal,targetSiteKinds |-> [auxiliarySite1 |-> "SchemaAtom132"]] source == ObjectAbilitySource9(3) origin == [tag |-> "FixedAbilitySourceObservation",source |-> source,card |-> "NeutralValue00015",sourceSHA |-> CardFacts9["NeutralValue00015"].sourceSHA] effect == [tag |-> "ResolvedSpecimen0219Replacement",id |-> 15000,card |-> "NeutralValue00015",sourceSHA |-> origin.sourceSHA, source |-> source,origin |-> origin,traversalId |-> initialTraversal.id] plan == [OpenInstruction93(15020,"Rule",0,RuleAbilitySource9("ProcedureCoded75d879e00ff"),"NoValue",0,"ProcedureCoded75d879e00ff",<<"ResolveInspectionReplacement">>,FALSE) EXCEPT !.phase="Resolving"] context == [id |-> 15021,phase |-> "Resolving",currentWorld |-> world.id,currentRef |-> InstructionWindowRef93(plan)] afterObjects == [id \in {3,11,12} |-> IF id=3 THEN objects[id] ELSE [CardObject9(objects[id-10].card,"SideADiscard",FALSE,"Up") EXCEPT !.loc="Discard"]] successors == [id \in {1,2} |-> id+10] batch == [tag |-> "CompletedSimultaneousRetireSet",id |-> effect.id,contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> world.id,source |-> source,actor |-> "SideB",members |-> {1,2},purpose |-> "Specimen0219Root",targetSite |-> "auxiliarySite1",beforeObjects |-> objects,afterObjects |-> afterObjects] hi == ConditionalDefinitionFixture96(15001,"Specimen0110","Trigger","Retireed","SchemaAtom016","SideB","SideA") wt == [ConditionalDefinitionFixture96(15002,"Specimen0263","Trigger","AtLeastOneRetireed","SchemaAtom016","SideB","SchemaAtom016") EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2),!.triggerRequirements={1}] originals == [key \in {ConditionalKey96(hi),ConditionalKey96(wt)} |-> IF key=ConditionalKey96(hi) THEN hi ELSE wt] reboundHI == ReboundConditionalDefinition96(hi,11) reboundWT == ReboundConditionalDefinition96(wt,12) definitions == [key \in {ConditionalKey96(reboundHI),ConditionalKey96(reboundWT)} |-> IF key=ConditionalKey96(reboundHI) THEN reboundHI ELSE reboundWT] initial == ConditionalSnapshotFixture96(world.id,0,"ProcedureCodee605a78f5d5e",originals,objects) seed == NewConditionalLedger96(initial) epochs == [key \in DOMAIN originals \cup DOMAIN definitions |-> IF key \in DOMAIN originals THEN 1 ELSE 0] moved == [seed EXCEPT !.activationEpoch=epochs,!.activationSerial=1] moveSnapshot == [ConditionalSnapshotFixture96(15011,0,"AfterAtomicRetire",definitions,afterObjects) EXCEPT !.activationEpoch=epochs,!.activationSerial=1,!.usedObjects=DOMAIN objects \cup DOMAIN afterObjects] occurrenceIds == [perCard |-> [id \in {1,2} |-> 15000+id],batch |-> 15999] occurrences == QuantityRetireOccurrences912(batch,initial,successors,wt,"auxiliarySite1",occurrenceIds) perCardIds == {occurrences.perCard[id].id : id \in DOMAIN occurrences.perCard} events == [id \in perCardIds \cup {15999} |-> IF id=15999 THEN occurrences.batchEvent ELSE occurrences.perCard[CHOOSE object \in DOMAIN occurrences.perCard : occurrences.perCard[object].id=id]] begin == [moveSnapshot EXCEPT !.id=15012,!.checkpointId=1,!.point="CheckpointBeginning"] current == [moveSnapshot EXCEPT !.id=15013,!.checkpointId=1,!.point="ProcedureCodee605a78f5d5e"] cp == ConditionalCheckpointFixture96(moved,1,begin,current,events) hiKeys == {[definition |-> ConditionalKey96(reboundHI),occurrence |-> id] : id \in perCardIds} wtKeys == {[definition |-> ConditionalKey96(reboundWT),occurrence |-> 15999]} keys == hiKeys \cup wtKeys allocation == [key \in keys |-> key.occurrence+1000] bindings == ConditionalBindingsFixture96(keys,1,17000,1701) conditions == [key \in DOMAIN definitions |-> [id \in DOMAIN events |-> IF key=ConditionalKey96(reboundHI) THEN ConditionalTriggerReceiptFixture96(hi,events[id]) ELSE [ConditionalTriggerReceiptFixture96(wt,events[id]) EXCEPT !.results=[requirement \in {1} |-> events[id].kind="AtLeastOneRetireed" /\ ExampleFamily075BatchMembers912(batch,objects,objects[2].targetSite)#{}]]]] holds == [key \in DOMAIN definitions |-> [ability |-> definitions[key].syntax.id, object |-> definitions[key].syntax.source.object,instances |-> {allocation[k] : k \in IF key=ConditionalKey96(reboundHI) THEN hiKeys ELSE wtKeys}]] departures == [key \in DOMAIN definitions |-> LET old == IF key=ConditionalKey96(reboundHI) THEN hi ELSE wt oldObject == old.syntax.source.object matches == IF oldObject=1 THEN perCardIds ELSE {15999} receipt == [oldObject |-> oldObject,newObject |-> successors[oldObject],ability |-> old.syntax.id, matchingInstances |-> holds[key].instances,matchingOccurrences |-> matches,effectId |-> effect.id] IN [tag |-> "ConditionalDepartureRecognition",checkpointId |-> 1,originalDefinition |-> old,oldObject |-> oldObject, newObject |-> successors[oldObject],beforeSnapshot |-> initial,effectId |-> effect.id,holdReceipt |-> receipt]] after == ConditionalCommittedFixture96(moved,definitions,cp,allocation,bindings,holds) IN [objects |-> objects,initialTraversal |-> initialTraversal,success |-> success,declared |-> declared,ready |-> ready,chosen |-> chosen,directive |-> directive, world |-> world,effect |-> effect,context |-> context,afterObjects |-> afterObjects,successors |-> successors,batch |-> batch, hi |-> hi,wt |-> wt,reboundHI |-> reboundHI,reboundWT |-> reboundWT,originals |-> originals,definitions |-> definitions, initial |-> initial,seed |-> seed,moved |-> moved,moveSnapshot |-> moveSnapshot,occurrenceIds |-> occurrenceIds,occurrences |-> occurrences,events |-> events,cp |-> cp, hiKeys |-> hiKeys,wtKeys |-> wtKeys,keys |-> keys,allocation |-> allocation,bindings |-> bindings,conditions |-> conditions, holds |-> holds,departures |-> departures,after |-> after] QuantitySpecimen0219Valid912(f) == /\ DeclareSuccessfulTraversal6(f.success,f.declared,TRUE,{[tag |-> "SuccessfulTraversal",traversalId |-> 2,targetSite |-> "auxiliarySite1"]}) /\ ChooseRulesInspection6(f.ready,f.chosen,"Specimen0219",{"Specimen0219"},TRUE,f.directive) /\ IfSuccessfulCondition6([traversalId |-> f.effect.traversalId,targetSiteRestricted |-> TRUE],f.world.traversal,{"auxiliarySite1"}) /\ Specimen0219RetireSet912(f.world,f.afterObjects,f.effect,f.directive,f.context,f.successors,DOMAIN f.objects,f.batch,CardFacts9) /\ ObserveQuantityRetireOccurrences912(f.batch,f.initial,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds,f.seed.processed,f.occurrences) /\ ObserveConditionalActivity96(f.seed,f.seed,f.moved,<<>>,<<>>,f.initial,f.moveSnapshot) /\ ProcessConditionalCheckpoint96(f.moved,f.after,<<>>,<<>>,f.definitions,f.cp,f.conditions,f.allocation,f.bindings,f.departures,f.holds,{}) QuantitySpecimen0219SimultaneousChecks912 == LET f == QuantitySpecimen0219Fixture912 current == SnapshotWithConditionalRegistry96(f.cp.processingSnapshot,f.after) IN /\ QuantitySpecimen0219Valid912(f) /\ f.batch.members={1,2} /\ Cardinality(f.hiKeys)=2 /\ Cardinality(f.wtKeys)=1 /\ Cardinality(DOMAIN f.after.instances)=3 /\ Cardinality(f.holds[ConditionalKey96(f.reboundHI)].instances)=2 /\ Cardinality(f.holds[ConditionalKey96(f.reboundWT)].instances)=1 /\ ConditionalActive96(f.reboundHI,current) /\ ConditionalActive96(f.reboundWT,current) /\ ~f.moveSnapshot.cardActivity[11] /\ ~f.moveSnapshot.cardActivity[12] /\ f.occurrences.batchEvent.members={1,2} /\ f.occurrences.batchEvent.scopeDefinition=ConditionalKey96(f.wt) /\ f.occurrences.perCard[1].effectId=f.occurrences.perCard[2].effectId /\ f.occurrences.batchEvent.effectId=f.batch.id QuantitySpecifiedLocationChecks912 == \A operation \in {"LookAtCards","RevealCards","RetireCards"} : LET f == QuantityStructuralFixture912(operation,3,FALSE,0,1) g == [f.g EXCEPT !.parts[1].specifications.location="NoValue"] IN /\ QuantityGroupShape912(g) /\ ~QuantityAggregates912(g) /\ Len(QuantityEmissions912(g))=3 QuantitySpecimen0219BoundaryChecks912 == LET f == QuantitySpecimen0219Fixture912 wrong == [f.batch EXCEPT !.members={1}] foreign == [f.effect EXCEPT !.traversalId=9] wrongContext == [f.context EXCEPT !.currentRef.source=RuleAbilitySource9("ProcedureCode4f60245a1dde")] IN /\ QuantitySpecimen0219Valid912(f) /\ ~Specimen0219RetireSet912(f.world,f.afterObjects,f.effect,f.directive,f.context,f.successors,DOMAIN f.objects,wrong,CardFacts9) /\ ~Specimen0219RetireSet912(f.world,f.afterObjects,foreign,f.directive,f.context,f.successors,DOMAIN f.objects,f.batch,CardFacts9) /\ ~Specimen0219RetireSet912(f.world,f.afterObjects,f.effect,f.directive,wrongContext,f.successors,DOMAIN f.objects,f.batch,CardFacts9) /\ ~Specimen0219RetireSet912(f.world,f.afterObjects,[f.effect EXCEPT !.sourceSHA="ForeignSource912",!.origin.sourceSHA="ForeignSource912"],f.directive,f.context,f.successors,DOMAIN f.objects,f.batch,CardFacts9) QuantityExampleFamily075TargetSiteAndHoldChecks912 == LET f == QuantitySpecimen0219Fixture912 noTargetSiteMembers == ExampleFamily075BatchMembers912(f.batch,f.objects,"auxiliarySite2") noTargetSiteEvents == QuantityRetireOccurrences912(f.batch,f.initial,f.successors,f.wt,"auxiliarySite2",f.occurrenceIds) key == ConditionalKey96(f.reboundWT) oldEvent == f.cp.occurrences[15999] badEvent == [oldEvent EXCEPT !.movement.oldObject=0] cp == [f.cp EXCEPT !.occurrences[15999]=badEvent] omittedHold == [f.holds EXCEPT ![key].instances={}] IN /\ noTargetSiteMembers={} /\ noTargetSiteEvents.batchEvents=Empty9 /\ ~DepartureAuthority96(f.reboundWT,cp,f.conditions[key],f.allocation,f.departures[key],f.holds[key]) /\ ~ProcessConditionalCheckpoint96(f.moved,ConditionalCommittedFixture96(f.moved,f.definitions,f.cp,f.allocation,f.bindings,omittedHold),<<>>,<<>>, f.definitions,f.cp,f.conditions,f.allocation,f.bindings,f.departures,omittedHold,{}) QuantityInterruptFixture912(card) == LET isDraw == card="Specimen0237" q0 == QuantityFixture912(IF isDraw THEN "Specimen0202" ELSE "Specimen0255",IF isDraw THEN "Draw" ELSE "Damage",3,~isDraw,IF isDraw THEN 0 ELSE 2,1) objects0 == [id \in {1,5} |-> IF id=1 THEN q0.world.objects[1] ELSE [CardObject9(card,"Play",TRUE,"Up") EXCEPT !.activated=~isDraw]] objects == IF isDraw THEN objects0 ELSE ReplacementOverlay99([objects0 EXCEPT ![1].deployed=TRUE], [id \in {2,3,4} |-> PaidCounterFixture95("Progress",1)]) qworld == [q0.world EXCEPT !.objects=objects] d0 == LexicalConditionalFixture99(IF isDraw THEN 9102 ELSE 14600,card,5,IF isDraw THEN "WouldDraw" ELSE "WouldNetDamage") d == [d0 EXCEPT !.syntax.units= <> \o @,!.primaryCondition=2,!.instructionHasWould=TRUE, !.trigger.actor=IF isDraw THEN "SideB" ELSE "SideA",!.effectChoices=IF isDraw THEN {{1}} ELSE {{},{1}},!.optionalParts=IF isDraw THEN {} ELSE {1}] key == ConditionalKey96(d) definitions == [k \in {key} |-> d] lex == LexicalReceiptFixture99(d,card,[id \in {1,2} |-> IF id=1 THEN LexicalMentionFixture99(d,"would",2,"ImminentTrigger") ELSE LexicalMentionFixture99(d,IF isDraw THEN "look" ELSE "prevent",3,"EffectOperator")],CardFacts9) clause == [mode |-> "WouldTrigger",pattern |-> IF isDraw THEN [kind |-> "Draw",actor |-> "SideB"] ELSE [kind |-> "Damage",damageType |-> "HarmClassA",actor |-> "SideA",minValue |-> 1],ordinal |-> IF isDraw THEN 1 ELSE 0, period |-> TimingRef9("Turn",1),criterion |-> RelevanceCriterion99(IF isDraw THEN "Draw" ELSE "Damage",IF isDraw THEN "NoValue" ELSE "HarmClassA", IF isDraw THEN "SideB" ELSE "SideA",1,~isDraw,"NoValue",FALSE)] capabilities == [tag |-> "NormalizedInterruptCapabilities",definition |-> d,origin |-> lex.origin, clauses |-> [id \in {1} |-> clause],primaryGroups |-> [group \in {1} |-> {1}]] snapshot == ConditionalSnapshotFixture96(qworld.id,0,"ProcedureCodee605a78f5d5e",definitions,objects) ledger == NewConditionalLedger96(snapshot) plan == [q0.plan EXCEPT !.phase="Imminent",!.announced=TRUE] ability == [OpenAbilityResolution9(14000,IF isDraw THEN "Play" ELSE "Conditional",ObjectAbilitySource9(1),"Play",<<14001>>,0) EXCEPT !.phase="Imminent",!.firstImminent=TRUE,!.detached=~isDraw] origin == [kind |-> "Instruction",plan |-> plan,parent |-> ability,ruleStep |-> "NoValue"] amount == q0.emissions[1].value atom == ReplacementOverlay99(ReplacementAtomFixture99(1,1,IF isDraw THEN "Draw" ELSE "Damage",FALSE,0), [value |-> amount,damageType |-> "HarmClassA",actor |-> IF isDraw THEN "SideB" ELSE "SideA",baseController |-> IF isDraw THEN "SideB" ELSE "SideA", baseOrigin |-> ObjectAbilitySource9(1),targetSite |-> "NoValue"]) effects == [id \in {1} |-> atom] entry == [tag |-> "InitializedImminentSourceComponent",source |-> ObjectAbilitySource9(1),card |-> q0.g.card,sourceSHA |-> q0.g.sourceSHA] world == [tag |-> "CurrentInterruptWorld",id |-> qworld.id,turn |-> TurnFixture92("SideB"),traversalControl |-> [traversal |-> NoTraversal6],objects |-> objects, controllers |-> [id \in DOMAIN objects |-> IF objects[id].side \in SetupPlayers THEN objects[id].side ELSE "SideA"],activePeriods |-> Empty9, conditional |-> snapshot,paidDefinitions |-> Empty9,lexemes |-> [k \in {key} |-> lex],capabilities |-> [k \in {key} |-> capabilities], paidContexts |-> Empty9,turnUses |-> Empty9,replacementDefinitions |-> Empty9,liveReplacementIds |-> {},entries |-> [id \in {14620} |-> entry]] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> ObjectAbilitySource9(1), snapshotId |-> world.id,effects |-> effects,order |-> <<1>>] context == NewExpectedContext99(14621,14620,origin,world,description,effects,[windowId |-> 0]) observation == InitialWouldObservation99(context,14622) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,observation) allocation == [k \in {key} |-> 14650] prepared == RelevancePreparedFixture99(context,ledger,world,allocation,14651,1465) IN [isDraw |-> isDraw,q0 |-> q0,qworld |-> qworld,d |-> d,key |-> key,lex |-> lex,capabilities |-> capabilities, ledger |-> ledger,plan |-> plan,ability |-> ability,origin |-> origin,world |-> world,context |-> context, observation |-> observation,history |-> history,allocation |-> allocation,prepared |-> prepared] QuantityInterruptValid912(f) == /\ NormalizeQuantityGroup912(f.q0.g,f.q0.reference,f.qworld,CardFacts9,f.q0.emissions) /\ IF f.isDraw THEN Specimen0202DrawQuantity912(f.q0.g,f.q0.reference,f.qworld,CardFacts9,f.q0.emissions) ELSE ExampleFamily072DamageQuantity912(f.q0.g,f.q0.reference,f.qworld,CardFacts9,f.q0.emissions) /\ CurrentInterruptWorld99(f.world,f.ledger,CardFacts9) /\ ExpectedContextOrigin99(f.context,f.origin) /\ InitialWouldCaptured99(f.context,f.history) /\ RecordWouldDescriptors99(NewWouldAccounting99,f.history,f.context.id,f.context.imminenceId,f.context.initialRef,f.world.id,f.context.initialEffects, f.context.initialWouldGroups,f.context.initialPeriods,<<1>>,f.observation) /\ PrepareOpeningInterrupts99(f.context,f.prepared.context,f.ledger,f.prepared.ledger,f.origin,f.world,f.history,14651,1465,f.allocation,{},CardFacts9) QuantityExampleFamily092OneDrawChecks912 == LET f == QuantityInterruptFixture912("Specimen0237") IN /\ QuantityInterruptValid912(f) /\ f.context.initialEffects[1].value=3 /\ Cardinality(DOMAIN f.context.initialEffects)=1 /\ Cardinality(DOMAIN f.prepared.ledger.instances)=1 /\ f.prepared.context.conditionalIds={14650} /\ ExampleFamily092LookCount912(f.context,1)=4 /\ f.prepared.ledger.instances[14650].definitionCopy.syntax.id=9102 QuantityExampleFamily043OneDamageChecks912 == LET f == QuantityInterruptFixture912("Specimen0183") IN /\ QuantityInterruptValid912(f) /\ f.context.initialEffects[1].value=5 /\ f.context.initialEffects[1].damageType="HarmClassA" /\ Cardinality(DOMAIN f.context.initialEffects)=1 /\ Cardinality(DOMAIN f.prepared.ledger.instances)=1 /\ f.prepared.context.conditionalIds={14650} /\ f.prepared.ledger.instances[14650].member.mandatory=FALSE QuantityProfileAndCompletenessChecks912 == LET f == QuantityFixture912("Specimen0202","Draw",3,FALSE,0,1) forgedSHA == [f.g EXCEPT !.sourceSHA="ForeignSource912",!.origin.sourceSHA="ForeignSource912"] source == ObjectAbilitySource9(2) forgedSource == [f.g EXCEPT !.source=source,!.origin.source=source] world == [f.world EXCEPT !.objects=ReplacementOverlay99(@,[id \in {2} |-> f.world.objects[1]])] otherRef == [f.reference EXCEPT !.id=14099] repeated == [f.g EXCEPT !.partOrder= <<1,1>>] mixed == QuantitySpecimen0195Fixture912 missingPart == [mixed.g EXCEPT !.partOrder= <<1>>] IN /\ ~NormalizeQuantityGroup912(forgedSHA,f.reference,f.world,CardFacts9,QuantityEmissions912(forgedSHA)) /\ ~NormalizeQuantityGroup912(forgedSource,f.reference,world,CardFacts9,QuantityEmissions912(forgedSource)) /\ ~NormalizeQuantityGroup912(f.g,otherRef,f.world,CardFacts9,f.emissions) /\ ~NormalizeQuantityGroup912(repeated,f.reference,f.world,CardFacts9,QuantityEmissions912(repeated)) /\ ~NormalizeQuantityGroup912(missingPart,mixed.f.reference,mixed.world,CardFacts9,QuantityEmissions912(missingPart)) QuantityExampleFamily033Fixture912 == LET q == QuantitySpecimen0195Fixture912 objects == ReplacementOverlay99(q.world.objects,[id \in {4} |-> [CardObject9("Specimen0152","Play",TRUE,"Up") EXCEPT !.activated=TRUE]]) afterFirst == [objects EXCEPT ![2].face="Down",![2].activated=FALSE] afterSecond == [afterFirst EXCEPT ![3].face="Down",![3].activated=FALSE] d == [ConditionalDefinitionFixture96(14700,"Specimen0152","Trigger","GainResourceUnits","SchemaAtom016","SideA","SchemaAtom016") EXCEPT !.syntax.source=ObjectAbilitySource9(4),!.activity.source=ObjectAbilitySource9(4),!.triggerRequirements={1},!.effectChoices={{},{1}},!.optionalParts={1}] key == ConditionalKey96(d) definitions == [k \in {key} |-> d] initial == ConditionalSnapshotFixture96(14710,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) events == [id \in {14701,14702} |-> LET index == IF id=14701 THEN 1 ELSE 3 amount == q.emissions[index].value snapshot == IF id=14701 THEN initial ELSE ConditionalSnapshotFixture96(14711,0,"BeforeSecondGain",definitions,afterFirst) IN ReplacementOverlay99(ConditionalEventFixture96(id,"GainResourceUnits",0,"SideA","SideA",snapshot,q.g.id), [effectSource |-> q.emissions[index].source,amount |-> amount,quantityOccurrence |-> q.emissions[index].occurrence, resourceUnitBefore |-> IF id=14701 THEN 0 ELSE 1,resourceUnitAfter |-> IF id=14701 THEN 1 ELSE 5])] begin == ConditionalSnapshotFixture96(14712,1,"CheckpointBeginning",definitions,afterSecond) current == [begin EXCEPT !.id=14713,!.point="ProcedureCodee605a78f5d5e"] cp == ConditionalCheckpointFixture96(seed,1,begin,current,events) keys == {[definition |-> key,occurrence |-> id] : id \in DOMAIN events} allocation == [k \in keys |-> k.occurrence+100] bindings == ConditionalBindingsFixture96(keys,1,14720,1472) conditions == [k \in {key} |-> [id \in DOMAIN events |-> [ConditionalTriggerReceiptFixture96(d,events[id]) EXCEPT !.results=[requirement \in {1} |-> ExampleFamily033GainSourceMatches912(d,events[id])]]]] after == ConditionalCommittedFixture96(seed,definitions,cp,allocation,bindings,Empty9) IN [q |-> q,objects |-> objects,afterFirst |-> afterFirst,afterSecond |-> afterSecond,d |-> d,key |-> key,definitions |-> definitions, initial |-> initial,seed |-> seed,events |-> events,cp |-> cp,keys |-> keys,allocation |-> allocation,bindings |-> bindings, conditions |-> conditions,after |-> after] QuantityExampleFamily033TwoGainsChecks912 == LET f == QuantityExampleFamily033Fixture912 IN /\ QuantityMixedSpecimen0195Checks912 /\ Deactivation8(f.objects,f.afterFirst,2,f.q.emissions[2].operation="Deactivation" /\ f.q.emissions[2].arguments.chosenBarrier=2,{[tag |-> "Deactivation",object |-> 2]}) /\ Deactivation8(f.afterFirst,f.afterSecond,3,f.q.emissions[4].operation="Deactivation" /\ f.q.emissions[4].arguments.chosenBarrier=3,{[tag |-> "Deactivation",object |-> 3]}) /\ \A id \in DOMAIN f.events : f.events[id].resourceUnitAfter-f.events[id].resourceUnitBefore=f.events[id].amount /\ f.events[id].amount>0 /\ ProcessConditionalCheckpoint96(f.seed,f.after,<<>>,<<>>,f.definitions,f.cp,f.conditions,f.allocation,f.bindings,Empty9,Empty9,{}) /\ Cardinality(DOMAIN f.after.instances)=2 /\ f.events[14701].amount=1 /\ f.events[14702].amount=4 /\ f.events[14701].quantityOccurrence=1 /\ f.events[14702].quantityOccurrence=2 /\ ~ExampleFamily033GainSourceMatches912(f.d,[f.events[14701] EXCEPT !.effectSource=f.d.syntax.source]) QuantitySpecimen0094Specimen0251Checks912 == LET objects == [id \in {1,2} |-> CardObject9(IF id=1 THEN "Specimen0094" ELSE "Specimen0251","Play",id=2,"Up")] e == [OpenEncounter6(14800,2,2,FALSE,"traversal",<<>>) EXCEPT !.stage="BeginReactions"] paid == WithFullySuppressInstruction6([e EXCEPT !.stage="Paid",!.paidReached=TRUE]) event == [tag |-> "FullySuppressInstruction",encounterId |-> e.id,barrierCard |-> 2,traversalId |-> 2,objects |-> {}] effect == [card |-> "Specimen0094",sourceSHA |-> CardFacts9["Specimen0094"].sourceSHA,source |-> ObjectAbilitySource9(1),traversalId |-> 2] exampleFamily070Characteristics == [card |-> "Specimen0251",sourceSHA |-> CardFacts9["Specimen0251"].sourceSHA,subtypes |-> {"Sentry"},printedBarrierInstructions |-> <<>>] IN /\ objects[e.barrierCard].card="Specimen0251" /\ exampleFamily070Characteristics.printedBarrierInstructions=e.order /\ BeginEncounterPaid6(e,paid,TRUE,{event}) /\ Specimen0094FullySuppressInstructionMatch912(effect,e,paid,event,exampleFamily070Characteristics.subtypes,{},CardFacts9) /\ ~Specimen0094FullySuppressInstructionMatch912(effect,e,e,event,exampleFamily070Characteristics.subtypes,{},CardFacts9) /\ ~Specimen0094FullySuppressInstructionMatch912(effect,e,paid,event,exampleFamily070Characteristics.subtypes,{[traversal |-> 2,barrierCard |-> 9]},CardFacts9) /\ ~Specimen0094FullySuppressInstructionMatch912([effect EXCEPT !.traversalId=3],e,paid,event,exampleFamily070Characteristics.subtypes,{},CardFacts9) /\ ~Specimen0094FullySuppressInstructionMatch912(effect,e,paid,event,{"SchemaSymbol001"},{},CardFacts9) QuantityRetireEventAllocationChecks912 == LET f == QuantitySpecimen0219Fixture912 ids == [f.occurrenceIds EXCEPT !.batch=f.occurrenceIds.perCard[1]] result == QuantityRetireOccurrences912(f.batch,f.initial,f.successors,f.wt,"auxiliarySite1",ids) IN /\ ~ObserveQuantityRetireOccurrences912(f.batch,f.initial,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds,{15999},f.occurrences) /\ ~ObserveQuantityRetireOccurrences912(f.batch,f.initial,f.successors,f.wt,"auxiliarySite1",ids,{},result) QuantityMoreCurrentBoundaryChecks912 == LET f == QuantitySpecimen0219Fixture912 stale == [f.context EXCEPT !.currentWorld=f.world.id-1] IN /\ ~Specimen0219RetireSet912(f.world,f.afterObjects,f.effect,f.directive,stale,f.successors,DOMAIN f.objects,f.batch,CardFacts9) /\ ~ObserveQuantityRetireOccurrences912(f.batch,f.initial,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds,{15001},f.occurrences) QuantityRetireSnapshotBindingChecks912 == LET f == QuantitySpecimen0219Fixture912 stale == [f.initial EXCEPT !.id=f.initial.id-1] changed == [f.initial EXCEPT !.objects[1].activated=FALSE] staleResult == QuantityRetireOccurrences912(f.batch,stale,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds) changedResult == QuantityRetireOccurrences912(f.batch,changed,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds) IN /\ ~ObserveQuantityRetireOccurrences912(f.batch,stale,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds,{},staleResult) /\ ~ObserveQuantityRetireOccurrences912(f.batch,changed,f.successors,f.wt,"auxiliarySite1",f.occurrenceIds,{},changedResult) QuantityConditionalXChecks912 == LET f == QuantityInterruptFixture912("Specimen0237") world == ReplacementOverlay99(f.world,[present |-> f.world.conditional.present,activity |-> f.world.conditional.activity, cardActivity |-> f.world.conditional.cardActivity,points |-> f.world.conditional.points]) evaluation == [tag |-> "CurrentVariableEvaluation",ability |-> f.d.syntax.id,source |-> f.d.syntax.source, snapshotId |-> world.id,available |-> TRUE,value |-> ExampleFamily092LookCount912(f.context,1)] IN /\ f.d.syntax.kind="Conditional" /\ CurrentXDefinitionActive912(f.d,world,CardFacts9) /\ ObserveVariableX912(f.d,world,CardFacts9,evaluation,4) QuantityForcedAllPointAndRuleGainChecks912 == LET e == [OpenEncounter6(14820,2,0,TRUE,"effect",<<>>) EXCEPT !.stage="BeginReactions"] paid == WithFullySuppressInstruction6([e EXCEPT !.stage="Paid",!.paidReached=TRUE]) f == QuantityExampleFamily033Fixture912 IN /\ BeginEncounterPaid6(e,paid,TRUE,NewFullySuppressInstructionEvents6(e,paid)) /\ EncounterAllSubsSatisfied912(paid) /\ ~EncounterAllSubsSatisfied912(e) /\ ~ExampleFamily033GainSourceMatches912(f.d,[f.events[14701] EXCEPT !.effectSource=RuleAbilitySource9("SideABasicGainResourceUnit")]) MustEmptyPayment912 == [key \in {} |-> key] MustOptionFixture912(id,means,goal,paymentSpecification,targetSpecification,additionalCosts) == [id |-> id,means |-> means,goal |-> goal,paymentSpecification |-> paymentSpecification,targetSpecification |-> targetSpecification,additionalCosts |-> additionalCosts] MustWorldFixture912(id,objects,resources) == [tag |-> "CurrentMustWorld",id |-> id,objects |-> objects,resources |-> resources,turn |-> TurnFixture92("SideB"), present |-> {27200},cardActivity |-> [object \in DOMAIN objects |-> ConditionalCardActivityFixture96(objects[object])], activity |-> ActivityContext9,points |-> [player \in SetupPlayers |-> 0],actionPointsSpent |-> 0] MustResourcesFixture912(sideB,sideA,restrictedDemand,Specimen0211,objectives) == [key \in {"CashSideB","CashSideA","ImpCluster","Specimen0211ResourceUnits","SideAObjective"} |-> CASE key="CashSideB" -> sideB [] key="CashSideA" -> sideA [] key="ImpCluster" -> restrictedDemand [] key="Specimen0211ResourceUnits" -> Specimen0211 [] OTHER -> objectives] MustInstructionFixture912(card,sourceObject,kind,form,actor,means,goal,options,world,instruction) == LET source == ObjectAbilitySource9(sourceObject) raw == IF kind="Conditional" THEN ConditionalDefinitionFixture96(27200,card,"Trigger","SourceCondition","SchemaAtom149","SideB",CardFacts9[card].side) ELSE [syntax |-> SyntaxFixture93(27200,kind,CardFacts9[card].side,CardFacts9[card].kind,<>), activity |-> AbilityDefinition9(27200,kind,source,"Printed"),instructions |-> <>] d == [raw EXCEPT !.syntax.source=source,!.activity.source=source] ability == [OpenAbilityResolution9(27201,kind,source,"Play",<>,27202) EXCEPT !.phase="Resolving",!.firstImminent=TRUE,!.detached=TRUE] plan == [OpenInstruction93(instruction,"Ability",27201,source,"Play",1,"NoValue",<<"ResolveMustDecision">>,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] declaration == [tag |-> "NormalizedMustDeclaration",card |-> card,sourceSHA |-> CardFacts9[card].sourceSHA, source |-> source,definition |-> d,controller |-> d.syntax.controller,actor |-> actor,origin |-> "Instruction", form |-> form,means |-> means,goal |-> goal,options |-> options] context == [id |-> 27203,phase |-> "Resolving",currentWorld |-> world.id,currentRef |-> InstructionWindowRef93(plan), actualEffects |-> [id \in {1} |-> [kind |-> IF form="Choice" THEN "InstructionChoice" ELSE "MustRequirement",chooser |-> actor,must |-> declaration]]] caller == [kind |-> "NormalizedInstructionEnd",source |-> source,instruction |-> context.currentRef,instance |-> ability.id] site == [tag |-> "CurrentMustDecisionSite",id |-> 27204,snapshotId |-> world.id,context |-> context, plan |-> plan,ability |-> ability,operation |-> 1,checkpointCaller |-> caller, checkpointSource |-> [source |-> source,instruction |-> context.currentRef,caller |-> caller]] IN [d |-> d,declaration |-> declaration,site |-> site,context |-> context,plan |-> plan,ability |-> ability, before |-> NewMustDecision912(27205,declaration,site),world |-> world] MustProfileFixture912(declaration,site,world,option,targets,payments,failures) == [tag |-> "CurrentMustOptionProfile",option |-> declaration.options[option],source |-> declaration.source, actor |-> declaration.actor,site |-> site,snapshot |-> world,targetSpecification |-> declaration.options[option].targetSpecification, paymentSpecification |-> declaration.options[option].paymentSpecification,targetAlternatives |-> targets,paymentAlternatives |-> payments, ordinary |-> [tag |-> "OrdinaryOptionLegality",option |-> declaration.options[option],site |-> site,snapshot |-> world, source |-> declaration.source,actor |-> declaration.actor,failures |-> failures]] MustEvaluationFixture912(f,NeutralValue00014) == [tag |-> "CompleteMustFeasibility",declaration |-> f.declaration,site |-> f.site,snapshot |-> f.world,actor |-> f.declaration.actor,options |-> NeutralValue00014] MustDecisionFixture912(f,kind,option) == [tag |-> "MustDecision",id |-> 27206,requirement |-> f.before.id,site |-> f.site,snapshot |-> f.world,actor |-> f.declaration.actor,kind |-> kind,option |-> option] MustAfterFixture912(f,evaluation,decision) == [f.before EXCEPT !.phase="Committed",!.chosen=IF decision.kind="Choose" THEN decision.option ELSE "NoValue", !.disposition=decision.kind,!.choiceSnapshot=f.world.id,!.feasibleAtChoice=MustFullyResolvable912(f.declaration,f.world,evaluation),!.decision=decision] MustChooseValid912(f,evaluation,decision) == DecideMust912(f.before,MustAfterFixture912(f,evaluation,decision),f.world,evaluation,decision,CardFacts9) MustItemInspectionFixture912(exampleFamily034,restrictedDemandAvailable,exampleFamily054Available,used,oneShot) == LET d == PaidDefinitionFixture95("Imp","Specimen0115",<<"ItemInspection","OncePerTurn">>,<<[kind |-> "HostedCluster",amount |-> 1]>>) objects == [id \in {1,2,3,4,5,6,9} |-> CASE id=1 -> CardObject9("Specimen0115","Play",TRUE,"Up") [] id=2 -> CardObject9(IF exampleFamily034 THEN "Specimen0059" ELSE "Specimen0148","Play",TRUE,"Down") [] id=3 -> CardObject9("Specimen0211","Play",TRUE,"Up") [] id=4 -> PaidCounterFixture95("SchemaAtom180",1) [] id \in {5,6} -> PaidCounterFixture95("ResourceUnit",3) [] OTHER -> CardObject9("Specimen0157","Play",TRUE,"Up")] actualObjects == [id \in (DOMAIN objects \ (IF restrictedDemandAvailable THEN {} ELSE {4})) \ (IF exampleFamily054Available THEN {} ELSE {5,6}) |-> objects[id]] a == [OpenItemInspection7(27300,2,actualObjects[2],2,40,"siteInspection",{}) EXCEPT !.step="ProcedureCode1dd0e8f05be2",!.active=TRUE,!.beginMet=TRUE, !.midUsed=oneShot,!.midDone=oneShot] c == [PaidContextFixture95(d,actualObjects,TurnFixture92("SideB")) EXCEPT !.traversal=TraversalFixture92("ProcedureCoded75d879e00ff"), !.traversalControl=PaidTraversalControlFixture95(TraversalFixture92("ProcedureCoded75d879e00ff")), !.uses=IF used THEN [i \in {1} |-> [turnId |-> 1,ability |-> d.syntax.id,source |-> d.syntax.source,useId |-> 1]] ELSE Empty9] w == ReadyFixture92(WindowFixture92(27301,"MidItemInspection",ItemInspectionPrioritySite9(c.turn,a,actualObjects),Empty9,0,NoTimingRef9)) lex == LexicalSingleFixture99(d,"Specimen0115","trash",4,"EffectOperator",CardFacts9) legalImp == PaidEligibility99(d,lex,c,w,CardFacts9) /\ ~a.midUsed /\ ~a.midDone legalBasic == ~a.midUsed /\ ~a.midDone /\ StillItemInspectioning7(a,actualObjects) resources == MustResourcesFixture912(4,0,IF restrictedDemandAvailable THEN 1 ELSE 0,IF exampleFamily054Available THEN 2 ELSE 0,0) world == MustWorldFixture912(1,actualObjects,resources) options == [id \in {"Imp","BasicRetire"} |-> IF id="Imp" THEN MustOptionFixture912(id,"CardAbility","RetireItemInspectioned",[kind |-> "HostedCluster",source |-> 1,amount |-> 1],"NoNewTarget",{}) ELSE MustOptionFixture912(id,"PayRetireCost","RetireItemInspectioned",[kind |-> "SchemaAtom169",inspectedItem |-> 2,amount |-> 5, recurringPermission |-> [source |-> 3,card |-> "Specimen0211",sourceSHA |-> CardFacts9["Specimen0211"].sourceSHA,costType |-> "Retire"]],"NoNewTarget",{})] f == MustInstructionFixture912(IF exampleFamily034 THEN "Specimen0157" ELSE "Specimen0148",IF exampleFamily034 THEN 9 ELSE 2, "Conditional","Requirement","SideB",IF exampleFamily034 THEN "PayRetireCost" ELSE "SchemaAtom016","RetireItemInspectioned",options,world,27302) plans == {[key \in {"CashSideB","Specimen0211ResourceUnits"} |-> IF key="CashSideB" THEN 5-spend ELSE spend] : spend \in 0..(IF exampleFamily054Available THEN 2 ELSE 0)} NeutralValue00014 == [id \in DOMAIN options |-> MustProfileFixture912(f.declaration,f.site,world,id,{{}}, IF id="Imp" THEN {[key \in {"ImpCluster"} |-> 1]} ELSE plans, IF (IF id="Imp" THEN legalImp ELSE legalBasic) THEN {} ELSE {"UnavailableAbility"})] evaluation == MustEvaluationFixture912(f,NeutralValue00014) impMid == MidOption7("Imp",TRUE,restrictedDemandAvailable,legalImp) basicMid == MidOption7("BasicRetire",TRUE,\E plan \in plans : MustResourcePlanAffordable912(plan,world),legalBasic) IN [f |-> f,d |-> d,lex |-> lex,c |-> c,a |-> a,w |-> w,legalImp |-> legalImp,legalBasic |-> legalBasic, evaluation |-> evaluation,impMid |-> impMid,basicMid |-> basicMid,options |-> {impMid,basicMid}] MustExampleFamily031MethodsChecks912 == LET s == MustItemInspectionFixture912(FALSE,TRUE,TRUE,FALSE,FALSE) IN /\ PaidAlwaysOptional95(s.d) /\ s.d.syntax.kind="Paid" /\ s.d.syntax.source=ObjectAbilitySource9(1) /\ MustSourceBound912(s.f.declaration,s.f.site,s.f.world,CardFacts9) /\ MustFeasibilityBound912(s.f.declaration,s.f.site,s.f.world,s.evaluation) /\ MustFullyResolvable912(s.f.declaration,s.f.world,s.evaluation)={"Imp","BasicRetire"} /\ MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose","Imp")) /\ MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose","BasicRetire")) /\ ~MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"NoEffect","NoValue")) /\ MidItemInspectionChoiceAllowed7("Imp",s.options,TRUE,FALSE) /\ MidItemInspectionChoiceAllowed7("BasicRetire",s.options,TRUE,FALSE) /\ ~MidItemInspectionChoiceAllowed7("Decline",s.options,TRUE,FALSE) /\ FullPublicMidItemInspectionChecks99 /\ CallerMidItemInspectionReturnChecks911 MustExampleFamily031LegalityMatrixChecks912 == \A restrictedDemand,Specimen0211,used,oneShot \in BOOLEAN : LET s == MustItemInspectionFixture912(FALSE,restrictedDemand,Specimen0211,used,oneShot) expected == (IF restrictedDemand /\ ~used /\ ~oneShot THEN {"Imp"} ELSE {}) \cup (IF Specimen0211 /\ ~oneShot THEN {"BasicRetire"} ELSE {}) IN /\ MustFullyResolvable912(s.f.declaration,s.f.world,s.evaluation)=expected /\ \A option \in expected : MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose",option)) /\ expected={} => MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"NoEffect","NoValue")) /\ "Imp" \notin expected => ~MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose","Imp")) MustExampleFamily034MeansChecks912 == LET s == MustItemInspectionFixture912(TRUE,TRUE,FALSE,FALSE,FALSE) IN /\ ExampleFamily034Trigger7(TRUE,TRUE,0) /\ MustFullyResolvable912(s.f.declaration,s.f.world,s.evaluation)={} /\ MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"NoEffect","NoValue")) /\ ~MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose","Imp")) /\ MidItemInspectionChoiceAllowed7("Decline",s.options,FALSE,TRUE) /\ MidItemInspectionChoiceAllowed7("Imp",s.options,FALSE,TRUE) /\ DeclineMidItemInspection7(s.a,[s.a EXCEPT !.midDone=TRUE],s.f.world.objects,s.options,FALSE,TRUE,TRUE) MustExampleFamily016Fixture912(resourceUnits,id,deployed) == LET objects == [object \in {1} \cup deployed |-> IF object=1 THEN [CardObject9("Specimen0084","Play",TRUE,"Up") EXCEPT !.activated=TRUE] ELSE CardObject9("Specimen0115","Play",TRUE,"Up")] world == MustWorldFixture912(id,objects,MustResourcesFixture912(resourceUnits,0,0,0,0)) options == [option \in {"Pay2","RetireDeployed"} |-> IF option="Pay2" THEN MustOptionFixture912(option,"PayResourceUnits","Pay2",[kind |-> "ResourceUnits",payer |-> "SideB",amount |-> 2],"NoTargets",{}) ELSE MustOptionFixture912(option,"RetireCard","RetireDeployed",[kind |-> "NoCost"],"OwnDeployed",{})] f == MustInstructionFixture912("Specimen0084",1,"BarrierInstruction","Choice","SideB","SchemaAtom016","ChooseEffect",options,world,27400+id) NeutralValue00014 == [option \in DOMAIN options |-> MustProfileFixture912(f.declaration,f.site,world,option, IF option="Pay2" THEN {{}} ELSE {{object} : object \in deployed}, IF option="Pay2" THEN {[key \in {"CashSideB"} |-> 2]} ELSE {MustEmptyPayment912},{})] IN [f |-> f,evaluation |-> MustEvaluationFixture912(f,NeutralValue00014)] MustExampleFamily016SuccessiveChecks912 == LET first == MustExampleFamily016Fixture912(3,1,{}) SchemaAtom187 == MustExampleFamily016Fixture912(1,2,{}) IN /\ MustFullyResolvable912(first.f.declaration,first.f.world,first.evaluation)={"Pay2"} /\ MustChooseValid912(first.f,first.evaluation,MustDecisionFixture912(first.f,"Choose","Pay2")) /\ ~MustChooseValid912(first.f,first.evaluation,MustDecisionFixture912(first.f,"Choose","RetireDeployed")) /\ first.f.world.resources["CashSideB"]-2=SchemaAtom187.f.world.resources["CashSideB"] /\ first.f.site.context.currentRef#SchemaAtom187.f.site.context.currentRef /\ MustFullyResolvable912(SchemaAtom187.f.declaration,SchemaAtom187.f.world,SchemaAtom187.evaluation)={} /\ MustChooseValid912(SchemaAtom187.f,SchemaAtom187.evaluation,MustDecisionFixture912(SchemaAtom187.f,"NoEffect","NoValue")) /\ ~MustChooseValid912(SchemaAtom187.f,SchemaAtom187.evaluation,MustDecisionFixture912(SchemaAtom187.f,"Choose","Pay2")) MustExampleFamily016MatrixChecks912 == \A resourceUnits \in 0..3, deployed \in {{},{2}} : LET s == MustExampleFamily016Fixture912(resourceUnits,1,deployed) expected == (IF resourceUnits>=2 THEN {"Pay2"} ELSE {}) \cup (IF deployed#{} THEN {"RetireDeployed"} ELSE {}) IN /\ MustFullyResolvable912(s.f.declaration,s.f.world,s.evaluation)=expected /\ expected={} => MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"NoEffect","NoValue")) /\ \A option \in expected : MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose",option)) MustSpecimen0086Fixture912(resourceUnits,hasObjective) == LET objects == [id \in {2} \cup IF hasObjective THEN {3} ELSE {} |-> IF id=2 THEN CardObject9("Specimen0014","Play",TRUE,"Down") ELSE CardObject9("Specimen0258","SideAObjectiveCompletion",FALSE,"Up")] resources == MustResourcesFixture912(0,resourceUnits,0,0,IF hasObjective THEN 1 ELSE 0) world == MustWorldFixture912(1,objects,resources) options == [option \in {"Activation","SchemaAtom082"} |-> IF option="Activation" THEN MustOptionFixture912(option,"ActivationReferencedBarrier","Activation",[kind |-> "ActivationCost",object |-> 2,baseResourceUnits |-> 4, additional |-> [kind |-> "ForfeitObjective",amount |-> 1,sourceSHA |-> CardFacts9["Specimen0014"].sourceSHA]],"NoNewTarget",{"Specimen0014Forfeit"}) ELSE MustOptionFixture912(option,"AddReferencedBarrierCentralA","AddCentralA",[kind |-> "NoCost"],"NoNewTarget",{})] f == MustInstructionFixture912("Specimen0086",1,"Conditional","Choice","SideA","SchemaAtom016","ChooseEffect",options,world,27500) NeutralValue00014 == [option \in DOMAIN options |-> MustProfileFixture912(f.declaration,f.site,world,option,{{}}, IF option="Activation" THEN {[key \in {"CashSideA","SideAObjective"} |-> IF key="CashSideA" THEN 4 ELSE 1]} ELSE {MustEmptyPayment912},{})] IN [f |-> f,evaluation |-> MustEvaluationFixture912(f,NeutralValue00014)] MustDeclineFixture912(f,option,costs) == ReplacementOverlay99(MustDecisionFixture912(f,"DeclineAdditional",option), [decline |-> [tag |-> "ActualAdditionalCostDecline",declaration |-> f.declaration,site |-> f.site,snapshot |-> f.world, actor |-> f.declaration.actor,option |-> f.declaration.options[option],costs |-> costs]]) MustSpecimen0086OptionsChecks912 == \A resourceUnits \in 0..5,objective \in BOOLEAN : LET s == MustSpecimen0086Fixture912(resourceUnits,objective) expected == {"SchemaAtom082"} \cup IF resourceUnits>=4 /\ objective THEN {"Activation"} ELSE {} IN /\ MustFullyResolvable912(s.f.declaration,s.f.world,s.evaluation)=expected /\ \A option \in expected : MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose",option)) /\ ~MustChooseValid912(s.f,s.evaluation,MustDeclineFixture912(s.f,"Activation",{"Specimen0014Forfeit"})) /\ ~MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"NoEffect","NoValue")) /\ s.f.declaration.actor="SideA" /\ s.f.declaration.controller="SideB" /\ 1 \notin DOMAIN s.f.world.objects /\ s.f.declaration.source=ObjectAbilitySource9(1) MustSpecimen0086ActualActivationChecks912 == LET s == MustSpecimen0086Fixture912(4,TRUE) decision == MustDecisionFixture912(s.f,"Choose","Activation") committed == MustAfterFixture912(s.f,s.evaluation,decision) objects == s.f.world.objects removed == [id \in {2,13} |-> IF id=2 THEN objects[2] ELSE [objects[3] EXCEPT !.zone="Removed",!.loc="Removed"]] start == OpenActivation8(27510,2,committed) paid == [start EXCEPT !.stage="CostCheckpoint",!.transaction=27511] ready == [paid EXCEPT !.stage="TurnFaceUp"] done == [ready EXCEPT !.stage="Complete",!.complete=TRUE,!.result="ItemActivated"] activated == [removed EXCEPT ![2].face="Up",![2].activated=TRUE] permission == [route |-> "CardEffect",effectAuthorizes |-> committed.chosen="Activation" /\ committed.declaration.card="Specimen0086"] IN /\ MustChooseValid912(s.f,s.evaluation,decision) /\ ForfeitPlan8(objects,3,{}).valid /\ ForfeitObjectivePost8(objects,removed,3,13,{1,2,3}) /\ ForfeitObjectiveCompletionMembership8({3},{},3) /\ PayActivation8(start,paid,removed,permission,TRUE,27511) /\ DrainActivationCostCheckpoint8(paid,ready,27511,TRUE) /\ FinishActivation8(ready,done,removed,activated,TRUE,{[tag |-> "Activation",object |-> 2,activationId |-> 27510]}) /\ ~PayActivation8(start,paid,objects,permission,FALSE,27511) /\ s.f.world.resources["CashSideA"]-4=0 /\ activated[2].card="Specimen0014" MustABRFixture912(resourceUnits,traversalEvent,exampleFamily056) == LET abr == CardObject9("Specimen0009","Play",TRUE,"Up") event == ReplacementOverlay99(CardObject9("NeutralValue00002","SideBHand",FALSE,"Down"),[playCost |-> 0,playX |-> FALSE,subtypes |-> {"SchemaAtom138","SchemaAtom139"}]) objects == [id \in {1} \cup (IF exampleFamily056 THEN {2} ELSE {}) \cup (IF traversalEvent THEN {8} ELSE {}) |-> IF id=1 THEN abr ELSE IF id=2 THEN CardObject9("Specimen0216","Play",FALSE,"Up") ELSE event] baseWorld == MustWorldFixture912(1,objects,MustResourcesFixture912(resourceUnits,0,0,0,0)) world == [baseWorld EXCEPT !.cardActivity=[id \in DOMAIN objects |-> IF id=2 THEN TRUE ELSE baseWorld.cardActivity[id]]] syntax == SyntaxFixture93(27200,"Static","SideB","Support",<>) d == [syntax |-> syntax,activity |-> AbilityDefinition9(27200,"Static",syntax.source,"Printed")] options == [option \in {"BasicTraversal","PlayTraversalEvent"} |-> IF option="BasicTraversal" THEN MustOptionFixture912(option,"BasicTraversal","FirstActionPointAction",[kind |-> "TraversalInitiation",additionalResourceUnits |-> IF exampleFamily056 THEN 1 ELSE 0, sourceSHA |-> IF exampleFamily056 THEN CardFacts9["Specimen0216"].sourceSHA ELSE "NoValue"],"NoNewTarget",IF exampleFamily056 THEN {"Specimen02161"} ELSE {}) ELSE MustOptionFixture912(option,"BasicPlayTraversalEvent","FirstActionPointAction",[kind |-> "PlayCost",event |-> 8,resourceUnits |-> 0],"NoNewTarget",{})] declaration == [tag |-> "NormalizedMustDeclaration",card |-> "Specimen0009",sourceSHA |-> CardFacts9["Specimen0009"].sourceSHA, source |-> syntax.source,definition |-> d,controller |-> "SideB",actor |-> "SideB",origin |-> "ActionRestriction", form |-> "Requirement",means |-> "SchemaAtom016",goal |-> "FirstActionPointAction",options |-> options,actionScope |-> "FirstActionPoint"] window == PaidWindowFixture95(27600,"NeutralValue00001","SideB") site == [tag |-> "CurrentMustDecisionSite",id |-> 27204,snapshotId |-> world.id,window |-> window,activeRequirement |-> declaration] f == [declaration |-> declaration,site |-> site,before |-> NewMustDecision912(27205,declaration,site),world |-> world] NeutralValue00014 == [option \in DOMAIN options |-> MustProfileFixture912(declaration,site,world,option,{{}}, IF option="BasicTraversal" THEN {[key \in {"CashSideB"} |-> IF exampleFamily056 THEN 1 ELSE 0]} ELSE {MustEmptyPayment912}, IF option="PlayTraversalEvent" /\ ~traversalEvent THEN {"MissingReferent"} ELSE {})] IN [f |-> f,evaluation |-> MustEvaluationFixture912(f,NeutralValue00014),window |-> window,event |-> event] MustSpecimen0216DeclineChecks912 == LET s == MustABRFixture912(1,FALSE,TRUE) decline == MustDeclineFixture912(s.f,"BasicTraversal",{"Specimen02161"}) after == MustAfterFixture912(s.f,s.evaluation,decline) IN /\ MustSourceBound912(s.f.declaration,s.f.site,s.f.world,CardFacts9) /\ MustChooseValid912(s.f,s.evaluation,decline) /\ after.disposition="DeclineAdditional" /\ after.chosen="NoValue" /\ MustChooseValid912(s.f,s.evaluation,MustDecisionFixture912(s.f,"Choose","BasicTraversal")) /\ ~MustChooseValid912(s.f,s.evaluation,MustDeclineFixture912(s.f,"BasicTraversal",{"DirectPayResourceUnits"})) /\ s.f.declaration.definition.syntax.kind="Static" /\ ~MustChooseValid912(s.f,s.evaluation,MustDeclineFixture912(s.f,"PlayTraversalEvent",{"Specimen02161"})) MustABRCurrentTraversalEventChecks912 == LET s == MustABRFixture912(0,TRUE,FALSE) choice == MustDecisionFixture912(s.f,"Choose","PlayTraversalEvent") start == OpenPlay8(27610,8,"SideB",s.window.id) played == [id \in {1,18} |-> IF id=1 THEN s.f.world.objects[1] ELSE PlayedPlacementRow8(s.event,TRUE)] b == [start EXCEPT !.object=18,!.stage="ProcedureCode0f076861472c",!.kind="Action",!.subtypes={"SchemaAtom138","SchemaAtom139"}] IN /\ MustChooseValid912(s.f,s.evaluation,choice) /\ MustFullyResolvable912(s.f.declaration,s.f.world,s.evaluation)={"BasicTraversal","PlayTraversalEvent"} /\ "SchemaAtom138" \in s.event.subtypes /\ s.event.card="NeutralValue00002" /\ s.event.playCost=0 /\ BeginPlay8(start,b,s.f.world.objects,played,18,{1,8},TRUE) /\ ~MustChooseValid912(s.f,s.evaluation,MustDeclineFixture912(s.f,"PlayTraversalEvent",{"Specimen02161"})) MustExampleFamily046Fixture912 == LET original == NormalizationSpecimen0068Fixture911 source == ObjectAbilitySource9(4) d == [original.definition EXCEPT !.syntax.source=source,!.activity.source=source] p == [original EXCEPT !.source=source,!.definition=d,!.lexemes=LexicalSingleFixture99(d,"Specimen0068","take",2,"EffectOperator",CardFacts9)] objects == [id \in {1,4} |-> IF id=1 THEN CardObject9("Specimen0070","Play",TRUE,"Up") ELSE [CardObject9("Specimen0068","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] world == ReplacementOverlay99(MustWorldFixture912(1,objects,MustResourcesFixture912(0,0,0,0,0)),[traversal |-> TraversalFixture92("ProcedureCodeda7bff1d9270")]) options == [option \in {"ExposureMarker","EndTraversal"} |-> MustOptionFixture912(option,"Effect",option,[kind |-> "NoCost"],"NoNewTarget",{})] r == [NewInstructionRuntime911(27700,p,"Conditional","Play",27701) EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == [OpenInstruction93(5001,"Ability",27700,source,"Play",1,"NoValue",p.nodes[5001].steps,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] declaration == [tag |-> "NormalizedMustDeclaration",card |-> "Specimen0068",sourceSHA |-> CardFacts9["Specimen0068"].sourceSHA, source |-> source,definition |-> d,controller |-> "SideA",actor |-> "SideB",origin |-> "Instruction", form |-> "Choice",means |-> "SchemaAtom016",goal |-> "ChooseEffect",options |-> options] context == [id |-> 27702,phase |-> "Resolving",currentWorld |-> 1,currentRef |-> InstructionWindowRef93(plan), actualEffects |-> [id \in {1} |-> [kind |-> "InstructionChoice",controlNode |-> 5001,options |-> {"ExposureMarker","EndTraversal"},chooser |-> "SideB",must |-> declaration]]] boundary == GraphInstructionBoundary911(r,context,{"InstructionEnd"},0) caller == GraphBoundaryCaller911(boundary) site == [tag |-> "CurrentMustDecisionSite",id |-> 27703,snapshotId |-> 1,context |-> context,plan |-> plan,ability |-> r.ability,operation |-> 1, checkpointCaller |-> caller,checkpointSource |-> [source |-> source,instruction |-> context.currentRef,caller |-> caller]] f == [declaration |-> declaration,site |-> site,before |-> NewMustDecision912(27704,declaration,site),world |-> world] NeutralValue00014 == [option \in DOMAIN options |-> MustProfileFixture912(declaration,site,world,option,{{}},{MustEmptyPayment912}, IF option="EndTraversal" /\ ~TraversalTimingPresent6(world.traversal) THEN {"MissingReferent"} ELSE {})] evaluation == MustEvaluationFixture912(f,NeutralValue00014) decision == MustDecisionFixture912(f,"Choose","ExposureMarker") committed == MustAfterFixture912(f,evaluation,decision) returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef,snapshotId |-> 1, effects |-> context.actualEffects,complete |-> TRUE,childrenReturned |-> TRUE] control == [tag |-> "ResolvedInstructionControl",instance |-> r.id,node |-> 5001,instruction |-> context.currentRef,contextId |-> context.id, actualEffects |-> context.actualEffects,completion |-> returned,mode |-> "Selected",operation |-> 1,option |-> "ExposureMarker",chooser |-> "SideB"] afterPlan == [plan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=plan.steps] step == [tag |-> "InstructionStepReturn",instruction |-> 5001,index |-> 1,step |-> Head(plan.steps),complete |-> TRUE,expectedReturn |-> returned] afterR == [r EXCEPT !.phase="Checkpoint",!.pc=5002,!.visited= <<5001>>,!.choices=[i \in {1} |-> control],!.boundary=boundary, !.ability.phase="Between",!.ability.instructions= <<5001,5002>>] seed == NewConditionalLedger96(ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,objects)) cp == [ConditionalCheckpointFixture96(seed,1,ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",Empty9,objects), ConditionalSnapshotFixture96(11,1,"ProcedureCodee605a78f5d5e",Empty9,objects),Empty9) EXCEPT !.caller=caller] ledger == ConditionalCommittedFixture96(seed,Empty9,cp,Empty9,Empty9,Empty9) cpReceipt == [tag |-> "MustChoiceCheckpoint",id |-> 1,requirement |-> committed.id,decision |-> decision.id,complete |-> TRUE,allNewerChainsComplete |-> TRUE] graphReceipt == [tag |-> "GraphInstructionCheckpoint",id |-> 1,instance |-> r.id,source |-> source,boundary |-> boundary,complete |-> TRUE,allNewerChainsComplete |-> TRUE] readyR == [afterR EXCEPT !.phase="Targets",!.checkpoint=1] lifeWorld == [LifetimeWorldFixture910 EXCEPT !.id=11,!.objects=objects] authority == NewLifetimeAuthority910(lifeWorld) registry == ReplacementOverlay99(NewLingeringRegistry910,[frontier |-> LifetimeFrontier910(authority,1)]) nextPlan == OpenInstruction93(5002,"Ability",r.id,source,"Play",2,"NoValue",p.nodes[5002].steps,FALSE) targets == [InstructionTargetsFixture93(nextPlan) EXCEPT !.targets={}] imminentPlan == [nextPlan EXCEPT !.phase="Imminent",!.announced=TRUE] imminentR == [readyR EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.phase="Imminent",!.ability.cursor=2] entryReceipt == ReplacementOverlay99(InstructionEntryFixture93(nextPlan),[checkpointId |-> 1]) entry == [tag |-> "ActualChosenMustEffectEntry",requirement |-> committed.id,decision |-> decision,option |-> options["ExposureMarker"],actor |-> "SideB", source |-> source,checkpointId |-> 1,instruction |-> InstructionWindowRef93(imminentPlan)] resolving == [committed EXCEPT !.phase="Resolving",!.result=[entry |-> entry]] IN [f |-> f,p |-> p,r |-> r,plan |-> plan,context |-> context,evaluation |-> evaluation,decision |-> decision,committed |-> committed, returned |-> returned,control |-> control,afterPlan |-> afterPlan,step |-> step,boundary |-> boundary,afterR |-> afterR, seed |-> seed,cp |-> cp,ledger |-> ledger,cpReceipt |-> cpReceipt,graphReceipt |-> graphReceipt,readyR |-> readyR, authority |-> authority,registry |-> registry,nextPlan |-> nextPlan,targets |-> targets,imminentPlan |-> imminentPlan,imminentR |-> imminentR, entryReceipt |-> entryReceipt,entry |-> entry,resolving |-> resolving] MustExampleFamily046ChoiceValid912(s) == /\ CompiledInstructionTechnique911(s.p,s.f.world.objects,CardFacts9) /\ MustChooseValid912(s.f,s.evaluation,s.decision) /\ FinishRuntimeInstruction911(s.r,s.afterR,s.plan,s.afterPlan,s.context,s.returned,s.step,s.control,[tag |-> "NoInstructionPayment"],s.boundary) /\ ProcessConditionalCheckpoint96(s.seed,s.ledger,<<>>,<<>>,Empty9,s.cp,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ CompleteRuntimeCheckpoint911(s.afterR,s.readyR,s.ledger,<<>>,s.graphReceipt,s.registry,s.authority) /\ EnterRuntimeInstructionCore911(s.readyR,s.imminentR,s.nextPlan,s.imminentPlan,s.targets,s.entryReceipt,s.ledger,<<>>,s.registry,s.authority) /\ EnterChosenMust912(s.committed,s.resolving,s.ledger,<<>>,s.cpReceipt,s.entry) MustExampleFamily046ChoiceBoundaryChecks912 == LET s == MustExampleFamily046Fixture912 IN /\ MustExampleFamily046ChoiceValid912(s) /\ s.f.declaration.controller="SideA" /\ s.decision.actor="SideB" /\ s.resolving.chosen="ExposureMarker" /\ s.imminentR.pc=5002 /\ s.afterR.pc#5003 /\ ~MustChooseValid912(s.f,s.evaluation,[s.decision EXCEPT !.actor="SideA"]) /\ ~MustChooseValid912([s.f EXCEPT !.before=s.committed],s.evaluation,MustDecisionFixture912(s.f,"Choose","EndTraversal")) /\ ~EnterChosenMust912(s.committed,s.resolving,s.ledger,<<>>,[s.cpReceipt EXCEPT !.allNewerChainsComplete=FALSE],s.entry) /\ ~EnterChosenMust912(s.committed,[s.resolving EXCEPT !.result.entry.option=s.f.declaration.options["EndTraversal"]],s.ledger,<<>>,s.cpReceipt, [s.entry EXCEPT !.option=s.f.declaration.options["EndTraversal"]]) MustExampleFamily046Specimen0070Fixture912 == LET s == MustExampleFamily046Fixture912 q == FullSpecimen0070CallbackFixture99 source == ObjectAbilitySource9(4) initialRef == InstructionWindowRef93(s.imminentPlan) callerMember == ConditionalInstance9(s.r.id,s.p.definition.syntax.id,source,"SideA",TRUE,277,s.r.ability.caller,FALSE) callerOpen == WindowFixture92(s.r.ability.caller,"Reaction",TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",2),[id \in {s.r.id} |-> callerMember],277,NoTimingRef9) callerSideBReady == ReadyFixture92(callerOpen) callerPassed == PassPriorityFrame9(callerSideBReady) callerReady == ReadyFixture92(callerPassed) callerOption == ConditionalOptionFixture92(callerReady,s.r.id) caller == StartedFixture92(callerReady,callerOption) owner == [windowId |-> caller.id,option |-> caller.busy,transaction |-> caller.busyTransaction] selection == [q.selected EXCEPT !.contextId=27720,!.imminenceId=27721,!.selectedReference=initialRef,!.snapshotId=11] objects == ReplacementOverlay99(q.world.objects,[id \in {4} |-> s.f.world.objects[4]]) world == ReplacementOverlay99([q.world EXCEPT !.objects=objects,!.controllers=[id \in DOMAIN objects |-> objects[id].side], !.traversalControl=PaidTraversalControlFixture95(s.f.world.traversal)], [interruptSelections |-> [id \in {q.s.p.id} |-> selection]]) beforeObjects == ReplacementOverlay99(q.s.objects,[id \in {4} |-> s.f.world.objects[4]]) initialWorld == [world EXCEPT !.id=11,!.objects=beforeObjects,!.controllers=[id \in DOMAIN beforeObjects |-> beforeObjects[id].side], !.entries=[id \in {27721} |-> s.entry]] origin0 == [kind |-> "Instruction",plan |-> s.imminentPlan,parent |-> s.imminentR.ability,ruleStep |-> "NoValue"] origin == [origin0 EXCEPT !.plan.revision=1] effects == [id \in {401} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id,"ExposureMarkers",FALSE,0), [value |-> 1,preventable |-> TRUE,baseOrigin |-> source,baseController |-> "SideA",actor |-> "SideB",targetSite |-> "NoValue"])] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> initialRef,source |-> source, snapshotId |-> 11,effects |-> effects,order |-> <<401>>] initial == NewExpectedContext99(27720,27721,origin0,initialWorld,description,effects,owner) observation == InitialWouldObservation99(initial,27722) history == InitialCaptureAfterFixture99(NewWouldAccounting99,initial,observation) opened == [initial EXCEPT !.phase="WindowOpen",!.windowId=q.s.busy.id,!.group=q.s.busy.group,!.site=q.s.site] projection == StaticRefreshReceiptFixture99(opened,world,effects) parent == StaticRefreshAfterFixture99(opened,origin,world,effects) operation == [q.operation EXCEPT !.parentContextId=parent.id,!.parentImminenceId=parent.imminenceId,!.parentReference=WouldContextKey99(initialRef)] modifier == [q.atomic EXCEPT !.actualEffects=[id \in {operation.id} |-> operation]] returned == [modifier EXCEPT !.phase="Returned"] actualReturn == [q.actualReturn EXCEPT !.effects=modifier.actualEffects] window == [q.s.busy EXCEPT !.instruction=initialRef] call == [q.call EXCEPT !.stack= <>,!.step.expectedControl=operation,!.step.expectedReturn=actualReturn] afterEffects == [effects EXCEPT ![401].value=0] afterOrigin == [origin EXCEPT !.plan.revision=2] after == [parent EXCEPT !.currentRef=OriginReference99(afterOrigin),!.state.effects=afterEffects, !.state.ancestry=[id \in DOMAIN afterEffects |-> parent.state.ancestry[id]],!.ancestryArchive=ReplacementOverlay99(@,parent.state.ancestry), !.removedEffects=@ \cup (DOMAIN effects \ DOMAIN afterEffects),!.modificationIds=@ \cup {operation.operationId}, !.modifications=Append(@,[kind |-> operation.kind,operation |-> operation,modifier |-> modifier.currentRef, beforeEffects |-> effects,afterEffects |-> afterEffects,from |-> parent.currentRef,to |-> OriginReference99(afterOrigin)])] resolved == ResolvedControlReceipt99(parent,after,modifier,call.before,operation) bodyReturn == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> parent.id,instruction |-> after.currentRef, snapshotId |-> world.id,effects |-> afterEffects,complete |-> TRUE,childrenReturned |-> TRUE] completion == [tag |-> "MustChosenEffectReturn",requirement |-> s.resolving.id,decision |-> s.decision,entry |-> s.entry, actualReturn |-> bodyReturn,originalAdditionalDeclines |-> {}] complete == [s.resolving EXCEPT !.phase="Complete",!.result=completion] IN [s |-> s,q |-> q,world |-> world,initialWorld |-> initialWorld,origin0 |-> origin0,initial |-> initial,observation |-> observation,history |-> history, opened |-> opened,projection |-> projection,origin |-> origin,parent |-> parent,caller |-> caller,callerReady |-> callerReady, callerSideBReady |-> callerSideBReady,callerPassed |-> callerPassed,callerOption |-> callerOption, operation |-> operation,modifier |-> modifier,returned |-> returned,actualReturn |-> actualReturn,call |-> call,selection |-> selection, afterEffects |-> afterEffects,afterOrigin |-> afterOrigin,after |-> after,resolved |-> resolved,bodyReturn |-> bodyReturn, completion |-> completion,complete |-> complete] MustExampleFamily046Specimen0070Checks912 == LET f == MustExampleFamily046Specimen0070Fixture912 IN /\ MustExampleFamily046ChoiceValid912(f.s) /\ FullSpecimen0070CallbackValid99(f.q) /\ PassPriority9(<>,<>,"SideB",Empty9) /\ CheckpointPriority9(<>,<>,CheckpointFixture92(f.callerPassed)) /\ BeginPriorityOption9(<>,<>,f.callerOption,f.s.f.world.objects,LegalityFixture92(f.callerReady,f.callerOption),Empty9) /\ f.parent.owner=[windowId |-> f.caller.id,option |-> f.caller.busy,transaction |-> f.caller.busyTransaction] /\ f.parent.owner.windowId=f.origin.parent.caller /\ PriorityStackValid9(f.call.stack) /\ InitialWouldCaptured99(f.initial,f.history) /\ RefreshExpectedWorld99(f.opened,f.parent,f.origin0,f.origin,f.world,f.projection,f.history) /\ ResolvePaidInterruptAndReturn99(f.parent,f.after,f.origin,f.afterOrigin,f.modifier,f.returned,f.world,f.selection,f.call,f.operation, f.afterEffects,f.resolved,f.actualReturn,CardFacts9) /\ f.afterEffects[401].kind="ExposureMarkers" /\ f.afterEffects[401].value=0 /\ CompleteChosenMust912(f.s.resolving,f.complete,f.bodyReturn,f.completion) /\ f.complete.chosen="ExposureMarker" /\ f.complete.declaration.options["ExposureMarker"]=f.s.f.declaration.options["ExposureMarker"] /\ f.complete.decision=f.s.decision /\ f.s.afterR.pc=5002 /\ f.s.afterR.pc#5003 /\ f.q.s.paid.costPaid /\ f.q.s.paid.ability.detached /\ 1 \notin DOMAIN f.world.objects /\ ~MustChooseValid912([f.s.f EXCEPT !.before=f.complete],f.s.evaluation, MustDecisionFixture912(f.s.f,"Choose","EndTraversal")) MustSpecimen0211PermissionUseChecks912 == LET s == MustItemInspectionFixture912(FALSE,TRUE,TRUE,FALSE,FALSE) payment == [id |-> 27800,complete |-> TRUE,paidCounterIds |-> {5},costType |-> "Retire",inspectedItem |-> 2] permission == [paymentId |-> payment.id,source |-> ObjectAbilitySource9(3),paidCounters |-> {5}, allowsPayment |-> payment.costType="Retire" /\ s.f.world.objects[3].card="Specimen0211" /\ s.f.world.cardActivity[3]] IN /\ s.f.world.resources["CashSideB"]=4 /\ s.f.world.resources["Specimen0211ResourceUnits"]=2 /\ s.f.world.objects[5].host=3 /\ s.f.world.objects[5].kind="ResourceUnit" /\ s.f.world.objects[5].form="Counter" /\ MustResourcePlanAffordable912([key \in {"CashSideB","Specimen0211ResourceUnits"} |-> IF key="CashSideB" THEN 4 ELSE 1],s.f.world) /\ CounterPermissionUseSources9(payment,[id \in {3} |-> permission])={ObjectAbilitySource9(3)} MustImpUnavailableChecks912 == LET s == MustItemInspectionFixture912(FALSE,TRUE,FALSE,FALSE,FALSE) objects == [s.f.world.objects EXCEPT ![1].face="Down"] inactive == [s.c EXCEPT !.objects=objects] prohibited == [s.c EXCEPT !.useProhibitions={[source |-> s.d.syntax.source,traversalId |-> 2]}] IN /\ ~PaidEligibility99(s.d,s.lex,inactive,s.w,CardFacts9) /\ ~PaidEligibility99(s.d,s.lex,prohibited,s.w,CardFacts9) /\ \A context \in {inactive,prohibited} : LET world == [s.f.world EXCEPT !.objects=context.objects] f == MustInstructionFixture912("Specimen0148",2,"Conditional","Requirement","SideB","SchemaAtom016","RetireItemInspectioned", s.f.declaration.options,world,27302) NeutralValue00014 == [option \in DOMAIN f.declaration.options |-> MustProfileFixture912(f.declaration,f.site,world,option,{{}}, IF option="Imp" THEN {[key \in {"ImpCluster"} |-> 1]} ELSE {[key \in {"CashSideB"} |-> 5]}, IF option="Imp" /\ ~PaidEligibility99(s.d,s.lex,context,s.w,CardFacts9) THEN {"UnavailableAbility"} ELSE {})] evaluation == MustEvaluationFixture912(f,NeutralValue00014) IN /\ MustFullyResolvable912(f.declaration,world,evaluation)={} /\ MustChooseValid912(f,evaluation,MustDecisionFixture912(f,"NoEffect","NoValue")) /\ ~MustChooseValid912(f,evaluation,MustDecisionFixture912(f,"Choose","Imp")) MustEnteredEffectFixture912(s,option) == LET decision == MustDecisionFixture912(s.f,"Choose",option) committed == MustAfterFixture912(s.f,s.evaluation,decision) seed == NewConditionalLedger96(ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,s.f.world.objects)) cp == [ConditionalCheckpointFixture96(seed,1,ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",Empty9,s.f.world.objects), ConditionalSnapshotFixture96(11,1,"ProcedureCodee605a78f5d5e",Empty9,s.f.world.objects),Empty9) EXCEPT !.caller=MustChoiceCaller912(committed)] ledger == ConditionalCommittedFixture96(seed,Empty9,cp,Empty9,Empty9,Empty9) checkpoint == [tag |-> "MustChoiceCheckpoint",id |-> 1,requirement |-> committed.id,decision |-> decision.id,complete |-> TRUE,allNewerChainsComplete |-> TRUE] plan == [s.f.site.plan EXCEPT !.id=@+1,!.phase="Imminent",!.index=@+1] entry == [tag |-> "ActualChosenMustEffectEntry",requirement |-> committed.id,decision |-> decision, option |-> committed.declaration.options[option],actor |-> committed.declaration.actor,source |-> committed.declaration.source, checkpointId |-> 1,instruction |-> InstructionWindowRef93(plan)] resolving == [committed EXCEPT !.phase="Resolving",!.result=[entry |-> entry]] returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> 27810,instruction |-> entry.instruction,snapshotId |-> 11, effects |-> Empty9,complete |-> TRUE,childrenReturned |-> TRUE] IN [s |-> s,decision |-> decision,committed |-> committed,seed |-> seed,cp |-> cp,ledger |-> ledger, checkpoint |-> checkpoint,entry |-> entry,resolving |-> resolving,returned |-> returned] MustAdditionalChoiceReturnChecks912 == LET s == MustSpecimen0086Fixture912(4,TRUE) f == MustEnteredEffectFixture912(s,"Activation") completion == [tag |-> "MustChosenEffectReturn",requirement |-> f.resolving.id,decision |-> f.decision,entry |-> f.entry, actualReturn |-> f.returned,originalAdditionalDeclines |-> {}] after == [f.resolving EXCEPT !.phase="Complete",!.result=completion] declined == [completion EXCEPT !.originalAdditionalDeclines={"Specimen0014Forfeit"}] declinedAfter == [f.resolving EXCEPT !.phase="Complete",!.result=declined] IN /\ MustChooseValid912(s.f,s.evaluation,f.decision) /\ ProcessConditionalCheckpoint96(f.seed,f.ledger,<<>>,<<>>,Empty9,f.cp,Empty9,Empty9,Empty9,Empty9,Empty9,{}) /\ EnterChosenMust912(f.committed,f.resolving,f.ledger,<<>>,f.checkpoint,f.entry) /\ CompleteChosenMust912(f.resolving,after,f.returned,completion) /\ ~CompleteChosenMust912(f.resolving,declinedAfter,f.returned,declined) MustBindingAndReplayChecks912 == LET s == MustExampleFamily016Fixture912(3,1,{}) decision == MustDecisionFixture912(s.f,"Choose","Pay2") after == MustAfterFixture912(s.f,s.evaluation,decision) IN /\ \A bad \in {[decision EXCEPT !.actor="SideA"],[decision EXCEPT !.requirement=999],[decision EXCEPT !.site.id=999], [decision EXCEPT !.snapshot.resources["CashSideB"]=1]} : ~DecideMust912(s.f.before,MustAfterFixture912(s.f,s.evaluation,bad),s.f.world,s.evaluation,bad,CardFacts9) /\ ~DecideMust912(after,after,s.f.world,s.evaluation,decision,CardFacts9) /\ ~DecideMust912(s.f.before,after,s.f.world,[s.evaluation EXCEPT !.actor="SideA"],decision,CardFacts9) /\ ~DecideMust912(s.f.before,after,s.f.world,[s.evaluation EXCEPT !.options["Pay2"].source=ObjectAbilitySource9(2)],decision,CardFacts9) /\ ~DecideMust912(s.f.before,after,s.f.world,[s.evaluation EXCEPT !.options["Pay2"].ordinary.failures={"DeclinedAdditional"}],decision,CardFacts9) MustABRScopeChecks912 == LET s == MustABRFixture912(1,FALSE,TRUE) decision == MustDecisionFixture912(s.f,"Choose","BasicTraversal") after == MustAfterFixture912(s.f,s.evaluation,decision) noCost == MustABRFixture912(1,FALSE,FALSE) IN /\ ~MustSourceBound912(s.f.declaration,s.f.site,[s.f.world EXCEPT !.actionPointsSpent=1],CardFacts9) /\ ~MustSourceBound912(s.f.declaration,[s.f.site EXCEPT !.window.site.actionPoints=0],s.f.world,CardFacts9) /\ ~MustChooseValid912(noCost.f,noCost.evaluation,MustDeclineFixture912(noCost.f,"BasicTraversal",{"DirectPayResourceUnits"})) /\ ~EnterChosenMust912(after,[after EXCEPT !.phase="Resolving"],NewConditionalLedger96(ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,s.f.world.objects)),<<>>, [tag |-> "MustChoiceCheckpoint",id |-> 0],[tag |-> "UnrelatedEntry"]) MustChosenEntryBindingsChecks912 == LET s == MustExampleFamily046Fixture912 entries == {[s.entry EXCEPT !.requirement=999],[s.entry EXCEPT !.decision.id=999], [s.entry EXCEPT !.actor="SideA"],[s.entry EXCEPT !.source=ObjectAbilitySource9(1)], [s.entry EXCEPT !.checkpointId=999],[s.entry EXCEPT !.instruction.source=ObjectAbilitySource9(1)], [s.entry EXCEPT !.instruction.abilityInstance=999],[s.entry EXCEPT !.instruction=InstructionWindowRef93(s.plan)]} IN /\ MustExampleFamily046ChoiceValid912(s) /\ \A entry \in entries : ~EnterChosenMust912(s.committed,[s.committed EXCEPT !.phase="Resolving",!.result=[entry |-> entry]], s.ledger,<<>>,s.cpReceipt,entry) /\ ~EnterChosenMust912(s.committed,s.resolving,s.ledger,<<>>,[s.cpReceipt EXCEPT !.decision=999],s.entry) /\ ~EnterChosenMust912(s.committed,s.resolving,s.ledger,<<>>,[s.cpReceipt EXCEPT !.requirement=999],s.entry) /\ ~EnterChosenMust912(s.committed,s.resolving,[s.ledger EXCEPT !.checkpoints[1].caller.boundary.instance=999],<<>>,s.cpReceipt,s.entry) MustChosenReturnBindingsChecks912 == LET f == MustEnteredEffectFixture912(MustSpecimen0086Fixture912(4,TRUE),"Activation") completion == [tag |-> "MustChosenEffectReturn",requirement |-> f.resolving.id,decision |-> f.decision,entry |-> f.entry, actualReturn |-> f.returned,originalAdditionalDeclines |-> {}] returns == {[f.returned EXCEPT !.instruction.id=999],[f.returned EXCEPT !.instruction.source=ObjectAbilitySource9(2)], [f.returned EXCEPT !.complete=FALSE],[f.returned EXCEPT !.childrenReturned=FALSE]} IN /\ \A returned \in returns : LET changed == [completion EXCEPT !.actualReturn=returned] IN ~CompleteChosenMust912(f.resolving,[f.resolving EXCEPT !.phase="Complete",!.result=changed],returned,changed) /\ \A changed \in {[completion EXCEPT !.requirement=999],[completion EXCEPT !.decision.id=999], [completion EXCEPT !.entry.actor="SideB"],[completion EXCEPT !.actualReturn.snapshotId=999]} : ~CompleteChosenMust912(f.resolving,[f.resolving EXCEPT !.phase="Complete",!.result=changed],f.returned,changed) PersistentExampleFamily002DefinitionFixture912 == LET d == ConditionalDefinitionFixture96(19000,"Specimen0010","Trigger","TraversalEnds","SchemaAtom016","SideB","SideB") IN [d EXCEPT !.syntax.units= <> \o @,!.triggerRequirements={2}] PersistentDoppelDefinitionFixture912 == LET d == ConditionalDefinitionFixture96(19001,"Specimen0076","Trigger","TraversalEnds","SchemaAtom016","SideB","SideB") IN [d EXCEPT !.syntax.source=ObjectAbilitySource9(2),!.activity.source=ObjectAbilitySource9(2), !.syntax.units= <> \o @,!.triggerRequirements={3},!.optionalParts={1}] PersistentBirthProposedFixture912(registry,inventory,trash,effectIds,world) == LET cohort == PersistentBirthCohort912(inventory,world) records == [key \in cohort |-> PersistentRecord912(inventory.definitions[key],inventory.lexemes[key],effectIds[key],trash,world)] effects == [id \in {effectIds[key] : key \in cohort} |-> LET key == CHOOSE key \in cohort : effectIds[key]=id IN PersistentEffect912(id,inventory.definitions[key],inventory.lexemes[key],trash,trash.itemInspection.traversalId,world)] IN [registry EXCEPT !.persistent=ReplacementOverlay99(@,records),!.effects=ReplacementOverlay99(@,effects), !.usedEffects=@ \cup DOMAIN effects,!.creations=@ \cup {effects[id].creation : id \in DOMAIN effects},!.persistentRetireIds=@ \cup {trash.id}] PersistentBirthForSourceFixture912(withTraversal,sourceCard,d,doppelDeployed) == LET dg == PersistentDoppelDefinitionFixture912 key == AbilityKey99(d) definitions == [k \in (IF d.syntax.kind="Conditional" THEN {key,ConditionalKey96(dg)} ELSE {ConditionalKey96(dg)}) |-> IF k=key THEN d ELSE dg] sourceLex == LexicalSingleFixture99(d,sourceCard,IF d.syntax.kind="Conditional" THEN "whenever" ELSE "pay",2, IF d.syntax.kind="Conditional" THEN "ActualOccurrenceTrigger" ELSE "StaticDeclaration",CardFacts9) lexemes == [k \in DOMAIN definitions |-> IF k=key THEN sourceLex ELSE LexicalSingleFixture99(dg,"Specimen0076","when",2,"ActualOccurrenceTrigger",CardFacts9)] objects == [id \in {1,2} |-> IF id=1 THEN [CardObject9(sourceCard,"Play",TRUE,"Up") EXCEPT !.activated=TRUE, !.targetSite="SchemaAtom082",!.targetSiteKind="SchemaAtom033",!.area="Root",!.loc= <<"Root","SchemaAtom082">>] ELSE CardObject9("Specimen0076",IF doppelDeployed THEN "Play" ELSE "SideBDiscard",doppelDeployed,"Up")] traversal == IF withTraversal THEN [TraversalFixture92("ProcedureCoded75d879e00ff") EXCEPT !.reachedSuccess=TRUE,!.successful=TRUE,!.position="NoValue"] ELSE NoTraversal6 itemInspection == [OpenItemInspection7(200,1,objects[1],traversal.id,201,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] beforeWorld == [LifetimeWorldFixture910 EXCEPT !.objects=objects,!.present={19000,19001},!.turn=TurnFixture92("SideB"), !.control=[traversal |-> traversal,phaseEndedIds |-> {}],!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.itemInspections=[id \in {200} |-> itemInspection]] beforeAuthority == NewLifetimeAuthority910(beforeWorld) beforeRegistry == NewPersistentRegistry912(ObservedWithFrontier910(NewLingeringRegistry910,beforeAuthority,1)) beforeSnapshot == [ConditionalSnapshotFixture96(1,0,"BeforeItemInspectionRetire",definitions,objects) EXCEPT !.present=beforeWorld.present] beforeLedger == NewConditionalLedger96(beforeSnapshot) inventory == [tag |-> "AuthoritativeSourceAbilityInventory",worldId |-> 1,source |-> d.syntax.source, card |-> sourceCard,sourceSHA |-> CardFacts9[sourceCard].sourceSHA, definitions |-> [k \in {key} |-> d],lexemes |-> [k \in {key} |-> sourceLex]] movement == [tag |-> "CardMovement",kind |-> "Retire",id |-> 210,disposition |-> "Complete",sources |-> {1},successors |-> [id \in {1} |-> 3]] trashEvent == MovementEvent8(210,"Retire",{1}) trash == [tag |-> "ActualSideBItemInspectionRetire",id |-> 210,actor |-> "SideB",source |-> 1,successor |-> 3,itemInspection |-> itemInspection,movement |-> movement, historyBefore |-> Empty9,historyAfter |-> [id \in {210} |-> trashEvent],events |-> {trashEvent}] effectIds == [k \in {key} |-> 55000] created == PersistentBirthProposedFixture912(beforeRegistry,inventory,trash,effectIds,beforeWorld) afterObjects == [id \in {2,3} |-> IF id=2 THEN objects[2] ELSE [objects[1] EXCEPT !.zone="SideADiscard",!.loc="SideADiscard", !.deployed=FALSE,!.activated=FALSE,!.face="Up",!.host=0,!.marks={}]] base == [beforeWorld EXCEPT !.id=2,!.objects=afterObjects,!.present={19001}] afterWorld == PersistentWorld912(base,created) execution == [tag |-> "ActualObjectTransition",id |-> 210,snapshotId |-> 2,source |-> RuleAbilitySource9("ProcedureCode17f2a65162fb"),trash |-> trash] afterAuthority == LifetimeAuthorityAfter910(beforeAuthority,LifetimeKernelTransition910(beforeWorld,afterWorld,execution)) afterRegistry == [created EXCEPT !.frontier=LifetimeFrontier910(afterAuthority,2)] afterLedger == IF withTraversal \/ key \notin DOMAIN beforeLedger.activationEpoch THEN beforeLedger ELSE [beforeLedger EXCEPT !.activationEpoch[key]=1,!.activationSerial=1] afterSnapshot == [ConditionalSnapshotFixture96(2,0,"AfterItemInspectionRetire",definitions,afterObjects) EXCEPT !.present=afterWorld.present,!.activity=afterWorld.activity,!.usedObjects={1,2,3},!.activationEpoch=afterLedger.activationEpoch, !.activationSerial=afterLedger.activationSerial] IN [d |-> d,dg |-> dg,key |-> key,definitions |-> definitions,lexemes |-> lexemes,objects |-> objects,traversal |-> traversal,itemInspection |-> itemInspection, beforeWorld |-> beforeWorld,beforeAuthority |-> beforeAuthority,beforeRegistry |-> beforeRegistry,beforeSnapshot |-> beforeSnapshot,beforeLedger |-> beforeLedger, inventory |-> inventory,trash |-> trash,effectIds |-> effectIds,created |-> created,afterObjects |-> afterObjects,afterWorld |-> afterWorld, execution |-> execution,afterAuthority |-> afterAuthority,afterRegistry |-> afterRegistry,afterLedger |-> afterLedger,afterSnapshot |-> afterSnapshot] PersistentBirthFixture912(withTraversal) == PersistentBirthForSourceFixture912(withTraversal,"Specimen0010",PersistentExampleFamily002DefinitionFixture912,TRUE) PersistentSpecimen0198DefinitionFixture912 == LET syntax == SyntaxFixture93(19000,"Static","SideA","Attachment",<>) IN [syntax |-> syntax,activity |-> AbilityDefinition9(19000,"Static",syntax.source,"Printed"),instructions |-> <<>>] PersistentBirthValid912(f) == CreatePersistentOnRetire912(f.beforeRegistry,f.afterRegistry,f.beforeLedger,f.afterLedger,<<>>,<<>>,f.beforeSnapshot,f.afterSnapshot, f.inventory,f.trash,f.effectIds,{1,2},f.beforeAuthority,f.afterAuthority,CardFacts9) PersistentBirthChecks912 == LET f == PersistentBirthFixture912(TRUE) IN /\ ConditionalDefinitionValid96(f.d) /\ FlagPresent93(f.d.syntax.units,"Persistent") /\ PersistentBirthValid912(f) /\ ConditionalActive96(f.d,f.beforeSnapshot) /\ ConditionalActive96(f.d,f.afterSnapshot) /\ f.afterLedger.activationEpoch=f.beforeLedger.activationEpoch /\ f.afterLedger.activationSerial=f.beforeLedger.activationSerial /\ 1 \notin DOMAIN f.afterObjects /\ f.afterObjects[3].card=f.objects[1].card /\ f.afterRegistry.persistent[f.key].definition=f.d /\ f.afterRegistry.persistent[f.key].definition.syntax.source=ObjectAbilitySource9(1) /\ [ability |-> 19000,source |-> ObjectAbilitySource9(3)] \notin DOMAIN f.afterRegistry.persistent /\ f.afterSnapshot.ordinaryActivity[f.key]=FALSE /\ 19000 \in f.afterSnapshot.present /\ f.afterRegistry.effects[55000].status="Active" /\ f.afterRegistry.effects[55000].originKind="Rule" /\ f.afterRegistry.effects[55000].creation[1]="PersistentItemInspectionRetire" /\ ~StillItemInspectioning7(f.itemInspection,f.afterObjects) PersistentNoTraversalBirthChecks912 == LET f == PersistentBirthFixture912(FALSE) IN /\ PersistentBirthValid912(f) /\ f.afterRegistry.effects[55000].status="Expired" /\ f.afterRegistry.persistent[f.key].phase="Expired" /\ ~f.afterRegistry.persistent[f.key].creationOpen /\ ~ConditionalActive96(f.d,f.afterSnapshot) /\ f.afterLedger.activationEpoch[f.key]=1 /\ 19000 \notin f.afterSnapshot.present /\ ~PersistentGenerationAllowed912(f.afterRegistry,f.d,2) PersistentStaticSourceChecks912 == LET f == PersistentBirthForSourceFixture912(TRUE,"Specimen0198",PersistentSpecimen0198DefinitionFixture912,FALSE) closedCreation == [f.afterRegistry EXCEPT !.persistent[f.key].creationOpen=FALSE,!.persistent[f.key].endCheckpoint=1,!.persistent[f.key].endWindow=400] part == [id |-> 10,ability |-> 19000,conditions |-> {}] conditions == [tag |-> "StaticConditionSnapshot",ability |-> 19000,source |-> ObjectAbilitySource9(1),receipts |-> Empty9] application == [tag |-> "CurrentStaticApplication",worldId |-> 2,traversalId |-> 2] IN /\ PersistentBirthValid912(f) /\ PersistentSourceActive912(f.d,f.afterWorld) /\ PersistentStaticPart912(f.afterRegistry,f.d,part,conditions,f.afterWorld,application,f.afterLedger,f.afterAuthority) /\ PersistentApplicationAllowed912(closedCreation,f.d,2) /\ PersistentSourceActive912(f.d,f.afterWorld) /\ ~PersistentGenerationAllowed912(closedCreation,f.d,2) /\ ~PersistentApplicationAllowed912(f.afterRegistry,f.d,3) PersistentSourceAliasChecks912 == LET f == PersistentBirthFixture912(TRUE) alias == ReboundConditionalDefinition96(f.d,3) independent == [alias EXCEPT !.syntax.id=19002,!.activity.id=19002] otherDefs == ReplacementOverlay99(f.definitions,[key \in {ConditionalKey96(independent)} |-> independent]) archiveSnapshot == [f.afterSnapshot EXCEPT !.definitions=otherDefs,!.present=@ \cup {19002}, !.ordinaryActivity=ReplacementOverlay99(@,[key \in {ConditionalKey96(independent)} |-> FALSE]), !.activationEpoch=ReplacementOverlay99(@,[key \in {ConditionalKey96(independent)} |-> 0])] IN /\ PersistentBirthValid912(f) /\ ~PersistentDefinitionProfile912(f.afterRegistry,alias) /\ ~PersistentGenerationAllowed912(f.afterRegistry,alias,2) /\ PersistentDefinitionProfile912(f.afterRegistry,independent) /\ PersistentDefinitionsProfile912(f.afterRegistry,otherDefs) /\ ~ConditionalActive96(independent,archiveSnapshot) /\ ConditionalActive96(f.d,archiveSnapshot) PersistentNoTraversalCleanupChecks912 == LET f == PersistentBirthFixture912(FALSE) current == [f.afterSnapshot EXCEPT !.point="ProcedureCodee605a78f5d5e",!.checkpointId=1] begin == [current EXCEPT !.point="CheckpointBeginning"] caller == [kind |-> "ItemInspectionRetire",itemInspectionId |-> 200,trashId |-> 210] cp == [ConditionalCheckpointFixture96(f.afterLedger,1,begin,current,Empty9) EXCEPT !.caller=caller] ledger == ConditionalCommittedFixture96(f.afterLedger,f.definitions,cp,Empty9,Empty9,Empty9) scope == [tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> 1,caller |-> caller,traversalId |-> 0] frame == LingeringCheckpointFrame910(ledger,cp,f.afterWorld) afterFrame == [frame EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"] cleanup == [tag |-> "LingeringCheckpointCleanup",frame |-> frame,expired |-> {55000},complete |-> TRUE] afterRegistry == [f.afterRegistry EXCEPT !.effects=Empty9,!.cleanupIds={1}] IN /\ PersistentBirthValid912(f) /\ 55000 \in DOMAIN f.afterRegistry.effects /\ ProcessPersistentCheckpoint912(f.afterRegistry,f.afterLedger,ledger,<<>>,<<>>,f.definitions,f.lexemes,cp, ConditionalConditionsFixture96(f.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,scope,{},CardFacts9,f.afterWorld,f.afterAuthority) /\ OpenLingeringCheckpoint910(ledger,cp,f.afterWorld,frame) /\ CleanupObservedLingering910(f.afterRegistry,afterRegistry,ledger,f.afterAuthority,frame,afterFrame,cleanup) /\ 55000 \notin DOMAIN afterRegistry.effects /\ afterRegistry.persistent[f.key]=f.afterRegistry.persistent[f.key] /\ afterRegistry.usedEffects=f.afterRegistry.usedEffects /\ ~PersistentGenerationAllowed912(afterRegistry,f.d,2) /\ PersistentRegistryWorldBound912(afterRegistry,f.afterWorld) /\ ~PersistentDefinitionProfile912(afterRegistry,ReboundConditionalDefinition96(f.d,3)) PersistentBirthWithRetireFixture912(f,trash) == LET execution == [f.execution EXCEPT !.trash=trash] authority == LifetimeAuthorityAfter910(f.beforeAuthority,LifetimeKernelTransition910(f.beforeWorld,f.afterWorld,execution)) registry == [f.afterRegistry EXCEPT !.frontier=LifetimeFrontier910(authority,2)] IN [f EXCEPT !.trash=trash,!.execution=execution,!.afterAuthority=authority,!.afterRegistry=registry] PersistentBirthAuthorityChecks912 == LET f == PersistentBirthFixture912(TRUE) wrongActor == PersistentBirthWithRetireFixture912(f,[f.trash EXCEPT !.actor="SideA"]) wrongItemInspection == PersistentBirthWithRetireFixture912(f,[f.trash EXCEPT !.itemInspection.caller="ForeignItemInspectionCaller"]) wrongInventory == [f.inventory EXCEPT !.sourceSHA="foreign-source-hash"] unactivationzed == [f.beforeWorld EXCEPT !.objects[1].activated=FALSE,!.objects[1].face="Down"] notItemInspectioning == [f.beforeWorld EXCEPT !.itemInspections[200].active=FALSE] notItemInspectioningRetire == [f.trash EXCEPT !.itemInspection=notItemInspectioning.itemInspections[200]] wrongEpoch == [f EXCEPT !.afterLedger.activationEpoch[f.key]=1,!.afterLedger.activationSerial=1, !.afterSnapshot.activationEpoch[f.key]=1,!.afterSnapshot.activationSerial=1] IN /\ PersistentBirthValid912(f) /\ LifetimeAuthorityValid910(wrongActor.afterAuthority) /\ LifetimeAuthorityValid910(wrongItemInspection.afterAuthority) /\ ~PersistentBirthValid912(wrongActor) /\ ~PersistentBirthValid912(wrongItemInspection) /\ ~PersistentBirthValid912(wrongEpoch) /\ ~CreatePersistentOnRetire912(f.beforeRegistry,f.afterRegistry,f.beforeLedger,f.afterLedger,<<>>,<<>>,f.beforeSnapshot,f.afterSnapshot, wrongInventory,f.trash,f.effectIds,{1,2},f.beforeAuthority,f.afterAuthority,CardFacts9) /\ ~PersistentRetireBound912(f.trash,f.inventory,unactivationzed,f.afterObjects,{1,2},CardFacts9) /\ ~PersistentRetireBound912(notItemInspectioningRetire,f.inventory,notItemInspectioning,f.afterObjects,{1,2},CardFacts9) PersistentCompleteCohortChecks912 == LET f == PersistentBirthForSourceFixture912(TRUE,"Specimen0198",PersistentSpecimen0198DefinitionFixture912,FALSE) omitted == [f.afterRegistry EXCEPT !.persistent=Empty9] reset == [omitted EXCEPT !.effects=Empty9,!.persistentRetireIds={}] part == [id |-> 10,ability |-> 19000,conditions |-> {}] conditions == [tag |-> "StaticConditionSnapshot",ability |-> 19000,source |-> ObjectAbilitySource9(1),receipts |-> Empty9] application == [tag |-> "CurrentStaticApplication",worldId |-> 2,traversalId |-> 2] wrongSource == [f.afterRegistry EXCEPT !.persistent[f.key].sourceCardSHA="foreign-source-hash", !.effects[55000].persistence.sourceCardSHA="foreign-source-hash"] wrongEffect == [f.afterRegistry EXCEPT !.effects[55000].persistence.itemInspectionId=201] wrongStatus == [f.afterRegistry EXCEPT !.effects[55000].status="Expired"] extraWorld == [f.afterWorld EXCEPT !.statedDurations=ReplacementOverlay99(@,[id \in {55001} |-> f.afterWorld.statedDurations[55000]])] wrongWorld == [f.afterWorld EXCEPT !.statedDurations[55000].persistence.itemInspectionId=201] unregisteredOverride == [f.afterWorld EXCEPT !.statedDurations=Empty9] missingPresence == [f.afterWorld EXCEPT !.present=@ \ {19000}] IN /\ PersistentBirthValid912(f) /\ PersistentRegistryWorldBound912(f.afterRegistry,f.afterWorld) /\ LifetimeReady910(omitted,f.afterAuthority) /\ LifetimeReady910(reset,f.afterAuthority) /\ ~PersistentRegistryBound912(omitted) /\ PersistentRegistryBound912(reset) /\ ~PersistentStaticPart912(omitted,f.d,part,conditions,f.afterWorld,application,f.afterLedger,f.afterAuthority) /\ ~PersistentStaticPart912(reset,f.d,part,conditions,f.afterWorld,application,f.afterLedger,f.afterAuthority) /\ ~PersistentRegistryBound912(wrongEffect) /\ ~PersistentRegistryBound912(wrongStatus) /\ ~PersistentRegistryWorldBound912(f.afterRegistry,extraWorld) /\ ~PersistentRegistryWorldBound912(f.afterRegistry,wrongWorld) /\ ~PersistentRegistryWorldBound912(reset,unregisteredOverride) /\ ~PersistentRegistryWorldBound912(f.afterRegistry,missingPresence) /\ PersistentRegistryBound912(wrongSource) /\ ~PersistentRegistryWorldBound912(wrongSource,f.afterWorld) /\ ~PersistentStaticPart912(wrongSource,f.d,part,conditions,f.afterWorld,application,f.afterLedger,f.afterAuthority) PersistentStaticDuringCheckpointChecks912 == LET f == PersistentBirthForSourceFixture912(TRUE,"Specimen0198",PersistentSpecimen0198DefinitionFixture912,FALSE) preTraversal == [f.traversal EXCEPT !.phase="TraversalEnds",!.step="ProcedureCode9606a4cd52b4",!.ending=TRUE,!.phaseId=21,!.usedPhaseIds=@ \cup {21}] beforeEnd == [traversal |-> preTraversal,phaseEndedIds |-> {},windows |-> <<>>,windowsDone |-> TRUE, fundReturned |-> TRUE,resultDeclared |-> TRUE,returned |-> FALSE] beforeBase == [f.afterWorld EXCEPT !.id=3,!.control=[traversal |-> preTraversal,phaseEndedIds |-> {}]] beforeWorld == PersistentWorld912(beforeBase,f.afterRegistry) beforeExecution == [tag |-> "ActualTimingTransition",id |-> 19640,snapshotId |-> 3,source |-> RuleAbilitySource9("NormalizedPriorTraversalEndSteps")] beforeAuthority == LifetimeAuthorityAfter910(f.afterAuthority,LifetimeKernelTransition910(f.afterWorld,beforeWorld,beforeExecution)) beforeRegistry == [f.afterRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,beforeWorld),!.frontier=LifetimeFrontier910(beforeAuthority,3)] beforeSnapshot == [f.afterSnapshot EXCEPT !.id=3,!.present=beforeWorld.present,!.activity=beforeWorld.activity] ended == [beforeEnd EXCEPT !.traversal.complete=TRUE,!.phaseEndedIds={21}] events == {[tag |-> "TraversalEnds",traversalId |-> 2],TraversalPhaseEndEvent6(preTraversal)} base == [beforeWorld EXCEPT !.id=4,!.control=[traversal |-> ended.traversal,phaseEndedIds |-> ended.phaseEndedIds]] world == PersistentWorld912(base,beforeRegistry) execution == [tag |-> "ActualTimingTransition",id |-> 19641,snapshotId |-> 4,source |-> RuleAbilitySource9("ProcedureCode9606a4cd52b4"), before |-> beforeEnd,after |-> ended,events |-> events] authority == LifetimeAuthorityAfter910(beforeAuthority,LifetimeKernelTransition910(beforeWorld,world,execution)) registry == [beforeRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,4)] snapshot == [beforeSnapshot EXCEPT !.id=4,!.present=world.present,!.activity=world.activity] event == ReplacementOverlay99([ConditionalEventFixture96(19642,"TraversalEnds",0,"SideB","SideB",snapshot,19641) EXCEPT !.traversal=ended.traversal,!.structure=TimingRef9("SchemaAtom138",2),!.step="ProcedureCode9606a4cd52b4"],[actualEvent |-> [tag |-> "TraversalEnds",traversalId |-> 2]]) occurrences == [id \in {19642} |-> event] begin == [snapshot EXCEPT !.checkpointId=1,!.point="CheckpointBeginning"] current == [begin EXCEPT !.point="ProcedureCodee605a78f5d5e"] cp == [ConditionalCheckpointFixture96(f.afterLedger,1,begin,current,occurrences) EXCEPT !.caller=PersistentTraversalEndCaller912(2)] ledger == ConditionalCommittedFixture96(f.afterLedger,f.definitions,cp,Empty9,Empty9,Empty9) conditions == ConditionalConditionsFixture96(f.definitions,occurrences) cut == [registry EXCEPT !.persistent[f.key].creationOpen=FALSE,!.persistent[f.key].endCheckpoint=1] boundary == [tag |-> "PersistentLastCreationCheckpoint",traversal |-> ended.traversal,checkpointId |-> 1,caller |-> cp.caller, windowId |-> 0,completion |-> PersistentCheckpointCompletion912(ledger,cp,world)] part == [id |-> 10,ability |-> 19000,conditions |-> {}] staticConditions == [tag |-> "StaticConditionSnapshot",ability |-> 19000,source |-> ObjectAbilitySource9(1),receipts |-> Empty9] application == [tag |-> "CurrentStaticApplication",worldId |-> 4,traversalId |-> 2] IN /\ PersistentBirthValid912(f) /\ ObservePersistentKernel912(f.afterRegistry,beforeRegistry,f.afterLedger,f.afterLedger,<<>>,<<>>,f.afterSnapshot,beforeSnapshot, beforeBase,beforeExecution,f.afterAuthority,beforeAuthority) /\ CompleteTraversal6(beforeEnd,ended,TRUE,events,{2}) /\ ObservePersistentKernel912(beforeRegistry,registry,f.afterLedger,f.afterLedger,<<>>,<<>>,beforeSnapshot,snapshot,base,execution,beforeAuthority,authority) /\ ProcessPersistentCheckpoint912(registry,f.afterLedger,ledger,<<>>,<<>>,f.definitions,f.lexemes,cp,conditions,Empty9,Empty9,Empty9,Empty9, [tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> 1,caller |-> cp.caller,traversalId |-> 2],{},CardFacts9,world,authority) /\ ~PersistentCheckpointBound912(registry,ledger) /\ registry.persistent[f.key].creationOpen /\ PersistentStaticPart912(registry,f.d,part,staticConditions,world,application,ledger,authority) /\ CutoffPersistentAtTraversalEnd912(registry,cut,ledger,cp,beforeEnd,ended,events,{2},boundary) /\ PersistentStaticPart912(cut,f.d,part,staticConditions,world,application,ledger,authority) /\ ~PersistentGenerationAllowed912(cut,f.d,2) /\ ~PersistentApplicationAllowed912(registry,f.d,3) PersistentInventoryRoleChecks912 == LET f == PersistentBirthForSourceFixture912(TRUE,"Specimen0198",PersistentSpecimen0198DefinitionFixture912,FALSE) lingering == [f.d EXCEPT !.activity.provider="Lingering"] lingeringLex == LexicalSingleFixture99(lingering,"Specimen0198","pay",2,"StaticDeclaration",CardFacts9) world == [f.beforeWorld EXCEPT !.activity.lingeringAbilities={19000}] inventory == [f.inventory EXCEPT !.definitions[f.key]=lingering,!.lexemes[f.key]=lingeringLex] granted == [f.d EXCEPT !.activity.provider="Granted"] facts == ReplacementOverlay99(CardFacts9,[card \in {"synthetic_persistent_grant912"} |-> [kind |-> "Attachment",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> "06277fa8105ac765e3c1d18d29cd33567bdbdf4ad2c0a3b8fc3a5b7acec45e48"]]) grantedLex == LexicalSingleFixture99(granted,"synthetic_persistent_grant912","pay",2,"StaticDeclaration",facts) grantInventory == [f.inventory EXCEPT !.definitions[f.key]=granted,!.lexemes[f.key]=grantedLex] IN /\ PersistentBirthValid912(f) /\ AbilityLexemesValid99(lingering,lingeringLex,world.objects,CardFacts9) /\ PersistentSourceActive912(lingering,world) /\ PersistentBirthCohort912(inventory,world)={f.key} /\ ~PersistentInventory912(inventory,f.trash,world,CardFacts9) /\ grantedLex.card#grantInventory.card /\ grantedLex.origin.recipientSource=f.d.syntax.source /\ AbilityLexemesValid99(granted,grantedLex,f.beforeWorld.objects,facts) /\ PersistentInventory912(grantInventory,f.trash,f.beforeWorld,facts) PersistentTraversalSnapshotFixture912(f,w,r,l,checkpoint,point) == LingeringConditionalSnapshot910([f.afterSnapshot EXCEPT !.id=w.id,!.checkpointId=checkpoint,!.point=point, !.objects=w.objects,!.present=w.present,!.activity=w.activity,!.activationEpoch=l.activationEpoch, !.activationSerial=l.activationSerial],r,l,w) PersistentTraversalStateFixture912(f,r,l,w,a,stack) == [f |-> f,r |-> r,l |-> l,w |-> w,a |-> a,stack |-> stack, s |-> PersistentTraversalSnapshotFixture912(f,w,r,l,l.lastCheckpoint,"PersistentCurrent")] PersistentTraversalMoveFixture912(b,base,execution) == LET w == PersistentWorld912(base,b.r) a == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,w,execution)) r == [b.r EXCEPT !.effects=ObserveLingeringEffects910(@,w),!.frontier=LifetimeFrontier910(a,Len(a.order))] IN PersistentTraversalStateFixture912(b.f,r,b.l,w,a,b.stack) PersistentTraversalMoveValid912(b,a,base,execution) == ObservePersistentKernel912(b.r,a.r,b.l,a.l,b.stack,a.stack,b.s,a.s,base,execution,b.a,a.a) PersistentTraversalCPFixture912(b,caller,events) == LET id == b.l.lastCheckpoint+1 begin == [b.s EXCEPT !.checkpointId=id,!.point="CheckpointBeginning"] current == [begin EXCEPT !.point="ProcedureCodee605a78f5d5e"] IN [ConditionalCheckpointFixture96(b.l,id,begin,current,events) EXCEPT !.caller=caller] PersistentTraversalEndFixture912(f,targetSiteMatches) == LET initial == PersistentTraversalStateFixture912(f,f.afterRegistry,f.afterLedger,f.afterWorld,f.afterAuthority,<<>>) preTraversal == [f.traversal EXCEPT !.phase="TraversalEnds",!.step="ProcedureCode9606a4cd52b4",!.ending=TRUE,!.phaseId=21,!.usedPhaseIds=@ \cup {21}] preEnd == [traversal |-> preTraversal,phaseEndedIds |-> {},windows |-> <<>>,windowsDone |-> TRUE, fundReturned |-> TRUE,resultDeclared |-> TRUE,returned |-> FALSE] beforeBase == [initial.w EXCEPT !.id=3,!.control=[traversal |-> preTraversal,phaseEndedIds |-> {}]] beforeExecution == [tag |-> "ActualTimingTransition",id |-> 19500,snapshotId |-> 3,source |-> RuleAbilitySource9("NormalizedPriorTraversalEndSteps")] before == PersistentTraversalMoveFixture912(initial,beforeBase,beforeExecution) ended == [preEnd EXCEPT !.traversal.complete=TRUE,!.phaseEndedIds={21}] events6 == {[tag |-> "TraversalEnds",traversalId |-> 2],TraversalPhaseEndEvent6(preTraversal)} endBase == [before.w EXCEPT !.id=4,!.control=[traversal |-> ended.traversal,phaseEndedIds |-> ended.phaseEndedIds]] endExecution == [tag |-> "ActualTimingTransition",id |-> 19501,snapshotId |-> 4,source |-> RuleAbilitySource9("ProcedureCode9606a4cd52b4"), before |-> preEnd,after |-> ended,events |-> events6] end == PersistentTraversalMoveFixture912(before,endBase,endExecution) event == [ConditionalEventFixture96(19502,"TraversalEnds",0,"SideB","SideB",end.s,19501) EXCEPT !.traversal=ended.traversal,!.structure=TimingRef9("SchemaAtom138",2),!.step="ProcedureCode9606a4cd52b4"] fullEvent == ReplacementOverlay99(event,[actualEvent |-> [tag |-> "TraversalEnds",traversalId |-> 2]]) events == [id \in {19502} |-> fullEvent] cp == PersistentTraversalCPFixture912(end,PersistentTraversalEndCaller912(2),events) conditions == [key \in DOMAIN f.definitions |-> [id \in {19502} |-> [ConditionalTriggerReceiptFixture96(f.definitions[key],fullEvent) EXCEPT !.results=[i \in f.definitions[key].triggerRequirements |-> IF i=2 THEN targetSiteMatches ELSE ended.traversal.successful]]]] keys == (IF targetSiteMatches /\ f.d.syntax.kind="Conditional" THEN {[definition |-> f.key,occurrence |-> 19502]} ELSE {}) \cup (IF ConditionalActive96(f.dg,end.s) THEN {[definition |-> ConditionalKey96(f.dg),occurrence |-> 19502]} ELSE {}) allocation == [key \in keys |-> IF key.definition=f.key THEN 19510 ELSE 19511] bindings == [key \in keys |-> [kind |-> "Reaction",checkpointId |-> cp.id,windowId |-> 19520,group |-> 1952]] ledger == ConditionalCommittedFixture96(end.l,f.definitions,cp,allocation,bindings,Empty9) boundary == [tag |-> "PersistentLastCreationCheckpoint",traversal |-> ended.traversal,checkpointId |-> cp.id,caller |-> cp.caller, windowId |-> IF keys={} THEN 0 ELSE 19520,completion |-> PersistentCheckpointCompletion912(ledger,cp,end.w)] cut == [end.r EXCEPT !.persistent[f.key].creationOpen=FALSE,!.persistent[f.key].endCheckpoint=cp.id, !.persistent[f.key].endWindow=boundary.windowId,!.persistent[f.key].endMembers={}] finalCut == [cut EXCEPT !.persistent[f.key].endMembers={allocation[key] : key \in keys}] after == PersistentTraversalStateFixture912(f,finalCut,ledger,end.w,end.a,<<>>) IN [f |-> f,initial |-> initial,preEnd |-> preEnd,ended |-> ended,events6 |-> events6,beforeBase |-> beforeBase, beforeExecution |-> beforeExecution,before |-> before,endBase |-> endBase,endExecution |-> endExecution,end |-> end, cp |-> cp,conditions |-> conditions,allocation |-> allocation,bindings |-> bindings,boundary |-> boundary,after |-> after] PersistentTraversalEndValid912(g) == /\ PersistentBirthValid912(g.f) /\ PersistentTraversalMoveValid912(g.initial,g.before,g.beforeBase,g.beforeExecution) /\ CompleteTraversal6(g.preEnd,g.ended,TRUE,g.events6,{2}) /\ PersistentTraversalMoveValid912(g.before,g.end,g.endBase,g.endExecution) /\ ProcessPersistentCheckpoint912(g.end.r,g.end.l,g.after.l,<<>>,<<>>,g.f.definitions,g.f.lexemes,g.cp,g.conditions,g.allocation,g.bindings, Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> g.cp.id,caller |-> g.cp.caller,traversalId |-> 2],{},CardFacts9,g.end.w,g.end.a) /\ CutoffPersistentAtTraversalEnd912(g.end.r,g.after.r,g.after.l,g.cp,g.preEnd,g.ended,g.events6,{2},g.boundary) PersistentTraversalCutoffChecks912 == LET g == PersistentTraversalEndFixture912(PersistentBirthFixture912(TRUE),TRUE) wrong == [g.cp EXCEPT !.occurrences[19502].traversal.id=3] IN /\ PersistentTraversalEndValid912(g) /\ DOMAIN g.after.l.instances={19510,19511} /\ g.after.l.instances[19510].member.source=ObjectAbilitySource9(1) /\ g.after.l.instances[19510].status="Pending" /\ g.after.r.persistent[g.f.key].endMembers={19510,19511} /\ ~g.after.r.persistent[g.f.key].creationOpen /\ g.after.r.effects[55000].status="Active" /\ 19000 \in g.after.w.activity.persistentAbilities /\ ConditionalActive96(g.f.d,g.after.s) /\ ~PersistentGenerationAllowed912(g.after.r,g.f.d,2) /\ PersistentApplicationAllowed912(g.after.r,g.f.d,2) /\ ~PersistentCheckpointBound912(g.end.r,g.after.l) /\ ~CutoffPersistentAtTraversalEnd912(g.end.r,g.after.r,g.after.l,wrong,g.preEnd,g.ended,g.events6,{2},g.boundary) /\ ~CutoffPersistentAtTraversalEnd912(g.end.r,g.after.r,g.after.l,g.cp,g.preEnd,g.ended,g.events6,{2}, [g.boundary EXCEPT !.completion.point="ProcedureCode2d73b20aa788"]) PersistentEndOpeningFixture912(g) == LET b == g.after members == ConditionalWindowMembers96(b.l.instances,19520) site == TraversalPrioritySite9(b.w.turn,g.ended.traversal,ApproachFixture92,LayoutFixture92,g.ended) open == WindowFixture92(19520,"Reaction",site,members,1952,NoTimingRef9) opened == [b EXCEPT !.stack= <>] cp == PersistentTraversalCPFixture912(opened,ConditionalPriorityCaller96(open),Empty9) l == ConditionalCommittedFixture96(b.l,g.f.definitions,cp,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=cp.id] after == PersistentTraversalStateFixture912(g.f,b.r,l,b.w,b.a,<>) IN [g |-> g,b |-> b,open |-> open,opened |-> opened,cp |-> cp,after |-> after] PersistentEndOpeningValid912(h) == /\ PersistentTraversalEndValid912(h.g) /\ OpenConditionalReaction96(<<>>,<>,h.b.l,19520,h.open.site, OpeningFixture92(19520,"Reaction",h.open.site,h.open.members,1952,NoTimingRef9),{}) /\ ProcessPersistentCheckpoint912(h.b.r,h.b.l,h.after.l,<>,<>,h.g.f.definitions,h.g.f.lexemes,h.cp,Empty9,Empty9,Empty9, Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> h.cp.id,caller |-> h.cp.caller,traversalId |-> 2],{19520},CardFacts9,h.b.w,h.b.a) /\ CheckpointPriorityWithConditionals96(h.after.l,<>,h.after.stack,[CheckpointFixture92(h.open) EXCEPT !.id=h.cp.id]) PersistentPassFixture912(b) == LET w == WindowTop9(b.stack) passed == PassPriorityFrame9(w) stack == ReplaceWindowTop9(b.stack,passed) candidate == ConditionalPendingAfterWindows96(b.l,stack) keys == IF passed.open THEN {} ELSE PersistentEndWindows912(b.r,w.id) changed == PersistentExpirationRegistry912(b.r,keys) base == [b.w EXCEPT !.id=@+1,!.activity.instances=PersistentInstanceRows912(@,candidate)] world == PersistentWorld912(base,changed) execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> w.id,snapshotId |-> world.id,source |-> RuleAbilitySource9("ProcedureCode17f2a65162fb"), closedWindow |-> IF passed.open THEN 0 ELSE passed.id] authority == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,world,execution)) registry == [changed EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] losses == IF keys={} \/ b.f.key \notin DOMAIN b.s.definitions THEN {} ELSE {b.f.key} ledger == [candidate EXCEPT !.activationEpoch=[key \in DOMAIN @ |-> @[key]+IF key \in losses THEN 1 ELSE 0], !.activationSerial=@+IF losses={} THEN 0 ELSE 1] after == PersistentTraversalStateFixture912(b.f,registry,ledger,world,authority,stack) IN [b |-> b,candidate |-> candidate,candidateStack |-> stack,after |-> after] PersistentPassValid912(p) == PassPersistentPriority912(p.b.r,p.after.r,p.b.l,p.candidate,p.after.l,p.b.stack,p.candidateStack,p.after.stack, WindowTop9(p.b.stack).priority,Empty9,p.b.s,p.after.s,p.b.a,p.after.a) PersistentOriginalReactionExpiryChecks912 == LET h == PersistentEndOpeningFixture912(PersistentTraversalEndFixture912(PersistentBirthForSourceFixture912(TRUE,"Specimen0198",PersistentSpecimen0198DefinitionFixture912,TRUE),TRUE)) first == PersistentPassFixture912(h.after) open == WindowTop9(first.after.stack) cp == PersistentTraversalCPFixture912(first.after,ConditionalPriorityCaller96(open),Empty9) ledger == ConditionalCommittedFixture96(first.after.l,h.g.f.definitions,cp,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=cp.id] received == PersistentTraversalStateFixture912(h.g.f,first.after.r,ledger,first.after.w,first.after.a,<>) last == PersistentPassFixture912(received) IN /\ PersistentEndOpeningValid912(h) /\ DOMAIN h.after.l.instances={19511} /\ PersistentPassValid912(first) /\ first.after.r.effects[55000].status="Active" /\ first.after.l.instances[19511].status="Lost" /\ first.after.r.persistent[h.g.f.key].phase="Persisting" /\ ProcessPersistentCheckpoint912(first.after.r,first.after.l,ledger,first.after.stack,first.after.stack,h.g.f.definitions,h.g.f.lexemes,cp, Empty9,Empty9,Empty9,Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> cp.id,caller |-> cp.caller,traversalId |-> 2], {19520},CardFacts9,first.after.w,first.after.a) /\ CheckpointPriorityWithConditionals96(ledger,first.after.stack,received.stack,[CheckpointFixture92(open) EXCEPT !.id=cp.id]) /\ PersistentPassValid912(last) /\ ~WindowTop9(last.after.stack).open /\ last.after.r.persistent[h.g.f.key].phase="Expired" /\ last.after.r.effects[55000].status="Expired" /\ 19000 \notin last.after.w.present /\ ~PersistentSourceActive912(h.g.f.d,last.after.w) /\ last.after.l.activationEpoch=h.after.l.activationEpoch /\ last.after.l.activationSerial=h.after.l.activationSerial PersistentNoReactionExpiryChecks912 == LET f == PersistentBirthForSourceFixture912(TRUE,"Specimen0198",PersistentSpecimen0198DefinitionFixture912,FALSE) g == PersistentTraversalEndFixture912(f,TRUE) b == g.after changed == PersistentExpirationRegistry912(b.r,{f.key}) world == PersistentWorld912([b.w EXCEPT !.id=@+1],changed) clearance == [tag |-> "NormalCheckpointNoReactionWindow",checkpointId |-> g.cp.id,caller |-> g.cp.caller, pendingInstances |-> {},point |-> "ProcedureCodeb74d673a0fc6"] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> g.cp.id,snapshotId |-> world.id,source |-> RuleAbilitySource9("ProcedureCode17f2a65162fb"),noWindow |-> clearance] authority == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,world,execution)) registry == [changed EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] after == PersistentTraversalStateFixture912(f,registry,b.l,world,authority,<<>>) badClearance == [clearance EXCEPT !.point="ProcedureCode2d73b20aa788"] badExecution == [execution EXCEPT !.noWindow=badClearance] badAuthority == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,world,badExecution)) badRegistry == [registry EXCEPT !.frontier=LifetimeFrontier910(badAuthority,Len(badAuthority.order))] IN /\ PersistentTraversalEndValid912(g) /\ DOMAIN b.l.instances={} /\ b.r.persistent[f.key].endWindow=0 /\ ExpirePersistentNoReaction912(b.r,registry,b.l,after.l,<<>>,<<>>,b.s,after.s,g.cp,clearance,b.a,authority) /\ registry.effects[55000].status="Expired" /\ 19000 \notin world.present /\ ~PersistentSourceActive912(f.d,world) /\ ~ExpirePersistentNoReaction912(b.r,registry,b.l,after.l,<<>>,<<>>,b.s,after.s,g.cp, badClearance,b.a,authority) /\ ~ExpirePersistentNoReaction912(b.r,badRegistry,b.l,after.l,<<>>,<<>>,b.s,after.s,g.cp, badClearance,b.a,badAuthority) PersistentDoppelNestedFixture912 == LET h == PersistentEndOpeningFixture912(PersistentTraversalEndFixture912(PersistentBirthFixture912(TRUE),TRUE)) b == h.after d == h.g.f.dg w == WindowTop9(b.stack) option == [ConditionalOptionFixture92(w,19511) EXCEPT !.newStructures={TimingRef9("SchemaAtom138",3)}] busy == StartedFixture92(w,option) p == OpenConditionalProcedure96(19511,d,w,option,LegalityFixture92(w,option).transactionId,"Play") ip == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] plan == OpenInstruction93(700,"Ability",19511,d.syntax.source,"Play",1,"NoValue",<<"TraversalAnyTargetSite">>,FALSE) imminent == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] selected == [b.l EXCEPT !.instances[19511].status="Imminent"] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminent),effects |-> {1}] resolvingP == [ip EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] resolvingPlan == [imminent EXCEPT !.phase="Resolving"] resolving == [selected EXCEPT !.instances[19511].status="Resolving",!.instances[19511].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminent),effects |-> {1}]]] work == [tag |-> "ConditionalEffectExecution",instruction |-> InstructionWindowRef93(resolvingPlan),abilityInstance |-> 19511,source |-> d.syntax.source,partIds |-> {1}] used == [tag |-> "AbilityUsed",useId |-> 19530,abilityInstance |-> 19511,source |-> d.syntax.source,player |-> "SideB"] uses == [id \in {19530} |-> used] turnUses == [id \in {19530} |-> [turnId |-> 1,ability |-> d.syntax.id,source |-> d.syntax.source,useId |-> 19530]] usedLedger == [resolving EXCEPT !.instances[19511].used=TRUE] before == PersistentTraversalStateFixture912(h.g.f,b.r,usedLedger,b.w,b.a,<>) traversal == OpenTraversal6(3,30,19511) base == [b.w EXCEPT !.id=@+1,!.control=[traversal |-> traversal,phaseEndedIds |-> b.w.control.phaseEndedIds]] execution == [tag |-> "ActualTimingTransition",id |-> 19531,snapshotId |-> base.id,source |-> d.syntax.source, instruction |-> InstructionWindowRef93(resolvingPlan),newTraversal |-> traversal] after == PersistentTraversalMoveFixture912(before,base,execution) secondTraversal == [traversal EXCEPT !.phase="TraversalEnds",!.step="ProcedureCode9606a4cd52b4",!.ending=TRUE,!.successful=FALSE,!.reachedSuccess=FALSE,!.unsuccessful=TRUE,!.attacked="SchemaAtom082",!.formalBegun=TRUE] secondBase == [after.w EXCEPT !.id=@+1,!.control=[traversal |-> secondTraversal,phaseEndedIds |-> @.phaseEndedIds]] secondExecution == [tag |-> "ActualTimingTransition",id |-> 19532,snapshotId |-> secondBase.id,source |-> RuleAbilitySource9("NormalizedSecondTraversalSteps")] secondBefore == PersistentTraversalMoveFixture912(after,secondBase,secondExecution) secondEndBefore == [traversal |-> secondTraversal,phaseEndedIds |-> secondBefore.w.control.phaseEndedIds,windows |-> <<>>,windowsDone |-> TRUE, fundReturned |-> TRUE,resultDeclared |-> TRUE,returned |-> FALSE] secondEnd == [secondEndBefore EXCEPT !.traversal.complete=TRUE,!.phaseEndedIds=@ \cup {30}] secondEvents6 == {[tag |-> "TraversalEnds",traversalId |-> 3],TraversalPhaseEndEvent6(secondTraversal)} lastBase == [secondBefore.w EXCEPT !.id=@+1,!.control=[traversal |-> secondEnd.traversal,phaseEndedIds |-> secondEnd.phaseEndedIds]] lastExecution == [tag |-> "ActualTimingTransition",id |-> 19533,snapshotId |-> lastBase.id,source |-> RuleAbilitySource9("ProcedureCode9606a4cd52b4"), before |-> secondEndBefore,after |-> secondEnd,events |-> secondEvents6] last == PersistentTraversalMoveFixture912(secondBefore,lastBase,lastExecution) event == [ConditionalEventFixture96(19534,"TraversalEnds",0,"SideB","SideB",last.s,19533) EXCEPT !.traversal=secondEnd.traversal,!.structure=TimingRef9("SchemaAtom138",3),!.step="ProcedureCode9606a4cd52b4"] secondEvents == [id \in {19534} |-> ReplacementOverlay99(event,[actualEvent |-> [tag |-> "TraversalEnds",traversalId |-> 3]])] cp == PersistentTraversalCPFixture912(last,PersistentTraversalEndCaller912(3),secondEvents) conditions == [key \in DOMAIN h.g.f.definitions |-> [id \in {19534} |-> [ConditionalTriggerReceiptFixture96(h.g.f.definitions[key],secondEvents[id]) EXCEPT !.results=[i \in h.g.f.definitions[key].triggerRequirements |-> IF key=h.g.f.key THEN TRUE ELSE FALSE]]]] ledger == ConditionalCommittedFixture96(last.l,h.g.f.definitions,cp,Empty9,Empty9,Empty9) IN [h |-> h,b |-> b,d |-> d,w |-> w,option |-> option,busy |-> busy,p |-> p,ip |-> ip,plan |-> plan,imminent |-> imminent, selected |-> selected,expected |-> expected,resolvingP |-> resolvingP,resolvingPlan |-> resolvingPlan,resolving |-> resolving, work |-> work,used |-> used,uses |-> uses,turnUses |-> turnUses,usedLedger |-> usedLedger,before |-> before,traversal |-> traversal, base |-> base,execution |-> execution,after |-> after,secondBase |-> secondBase,secondExecution |-> secondExecution,secondBefore |-> secondBefore, secondEndBefore |-> secondEndBefore,secondEnd |-> secondEnd,secondEvents6 |-> secondEvents6,lastBase |-> lastBase,lastExecution |-> lastExecution, last |-> last,cp |-> cp,conditions |-> conditions,ledger |-> ledger] PersistentDoppelNestedValid912(g) == /\ PersistentEndOpeningValid912(g.h) /\ BeginConditionalResolution96(g.b.l,g.selected,g.b.stack,<>,g.p,g.ip,g.d,g.b.s,19511,g.option,LegalityFixture92(g.w,g.option),Empty9, g.plan,g.imminent,[InstructionTargetsFixture93(g.plan) EXCEPT !.targets={}],InstructionEntryFixture93(g.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> g.d.syntax.id,source |-> g.d.syntax.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(g.selected,g.resolving,<>,g.ip,g.resolvingP,g.imminent,g.resolvingPlan, NoModifiersFixture95(g.imminent),InstructionClearanceFixture93(g.imminent,0,0),g.expected) /\ RecordConditionalExecutionUse96(g.resolving,g.usedLedger,g.resolvingP,g.resolvingPlan,g.work,Empty9,g.uses,Empty9,g.turnUses,19530,{g.used}) /\ PersistentTraversalMoveValid912(g.before,g.after,g.base,g.execution) /\ g.traversal=OpenTraversal6(3,30,19511) /\ PersistentTraversalMoveValid912(g.after,g.secondBefore,g.secondBase,g.secondExecution) /\ CompleteTraversal6(g.secondEndBefore,g.secondEnd,TRUE,g.secondEvents6,{3}) /\ PersistentTraversalMoveValid912(g.secondBefore,g.last,g.lastBase,g.lastExecution) /\ ProcessPersistentCheckpoint912(g.last.r,g.last.l,g.ledger,g.last.stack,g.last.stack,g.h.g.f.definitions,g.h.g.f.lexemes,g.cp,g.conditions, Empty9,Empty9,Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> g.cp.id,caller |-> g.cp.caller,traversalId |-> 3], {19520},CardFacts9,g.last.w,g.last.a) PersistentNestedSecondTraversalChecks912 == LET g == PersistentDoppelNestedFixture912 IN /\ PersistentDoppelNestedValid912(g) /\ DOMAIN g.ledger.instances={19510,19511} /\ g.ledger.instances[19510].status="Pending" /\ g.ledger.instances[19511].status="Resolving" /\ g.ledger.instances[19511].used /\ g.last.r.persistent[g.h.g.f.key].traversalId=2 /\ g.last.r.persistent[g.h.g.f.key].phase="Persisting" /\ g.last.r.effects[55000].status="Active" /\ ConditionalActive96(g.h.g.f.d,g.last.s) /\ ~PersistentApplicationAllowed912(g.last.r,g.h.g.f.d,3) /\ ~PersistentGenerationAllowed912(g.last.r,g.h.g.f.d,3) /\ g.last.stack[1].site.traversalId=2 /\ g.last.stack[1].open /\ g.last.stack[1].stage="Resolving" PersistentGateCard912(kind) == IF kind="Paid" THEN "synthetic_persistent_paid_912" ELSE "synthetic_persistent_conditional_912" PersistentGateFacts912 == ReplacementOverlay99(CardFacts9,[card \in {"synthetic_persistent_paid_912","synthetic_persistent_conditional_912"} |-> [kind |-> "Attachment",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> IF card="synthetic_persistent_paid_912" THEN "77708aa6e0ac9d3d928bf5872d96bf8f4202618276c1dbea8fc039fe0acc8832" ELSE "aaec3771edf04e950dc1ab9ae79f8ca84a4402e1c326705e1ef98ed761940d39"]]) PersistentGateDefinition912(kind) == LET flags == <> syntax == SyntaxFixture93(19000,kind,"SideA","Attachment",flags \o IF kind="Paid" THEN BaseUnits93("Paid") ELSE <>) activity == AbilityDefinition9(19000,kind,syntax.source,"Printed") IN IF kind="Paid" THEN [syntax |-> syntax,activity |-> activity,triggerCost |-> <<[kind |-> "ResourceUnits",amount |-> 1]>>,instructions |-> <<700>>, instructionHasWould |-> FALSE,ruleTiming |-> "NoValue",canSuppressBarrierInstructions |-> FALSE,refersApproachedBarrier |-> FALSE,refersEncounteredBarrier |-> FALSE, approachRequirements |-> [subtypes |-> {},activated |-> FALSE,otherIds |-> {}],encounterRequirements |-> [subtypes |-> {},activated |-> FALSE,otherIds |-> {}], interfaceSubtype |-> [present |-> FALSE,name |-> "NoValue"],otherRestrictionIds |-> {},refersHosted |-> FALSE] ELSE [syntax |-> syntax,activity |-> activity,primaryKind |-> "Trigger",primaryCondition |-> 3,instructions |-> <<700>>,instructionHasWould |-> TRUE, trigger |-> [kinds |-> {"WouldExposureMarkers"},subject |-> "SchemaAtom016",actor |-> "SideB",side |-> "SideB"],triggerRequirements |-> {}, effectChoices |-> {{1}},optionalParts |-> {},partsByInstruction |-> [id \in {700} |-> {1}],delayedEffect |-> 0,thisTraversal |-> FALSE] PersistentGateLexemes912(d,kind) == LexicalSingleFixture99(d,PersistentGateCard912(kind),IF kind="Paid" THEN "prevent" ELSE "would",IF kind="Paid" THEN 4 ELSE 3, IF kind="Paid" THEN "EffectOperator" ELSE "ImminentTrigger",PersistentGateFacts912) PersistentGateBirthFixture912(kind) == LET withTraversal == TRUE sourceCard == PersistentGateCard912(kind) d == PersistentGateDefinition912(kind) doppelDeployed == FALSE dg == PersistentDoppelDefinitionFixture912 key == AbilityKey99(d) definitions == [k \in (IF d.syntax.kind="Conditional" THEN {key,ConditionalKey96(dg)} ELSE {ConditionalKey96(dg)}) |-> IF k=key THEN d ELSE dg] sourceLex == PersistentGateLexemes912(d,kind) lexemes == [k \in DOMAIN definitions |-> IF k=key THEN sourceLex ELSE LexicalSingleFixture99(dg,"Specimen0076","when",2,"ActualOccurrenceTrigger",PersistentGateFacts912)] objects == [id \in {1,2} |-> IF id=1 THEN [card |-> sourceCard,form |-> "Card",kind |-> "Attachment",side |-> "SideA",zone |-> "Play",loc |-> <<"Root","SchemaAtom082">>,host |-> 0, deployed |-> TRUE,face |-> "Up",activated |-> TRUE,targetSite |-> "SchemaAtom082",targetSiteKind |-> "SchemaAtom033",area |-> "Root",position |-> "NoValue",marks |-> {}] ELSE CardObject9("Specimen0076",IF doppelDeployed THEN "Play" ELSE "SideBDiscard",doppelDeployed,"Up")] traversal == IF withTraversal THEN [TraversalFixture92("ProcedureCoded75d879e00ff") EXCEPT !.reachedSuccess=TRUE,!.successful=TRUE,!.position="NoValue"] ELSE NoTraversal6 itemInspection == [OpenItemInspection7(200,1,objects[1],traversal.id,201,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] beforeWorld == [LifetimeWorldFixture910 EXCEPT !.cardFacts=PersistentGateFacts912,!.objects=objects,!.present={19000,19001},!.turn=TurnFixture92("SideB"), !.control=[traversal |-> traversal,phaseEndedIds |-> {}],!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.itemInspections=[id \in {200} |-> itemInspection]] beforeAuthority == NewLifetimeAuthority910(beforeWorld) beforeRegistry == NewPersistentRegistry912(ObservedWithFrontier910(NewLingeringRegistry910,beforeAuthority,1)) beforeSnapshot == [ConditionalSnapshotFixture96(1,0,"BeforeItemInspectionRetire",definitions,objects) EXCEPT !.present=beforeWorld.present] beforeLedger == NewConditionalLedger96(beforeSnapshot) inventory == [tag |-> "AuthoritativeSourceAbilityInventory",worldId |-> 1,source |-> d.syntax.source, card |-> sourceCard,sourceSHA |-> PersistentGateFacts912[sourceCard].sourceSHA, definitions |-> [k \in {key} |-> d],lexemes |-> [k \in {key} |-> sourceLex]] movement == [tag |-> "CardMovement",kind |-> "Retire",id |-> 210,disposition |-> "Complete",sources |-> {1},successors |-> [id \in {1} |-> 3]] trashEvent == MovementEvent8(210,"Retire",{1}) trash == [tag |-> "ActualSideBItemInspectionRetire",id |-> 210,actor |-> "SideB",source |-> 1,successor |-> 3,itemInspection |-> itemInspection,movement |-> movement, historyBefore |-> Empty9,historyAfter |-> [id \in {210} |-> trashEvent],events |-> {trashEvent}] effectIds == [k \in {key} |-> 55000] created == PersistentBirthProposedFixture912(beforeRegistry,inventory,trash,effectIds,beforeWorld) afterObjects == [id \in {2,3} |-> IF id=2 THEN objects[2] ELSE [objects[1] EXCEPT !.zone="SideADiscard",!.loc="SideADiscard", !.deployed=FALSE,!.activated=FALSE,!.face="Up",!.host=0,!.marks={}]] base == [beforeWorld EXCEPT !.id=2,!.objects=afterObjects,!.present={19001}] afterWorld == PersistentWorld912(base,created) execution == [tag |-> "ActualObjectTransition",id |-> 210,snapshotId |-> 2,source |-> RuleAbilitySource9("ProcedureCode17f2a65162fb"),trash |-> trash] afterAuthority == LifetimeAuthorityAfter910(beforeAuthority,LifetimeKernelTransition910(beforeWorld,afterWorld,execution)) afterRegistry == [created EXCEPT !.frontier=LifetimeFrontier910(afterAuthority,2)] afterLedger == IF withTraversal \/ key \notin DOMAIN beforeLedger.activationEpoch THEN beforeLedger ELSE [beforeLedger EXCEPT !.activationEpoch[key]=1,!.activationSerial=1] afterSnapshot == [ConditionalSnapshotFixture96(2,0,"AfterItemInspectionRetire",definitions,afterObjects) EXCEPT !.present=afterWorld.present,!.activity=afterWorld.activity,!.usedObjects={1,2,3},!.activationEpoch=afterLedger.activationEpoch, !.activationSerial=afterLedger.activationSerial] IN [d |-> d,dg |-> dg,key |-> key,definitions |-> definitions,lexemes |-> lexemes,objects |-> objects,traversal |-> traversal,itemInspection |-> itemInspection, beforeWorld |-> beforeWorld,beforeAuthority |-> beforeAuthority,beforeRegistry |-> beforeRegistry,beforeSnapshot |-> beforeSnapshot,beforeLedger |-> beforeLedger, inventory |-> inventory,trash |-> trash,effectIds |-> effectIds,created |-> created,afterObjects |-> afterObjects,afterWorld |-> afterWorld, execution |-> execution,afterAuthority |-> afterAuthority,afterRegistry |-> afterRegistry,afterLedger |-> afterLedger,afterSnapshot |-> afterSnapshot] PersistentGateBirthValid912(f) == CreatePersistentOnRetire912(f.beforeRegistry,f.afterRegistry,f.beforeLedger,f.afterLedger,<<>>,<<>>,f.beforeSnapshot,f.afterSnapshot, f.inventory,f.trash,f.effectIds,{1,2},f.beforeAuthority,f.afterAuthority,PersistentGateFacts912) PersistentGateCutoffFixture912(f) == PersistentTraversalEndFixture912(f,FALSE) PersistentGateCutoffCoreValid912(g) == /\ PersistentTraversalMoveValid912(g.initial,g.before,g.beforeBase,g.beforeExecution) /\ CompleteTraversal6(g.preEnd,g.ended,TRUE,g.events6,{2}) /\ PersistentTraversalMoveValid912(g.before,g.end,g.endBase,g.endExecution) /\ ProcessPersistentCheckpoint912(g.end.r,g.end.l,g.after.l,<<>>,<<>>,g.f.definitions,g.f.lexemes,g.cp,g.conditions,g.allocation,g.bindings, Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> g.cp.id,caller |-> g.cp.caller,traversalId |-> 2],{}, PersistentGateFacts912,g.end.w,g.end.a) /\ CutoffPersistentAtTraversalEnd912(g.end.r,g.after.r,g.after.l,g.cp,g.preEnd,g.ended,g.events6,{2},g.boundary) PersistentGateCutoffValid912(g) == /\ PersistentGateBirthValid912(g.f) /\ PersistentGateCutoffCoreValid912(g) PersistentGateStateFixture912(kind,stage) == LET f == PersistentGateBirthFixture912(kind) g == PersistentGateCutoffFixture912(f) initial == PersistentTraversalStateFixture912(f,f.afterRegistry,f.afterLedger,f.afterWorld,f.afterAuthority,<<>>) base == [g.after.w EXCEPT !.id=5,!.control=PaidTraversalControlFixture95([TraversalFixture92("ProcedureCodef1914978bb8e") EXCEPT !.id=3])] execution == [tag |-> "ActualTimingTransition",id |-> 19600,snapshotId |-> 5,source |-> RuleAbilitySource9("SyntheticNestedTraversal912")] other == PersistentTraversalMoveFixture912(g.after,base,execution) current == CASE stage="Birth" -> initial [] stage="Cutoff" -> g.after [] OTHER -> other IN [f |-> f,g |-> g,initial |-> initial,other |-> other,base |-> base,execution |-> execution,b |-> current] PersistentGateStateValid912(s) == /\ PersistentGateBirthValid912(s.f) /\ PersistentGateCutoffValid912(s.g) /\ PersistentTraversalMoveValid912(s.g.after,s.other,s.base,s.execution) /\ LifetimeReady910(s.b.r,s.b.a) /\ PersistentCheckpointBound912(s.b.r,s.b.l) PersistentGateCapabilities912(d,lex,turnId) == LET pattern == [kind |-> "ExposureMarkers",actor |-> "SideB"] clauses == IF d.syntax.kind="Paid" THEN [id \in {1} |-> [mode |-> "PreventAmount",pattern |-> pattern,value |-> 1]] ELSE [id \in {1,2} |-> IF id=1 THEN [mode |-> "WouldTrigger",pattern |-> pattern,ordinal |-> 0,period |-> TimingRef9("Turn",turnId)] ELSE [mode |-> "AddValue",pattern |-> pattern,value |-> 1]] IN [tag |-> "NormalizedInterruptCapabilities",definition |-> d,origin |-> lex.origin,clauses |-> clauses, primaryGroups |-> IF d.syntax.kind="Conditional" THEN [id \in {1} |-> {1}] ELSE Empty9] PersistentGateWorldFixture912(s,ledger,id,entry) == LET f == s.f b == s.b snapshot == [PersistentTraversalSnapshotFixture912(f,b.w,b.r,ledger,ledger.lastCheckpoint,"PersistentGateCurrent") EXCEPT !.id=id] paid == IF f.d.syntax.kind="Paid" THEN [key \in {f.key} |-> f.d] ELSE Empty9 all == ReplacementOverlay99(f.definitions,paid) lexemes == ReplacementOverlay99(f.lexemes,[key \in {f.key} |-> f.inventory.lexemes[key]]) c == [PaidContextFixture95(f.d,b.w.objects,b.w.turn) EXCEPT !.traversal=b.w.control.traversal,!.traversalControl=b.w.control, !.defaultActive=FALSE,!.present=snapshot.present,!.activity=snapshot.activity,!.points=snapshot.points] IN [tag |-> "CurrentInterruptWorld",id |-> id,objects |-> b.w.objects,controllers |-> [object \in DOMAIN b.w.objects |-> b.w.objects[object].side], turn |-> b.w.turn,traversalControl |-> b.w.control,activePeriods |-> Empty9,conditional |-> snapshot, paidDefinitions |-> paid,paidContexts |-> [key \in DOMAIN paid |-> c],turnUses |-> Empty9, lexemes |-> lexemes,capabilities |-> [key \in DOMAIN all |-> IF key=f.key THEN PersistentGateCapabilities912(f.d,lexemes[key],b.w.turn.id) ELSE [tag |-> "NormalizedInterruptCapabilities",definition |-> all[key],origin |-> lexemes[key].origin,clauses |-> Empty9]], replacementDefinitions |-> Empty9,liveReplacementIds |-> {},entries |-> [eid \in {entry.id} |-> entry], ruleInvocations |-> [rid \in {entry.ruleInvocation} |-> [tag |-> "ActualRuleInvocation",step |-> entry.ruleStep, returned |-> FALSE,structure |-> entry.sourceProcedure,owner |-> entry.owner]]] PersistentGateOpeningFixture912(kind,stage) == LET s == PersistentGateStateFixture912(kind,stage) raw == StaticProjectionFixture99 entry == [raw.entry EXCEPT !.snapshotId=s.b.w.id] origin == raw.origin world == PersistentGateWorldFixture912(s,s.b.l,s.b.w.id,entry) effects == [id \in {1} |-> [StaticAtomFixture99(id,"ExposureMarkers",origin.ruleStep) EXCEPT !.value=1,!.actor="SideB"]] description == [raw.description EXCEPT !.snapshotId=world.id,!.effects=effects,!.order= <<1>>] projection == [raw.projection EXCEPT !.description=description,!.snapshotId=world.id,!.forbiddenIds={},!.values=Empty9] context == NewExpectedContext99(19610,entry.id,origin,world,description,effects,entry.owner) expectedRegistry == [NewExpectedRegistry99 EXCEPT !.contexts=[id \in {context.id} |-> context],!.entryIds={entry.id},!.usedContextIds={context.id}] capture == InitialWouldObservation99(context,19611) history == InitialCaptureAfterFixture99(NewWouldAccounting99,context,capture) candidates == {key \in OpeningConditionalKeys99(context,world,history,s.b.l) : PersistentGenerationAllowed912(s.b.r,world.conditional.definitions[key],world.traversalControl.traversal.id)} allocation == [key \in candidates |-> 19620] prepared == RelevancePreparedFixture99(context,s.b.l,world,allocation,19630,1963) postWorld == PersistentGateWorldFixture912(s,prepared.ledger,s.b.w.id,entry) site == PrioritySite9("Turn",origin.ruleStep,world.turn.phase,TimingRef9("TurnPhase",10),world.turn.owner,world.turn.id,world.traversalControl.traversal.id, 0,3,0,FALSE,ActualImminenceEntry99(entry,origin,world,PersistentGateFacts912),~world.turn.formalEnded) opening == PreparedOriginOpening99(prepared.context,site) window == NewPriorityWindow9(19630,"Interrupt",site,prepared.context.openingMembers,1963,NoTimingRef9,prepared.context.openingRef,1) opened == [prepared.context EXCEPT !.phase="WindowOpen",!.site=site] cleared == [prepared.context EXCEPT !.phase="Cleared",!.site=site] clearance == ContextInstructionClearance99(cleared,0) instructionCleared == [cleared EXCEPT !.phase="InstructionCleared",!.clearance=clearance] IN [s |-> s,entry |-> entry,origin |-> origin,world |-> world,effects |-> effects,description |-> description,projection |-> projection, context |-> context,expectedRegistry |-> expectedRegistry,capture |-> capture,history |-> history,candidates |-> candidates,allocation |-> allocation, prepared |-> prepared,postWorld |-> postWorld,site |-> site,opening |-> opening,window |-> window,opened |-> opened, cleared |-> cleared,clearance |-> clearance,instructionCleared |-> instructionCleared] PersistentGateOpeningValid912(f) == /\ PersistentGateStateValid912(f.s) /\ CurrentInterruptWorld99(f.world,f.s.b.l,PersistentGateFacts912) /\ BeginExpectedContext99(NewExpectedRegistry99,f.expectedRegistry,f.context.id,f.origin,f.world,f.entry,f.description,f.projection,f.effects, f.entry.owner,PersistentGateFacts912,NewWouldAccounting99,f.history,f.capture) /\ PreparePersistentOpening912(f.s.b.r,f.context,f.prepared.context,f.s.b.l,f.prepared.ledger,f.origin,f.world,f.history,19630,1963, f.allocation,{},PersistentGateFacts912,f.s.b.a) PersistentGateBirthSchemasChecks912 == \A kind \in {"Paid","Conditional"} : LET f == PersistentGateBirthFixture912(kind) IN /\ PersistentGateBirthValid912(f) /\ 1 \notin DOMAIN f.afterObjects /\ f.afterObjects[3].card=PersistentGateCard912(kind) /\ f.afterRegistry.persistent[f.key].definition=f.d /\ f.d.syntax.cardKind="Attachment" /\ f.d.syntax.controller="SideA" /\ f.afterRegistry.effects[55000].status="Active" /\ PersistentSourceActive912(f.d,f.afterWorld) /\ f.d.syntax.source=ObjectAbilitySource9(1) /\ f.afterRegistry.persistent[f.key].successor=3 PersistentGateGenerationMatrixChecks912 == \A kind \in {"Paid","Conditional"}, stage \in {"Birth","Cutoff","OtherTraversal"} : LET f == PersistentGateOpeningFixture912(kind,stage) relevant == PersistentOpeningPaidRelevant912(f.s.b.r,f.prepared.context,f.postWorld,f.history,f.window) IN /\ PersistentGateOpeningValid912(f) /\ f.context.initialRef.origin="Rule" /\ f.context.initialRef.abilityInstance=0 /\ f.context.initialRef.index=0 /\ InitialWouldCaptured99(f.context,f.history) /\ (f.candidates#{} )=(kind="Conditional" /\ stage="Birth") /\ (relevant#{} )=(kind="Paid" /\ stage="Birth") /\ IF stage="Birth" THEN OpenPersistentPrepared912(f.s.b.r,f.prepared.context,f.opened,<<>>,<>,f.origin,f.postWorld,f.history, f.prepared.ledger,f.site,f.opening,{},PersistentGateFacts912,f.s.b.a) ELSE /\ NoPersistentPrepared912(f.s.b.r,f.prepared.context,f.cleared,f.origin,f.postWorld,f.history,f.prepared.ledger,<<>>,f.site, PersistentGateFacts912,f.s.b.a) /\ ClearPersistentInstruction912(f.s.b.r,f.cleared,f.instructionCleared,f.origin,f.postWorld,f.history,f.prepared.ledger, <<>>,<<>>,"NoModifiers",f.clearance,PersistentGateFacts912,f.s.b.a) PersistentGatePendingFixture912(otherTraversal,present) == LET f == PersistentGateOpeningFixture912("Conditional","Birth") captured == [f.s.f EXCEPT !.afterLedger=f.prepared.ledger,!.afterSnapshot=f.postWorld.conditional] g == PersistentGateCutoffFixture912(captured) base == [g.after.w EXCEPT !.id=5,!.control=PaidTraversalControlFixture95([TraversalFixture92("ProcedureCodef1914978bb8e") EXCEPT !.id=3])] execution == [tag |-> "ActualTimingTransition",id |-> 19601,snapshotId |-> 5,source |-> RuleAbilitySource9("SyntheticNestedTraversal912")] other == PersistentTraversalMoveFixture912(g.after,base,execution) b == IF otherTraversal THEN other ELSE g.after s == [f.s EXCEPT !.b=b] world == PersistentGateWorldFixture912(s,b.l,b.w.id,f.entry) effects == IF present THEN f.effects ELSE Empty9 origin == [f.origin EXCEPT !.plan.revision=1] projection == StaticRefreshReceiptFixture99(f.opened,world,effects) context == StaticRefreshAfterFixture99(f.opened,origin,world,effects) receipt == RuleWouldReceiptFixture99(19612,context,world,IF present THEN <<1>> ELSE <<>>) history == RuleWouldAfterFixture99(f.history,context,world,IF present THEN <<1>> ELSE <<>>,receipt) IN [f |-> f,captured |-> captured,g |-> g,base |-> base,execution |-> execution,other |-> other,b |-> b, world |-> world,origin |-> origin,projection |-> projection,context |-> context,receipt |-> receipt,history |-> history] PersistentGatePendingAfterCutoffChecks912 == \A otherTraversal,present \in BOOLEAN : LET q == PersistentGatePendingFixture912(otherTraversal,present) IN /\ PersistentGateOpeningValid912(q.f) /\ OpenPersistentPrepared912(q.f.s.b.r,q.f.prepared.context,q.f.opened,<<>>,<>,q.f.origin,q.f.postWorld,q.f.history, q.f.prepared.ledger,q.f.site,q.f.opening,{},PersistentGateFacts912,q.f.s.b.a) /\ PersistentGateCutoffCoreValid912(q.g) /\ PersistentTraversalMoveValid912(q.g.after,q.other,q.base,q.execution) /\ PersistentInterruptWorld912(q.b.r,q.world,q.b.l,q.b.a) /\ CurrentInterruptWorld99(q.world,q.b.l,PersistentGateFacts912) /\ RefreshExpectedWorld99(q.f.opened,q.context,q.f.origin,q.origin,q.world,q.projection,q.f.history) /\ ObserveCurrentExpectedWould99(q.f.history,q.history,q.context,q.origin,q.world,IF present THEN <<1>> ELSE <<>>,q.receipt) /\ InitialWouldCaptured99(q.context,q.history) /\ WouldViewCurrent99(q.history,q.context,q.world) /\ q.b.l.instances[19620]=q.f.prepared.ledger.instances[19620] /\ q.b.l.instances[19620].status="Pending" /\ ~PersistentGenerationAllowed912(q.b.r,q.f.s.f.d,q.world.traversalControl.traversal.id) /\ CurrentPendingRelevant99(q.context,q.world,q.history,q.b.l)=IF present THEN {19620} ELSE {} /\ PersistentCurrentEffect912(q.b.r,q.context,q.world,q.history,q.b.l,q.f.window).relevantConditional=IF present THEN {19620} ELSE {} /\ q.context.initialRef=q.f.context.initialRef /\ q.context.initialEffects=q.f.effects /\ q.context.initialWorld=2 /\ q.context.currentWorld=IF otherTraversal THEN 5 ELSE 4 PersistentGatePaidReadyFixture912(stage) == LET f == PersistentGateOpeningFixture912("Paid",stage) sideBReady == ReadyFixture92(f.window) passed == PassPriorityFrame9(sideBReady) ready == ReadyFixture92(passed) key == f.s.f.key c == [f.postWorld.paidContexts[key] EXCEPT !.currentEffect=PersistentCurrentEffect912(f.s.b.r,f.opened,f.postWorld,f.history,f.prepared.ledger,ready), !.paidRelevance=PersistentCurrentPaidRelevance912(f.s.b.r,f.opened,f.postWorld,f.history,ready)] world == [f.postWorld EXCEPT !.paidContexts[key]=c] option == PaidOptionFixture95(f.s.f.d,ready) legality == LegalityFixture92(ready,option) stack == <> afterStack == <> p == OpenPaidProcedure95(19650,f.s.f.d,option,ready,legality.transactionId,"Play") IN [f |-> f,sideBReady |-> sideBReady,passed |-> passed,ready |-> ready,world |-> world,c |-> c,option |-> option, legality |-> legality,stack |-> stack,afterStack |-> afterStack,p |-> p] PersistentGateReserveValid912(q) == ReserveCurrentPersistentPaid912(q.f.s.b.r,q.stack,q.afterStack,q.p,19650,q.f.s.f.d,q.c,q.f.opened,q.f.origin,q.world,q.f.history, q.f.prepared.ledger,q.option,q.legality,{},PersistentGateFacts912,q.f.s.b.a) PersistentGatePaidCurrentMatrixChecks912 == \A stage \in {"Birth","Cutoff","OtherTraversal"} : LET q == PersistentGatePaidReadyFixture912(stage) expected == IF stage="Birth" THEN {q.f.s.f.key} ELSE {} IN /\ PersistentGateOpeningValid912(q.f) /\ CurrentInterruptWorld99(q.world,q.f.prepared.ledger,PersistentGateFacts912) /\ q.ready.priority="SideA" /\ q.ready.stage="Ready" /\ q.c.defaultActive=FALSE /\ 1 \notin DOMAIN q.world.objects /\ q.p.ability.source=ObjectAbilitySource9(1) /\ q.p.ability.sourceZone="Play" /\ PaidBaseEligibility99(q.f.s.f.d,q.world.lexemes[q.f.s.f.key],q.c,q.ready) /\ CurrentPaidRelevant99(q.f.opened,q.world,q.f.history,q.ready)={q.f.s.f.key} /\ PersistentCurrentPaidRelevant912(q.f.s.b.r,q.f.opened,q.world,q.f.history,q.ready)=expected /\ (PersistentGateReserveValid912(q))=(stage="Birth") PersistentGatePaidOrdinaryLegalityChecks912 == LET q == PersistentGatePaidReadyFixture912("Birth") wrongPlayer == [q.ready EXCEPT !.priority="SideB"] IN /\ PersistentGateReserveValid912(q) /\ PersistentCurrentPaidRelevant912(q.f.s.b.r,q.f.opened,q.world,q.f.history,wrongPlayer)={} /\ \A available \in BOOLEAN : LET c == [q.c EXCEPT !.useProhibitions=IF available THEN {} ELSE {[ability |-> q.f.s.f.d.syntax.id,source |-> q.f.s.f.d.syntax.source,traversalId |-> q.c.traversal.id]}] world == [q.world EXCEPT !.paidContexts[q.f.s.f.key]=c] IN PersistentCurrentPaidRelevant912(q.f.s.b.r,q.f.opened,world,q.f.history,q.ready)=IF available THEN {q.f.s.f.key} ELSE {} PersistentGateForgeWorld912(world,field) == LET snapshot == CASE field="Points" -> [world.conditional EXCEPT !.points["SideB"]=42] [] field="Present" -> [world.conditional EXCEPT !.present=@ \ {19001}] [] OTHER -> [world.conditional EXCEPT !.activity.activeRules=@ \cup {"ForgedUnrelatedRule"}] IN [world EXCEPT !.conditional=snapshot,!.paidContexts=[key \in DOMAIN @ |-> [@[key] EXCEPT !.points=snapshot.points,!.present=snapshot.present,!.activity=snapshot.activity]]] PersistentGateProtectedProjectionChecks912 == \A kind \in {"Paid","Conditional"}, field \in {"Points","Present","Activity"} : LET f == PersistentGateOpeningFixture912(kind,"Birth") world == PersistentGateForgeWorld912(f.world,field) IN /\ PersistentGateOpeningValid912(f) /\ CurrentInterruptWorld99(world,f.s.b.l,PersistentGateFacts912) /\ InitialWouldCaptured99(f.context,f.history) /\ WouldViewCurrent99(f.history,f.context,world) /\ ~PersistentInterruptWorld912(f.s.b.r,world,f.s.b.l,f.s.b.a) /\ ~PreparePersistentOpening912(f.s.b.r,f.context,f.prepared.context,f.s.b.l,f.prepared.ledger,f.origin,world,f.history,19630,1963, f.allocation,{},PersistentGateFacts912,f.s.b.a) PersistentGateInitialCaptureChecks912 == \A kind \in {"Paid","Conditional"} : LET f == PersistentGateOpeningFixture912(kind,"Birth") origin == [f.origin EXCEPT !.plan.revision=1] projection == StaticRefreshReceiptFixture99(f.context,f.world,f.effects) context == StaticRefreshAfterFixture99(f.context,origin,f.world,f.effects) receipt == RuleWouldReceiptFixture99(19613,context,f.world,<<1>>) currentOnly == RuleWouldAfterFixture99(NewWouldAccounting99,context,f.world,<<1>>,receipt) complete == RuleWouldAfterFixture99(f.history,context,f.world,<<1>>,receipt) prepared == RelevancePreparedFixture99(context,f.s.b.l,f.world,f.allocation,19630,1963) IN /\ PersistentGateOpeningValid912(f) /\ RefreshExpectedWorld99(f.context,context,f.origin,origin,f.world,projection,f.history) /\ ObserveCurrentExpectedWould99(NewWouldAccounting99,currentOnly,context,origin,f.world,<<1>>,receipt) /\ ObserveCurrentExpectedWould99(f.history,complete,context,origin,f.world,<<1>>,receipt) /\ WouldViewCurrent99(currentOnly,context,f.world) /\ ~InitialWouldCaptured99(context,currentOnly) /\ InitialWouldCaptured99(context,complete) /\ PreparePersistentOpening912(f.s.b.r,context,prepared.context,f.s.b.l,prepared.ledger,origin,f.world,complete,19630,1963, f.allocation,{},PersistentGateFacts912,f.s.b.a) /\ ~PreparePersistentOpening912(f.s.b.r,context,prepared.context,f.s.b.l,prepared.ledger,origin,f.world,currentOnly,19630,1963, f.allocation,{},PersistentGateFacts912,f.s.b.a) PersistentGatePaidValueRelevanceChecks912 == \A value \in -1..1, preventable \in BOOLEAN : LET f == PersistentGateOpeningFixture912("Paid","Birth") effects == [f.effects EXCEPT ![1].value=value,![1].preventable=preventable] origin == [f.origin EXCEPT !.plan.revision=1] projection == StaticRefreshReceiptFixture99(f.context,f.world,effects) context == StaticRefreshAfterFixture99(f.context,origin,f.world,effects) receipt == RuleWouldReceiptFixture99(19614,context,f.world,<<1>>) history == RuleWouldAfterFixture99(f.history,context,f.world,<<1>>,receipt) prepared == RelevancePreparedFixture99(context,f.s.b.l,f.world,Empty9,19630,1963) window == [f.window EXCEPT !.instruction=context.currentRef,!.effectRevision=2] IN /\ RefreshExpectedWorld99(f.context,context,f.origin,origin,f.world,projection,f.history) /\ ObserveCurrentExpectedWould99(f.history,history,context,origin,f.world,<<1>>,receipt) /\ CurrentInterruptWorld99(f.world,f.s.b.l,PersistentGateFacts912) /\ PreparePersistentOpening912(f.s.b.r,context,prepared.context,f.s.b.l,prepared.ledger,origin,f.world,history,19630,1963, Empty9,{},PersistentGateFacts912,f.s.b.a) /\ PersistentOpeningPaidRelevant912(f.s.b.r,prepared.context,f.world,history,window)=IF preventable THEN {f.s.f.key} ELSE {} PersistentGateCoherentBlockedOpeningChecks912 == /\ \A stage \in {"Cutoff","OtherTraversal"} : LET f == PersistentGateOpeningFixture912("Conditional",stage) keys == OpeningConditionalKeys99(f.context,f.world,f.history,f.s.b.l) allocation == [key \in keys |-> 19621] proposed == RelevancePreparedFixture99(f.context,f.s.b.l,f.world,allocation,19630,1963) IN /\ keys={f.s.f.key} /\ DOMAIN proposed.ledger.instances={19621} /\ ~PreparePersistentOpening912(f.s.b.r,f.context,proposed.context,f.s.b.l,proposed.ledger,f.origin,f.world,f.history,19630,1963, allocation,{},PersistentGateFacts912,f.s.b.a) /\ \A stage \in {"Cutoff","OtherTraversal"} : LET f == PersistentGateOpeningFixture912("Paid",stage) IN ~OpenPersistentPrepared912(f.s.b.r,f.prepared.context,f.opened,<<>>,<>,f.origin,f.postWorld,f.history, f.prepared.ledger,f.site,f.opening,{},PersistentGateFacts912,f.s.b.a) /\ LET f == PersistentGateOpeningFixture912("Paid","Birth") IN /\ ~NoPersistentPrepared912(f.s.b.r,f.prepared.context,f.cleared,f.origin,f.postWorld,f.history,f.prepared.ledger,<<>>,f.site, PersistentGateFacts912,f.s.b.a) /\ ~ClearPersistentInstruction912(f.s.b.r,f.cleared,f.instructionCleared,f.origin,f.postWorld,f.history,f.prepared.ledger, <<>>,<<>>,"NoModifiers",f.clearance,PersistentGateFacts912,f.s.b.a) PersistentGatePaidBoundReceiptsChecks912 == LET q == PersistentGatePaidReadyFixture912("Birth") differentContext == [q.c EXCEPT !.strengths[2].amount=999] wrongCurrent == [q.c EXCEPT !.currentEffect.paidInterruptAbilities=@ \cup {999}] wrongRelevance == [q.c EXCEPT !.paidRelevance.eligible=@ \cup {[ability |-> 999,source |-> ObjectAbilitySource9(1)]}] IN /\ PersistentGateReserveValid912(q) /\ ~ReserveCurrentPersistentPaid912(q.f.s.b.r,q.stack,q.afterStack,q.p,19650,q.f.s.f.d,differentContext,q.f.opened,q.f.origin,q.world,q.f.history, q.f.prepared.ledger,q.option,q.legality,{},PersistentGateFacts912,q.f.s.b.a) /\ \A c \in {wrongCurrent,wrongRelevance} : LET world == [q.world EXCEPT !.paidContexts[q.f.s.f.key]=c] IN /\ CurrentInterruptWorld99(world,q.f.prepared.ledger,PersistentGateFacts912) /\ PaidEligibility99(q.f.s.f.d,world.lexemes[q.f.s.f.key],c,q.ready,PersistentGateFacts912) /\ ~ReserveCurrentPersistentPaid912(q.f.s.b.r,q.stack,q.afterStack,q.p,19650,q.f.s.f.d,c,q.f.opened,q.f.origin,world,q.f.history, q.f.prepared.ledger,q.option,q.legality,{},PersistentGateFacts912,q.f.s.b.a) PersistentGateOrdinaryCard912 == "synthetic_persistent_ordinary_paid_912" PersistentGateOrdinaryFacts912 == ReplacementOverlay99(PersistentGateFacts912,[card \in {PersistentGateOrdinaryCard912} |-> [kind |-> "Attachment",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> "29c52ca8e292838dd0ac16b52787e339acb1dc098c99e5e71fe9570d1e6501fc"]]) PersistentGateOrdinaryDefinition912 == [PersistentGateDefinition912("Paid") EXCEPT !.syntax.units= <> \o BaseUnits93("Paid")] PersistentGateOrdinaryLexemes912(d) == LexicalSingleFixture99(d,PersistentGateOrdinaryCard912,"gain",3,"EffectOperator",PersistentGateOrdinaryFacts912) PersistentGateOrdinaryBirthFixture912 == LET kind == "Paid" withTraversal == TRUE sourceCard == PersistentGateOrdinaryCard912 d == PersistentGateOrdinaryDefinition912 doppelDeployed == TRUE dg == PersistentDoppelDefinitionFixture912 key == AbilityKey99(d) definitions == [k \in (IF d.syntax.kind="Conditional" THEN {key,ConditionalKey96(dg)} ELSE {ConditionalKey96(dg)}) |-> IF k=key THEN d ELSE dg] sourceLex == PersistentGateOrdinaryLexemes912(d) lexemes == [k \in DOMAIN definitions |-> IF k=key THEN sourceLex ELSE LexicalSingleFixture99(dg,"Specimen0076","when",2,"ActualOccurrenceTrigger",PersistentGateOrdinaryFacts912)] objects == [id \in {1,2,4} |-> IF id=1 THEN [card |-> sourceCard,form |-> "Card",kind |-> "Attachment",side |-> "SideA",zone |-> "Play",loc |-> <<"Root","SchemaAtom082">>,host |-> 0, deployed |-> TRUE,face |-> "Up",activated |-> TRUE,targetSite |-> "SchemaAtom082",targetSiteKind |-> "SchemaAtom033",area |-> "Root",position |-> "NoValue",marks |-> {}] ELSE IF id=4 THEN [CardObject9("Specimen0245","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.targetSite="SchemaAtom082",!.targetSiteKind="SchemaAtom033",!.area="Barrier",!.loc= <<"Barrier","SchemaAtom082","outer">>,!.position="outer"] ELSE CardObject9("Specimen0076",IF doppelDeployed THEN "Play" ELSE "SideBDiscard",doppelDeployed,"Up")] traversal == IF withTraversal THEN [TraversalFixture92("ProcedureCoded75d879e00ff") EXCEPT !.reachedSuccess=TRUE,!.successful=TRUE,!.position="NoValue"] ELSE NoTraversal6 itemInspection == [OpenItemInspection7(200,1,objects[1],traversal.id,201,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] beforeWorld == [LifetimeWorldFixture910 EXCEPT !.cardFacts=PersistentGateOrdinaryFacts912,!.objects=objects,!.present={19000,19001},!.turn=TurnFixture92("SideB"), !.control=[traversal |-> traversal,phaseEndedIds |-> {}],!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.itemInspections=[id \in {200} |-> itemInspection]] beforeAuthority == NewLifetimeAuthority910(beforeWorld) beforeRegistry == NewPersistentRegistry912(ObservedWithFrontier910(NewLingeringRegistry910,beforeAuthority,1)) beforeSnapshot == [ConditionalSnapshotFixture96(1,0,"BeforeItemInspectionRetire",definitions,objects) EXCEPT !.present=beforeWorld.present] beforeLedger == NewConditionalLedger96(beforeSnapshot) inventory == [tag |-> "AuthoritativeSourceAbilityInventory",worldId |-> 1,source |-> d.syntax.source, card |-> sourceCard,sourceSHA |-> PersistentGateOrdinaryFacts912[sourceCard].sourceSHA, definitions |-> [k \in {key} |-> d],lexemes |-> [k \in {key} |-> sourceLex]] movement == [tag |-> "CardMovement",kind |-> "Retire",id |-> 210,disposition |-> "Complete",sources |-> {1},successors |-> [id \in {1} |-> 3]] trashEvent == MovementEvent8(210,"Retire",{1}) trash == [tag |-> "ActualSideBItemInspectionRetire",id |-> 210,actor |-> "SideB",source |-> 1,successor |-> 3,itemInspection |-> itemInspection,movement |-> movement, historyBefore |-> Empty9,historyAfter |-> [id \in {210} |-> trashEvent],events |-> {trashEvent}] effectIds == [k \in {key} |-> 55000] created == PersistentBirthProposedFixture912(beforeRegistry,inventory,trash,effectIds,beforeWorld) afterObjects == [id \in {2,3,4} |-> IF id \in {2,4} THEN objects[id] ELSE [objects[1] EXCEPT !.zone="SideADiscard",!.loc="SideADiscard", !.deployed=FALSE,!.activated=FALSE,!.face="Up",!.host=0,!.marks={}]] base == [beforeWorld EXCEPT !.id=2,!.objects=afterObjects,!.present={19001}] afterWorld == PersistentWorld912(base,created) execution == [tag |-> "ActualObjectTransition",id |-> 210,snapshotId |-> 2,source |-> RuleAbilitySource9("ProcedureCode17f2a65162fb"),trash |-> trash] afterAuthority == LifetimeAuthorityAfter910(beforeAuthority,LifetimeKernelTransition910(beforeWorld,afterWorld,execution)) afterRegistry == [created EXCEPT !.frontier=LifetimeFrontier910(afterAuthority,2)] afterLedger == IF withTraversal \/ key \notin DOMAIN beforeLedger.activationEpoch THEN beforeLedger ELSE [beforeLedger EXCEPT !.activationEpoch[key]=1,!.activationSerial=1] afterSnapshot == [ConditionalSnapshotFixture96(2,0,"AfterItemInspectionRetire",definitions,afterObjects) EXCEPT !.present=afterWorld.present,!.activity=afterWorld.activity,!.usedObjects={1,2,3,4},!.activationEpoch=afterLedger.activationEpoch, !.activationSerial=afterLedger.activationSerial] IN [d |-> d,dg |-> dg,key |-> key,definitions |-> definitions,lexemes |-> lexemes,objects |-> objects,traversal |-> traversal,itemInspection |-> itemInspection, beforeWorld |-> beforeWorld,beforeAuthority |-> beforeAuthority,beforeRegistry |-> beforeRegistry,beforeSnapshot |-> beforeSnapshot,beforeLedger |-> beforeLedger, inventory |-> inventory,trash |-> trash,effectIds |-> effectIds,created |-> created,afterObjects |-> afterObjects,afterWorld |-> afterWorld, execution |-> execution,afterAuthority |-> afterAuthority,afterRegistry |-> afterRegistry,afterLedger |-> afterLedger,afterSnapshot |-> afterSnapshot] PersistentGateOrdinaryBirthValid912(f) == CreatePersistentOnRetire912(f.beforeRegistry,f.afterRegistry,f.beforeLedger,f.afterLedger,<<>>,<<>>,f.beforeSnapshot,f.afterSnapshot, f.inventory,f.trash,f.effectIds,{1,2,4},f.beforeAuthority,f.afterAuthority,PersistentGateOrdinaryFacts912) PersistentGateOrdinaryReserveFixture912(laterTraversal) == LET f == PersistentGateOrdinaryBirthFixture912 initial == PersistentTraversalStateFixture912(f,f.afterRegistry,f.afterLedger,f.afterWorld,f.afterAuthority,<<>>) g == PersistentGateCutoffFixture912(f) base == [g.after.w EXCEPT !.id=5,!.control=PaidTraversalControlFixture95([TraversalFixture92("ProcedureCode8b3260c0010f") EXCEPT !.id=3])] execution == [tag |-> "ActualTimingTransition",id |-> 19700,snapshotId |-> 5,source |-> RuleAbilitySource9("SyntheticLaterTraversal912")] other == PersistentTraversalMoveFixture912(g.after,base,execution) b == IF laterTraversal THEN other ELSE initial encounter0 == OpenEncounter6(19710,4,b.w.control.traversal.id,TRUE,"NormalizedForcedEncounterInstruction",<<19711,19712>>) encounter1 == [encounter0 EXCEPT !.stage="BeginReactions"] encounter == WithFullySuppressInstruction6([encounter1 EXCEPT !.stage="Paid",!.paidReached=TRUE]) site == EncounterPaidSite95(b.w.turn,encounter,b.w.control) open == WindowFixture92(19720,"Paid",site,Empty9,0,NoTimingRef9) sideBReady == ReadyFixture92(open) passed == PassPriorityFrame9(sideBReady) ready == ReadyFixture92(passed) option == PaidOptionFixture95(f.d,ready) legality == LegalityFixture92(ready,option) c == [PaidContextFixture95(f.d,b.w.objects,b.w.turn) EXCEPT !.traversal=b.w.control.traversal,!.traversalControl=b.w.control, !.encounter=encounter,!.present=b.w.present,!.activity=b.w.activity,!.points=b.w.points,!.defaultActive=FALSE] p == OpenPaidProcedure95(19730,f.d,option,ready,legality.transactionId,"Play") afterStack == <> IN [f |-> f,g |-> g,initial |-> initial,b |-> b,other |-> other,base |-> base,execution |-> execution, encounter0 |-> encounter0,encounter1 |-> encounter1,encounter |-> encounter,site |-> site,sideBReady |-> sideBReady,passed |-> passed, ready |-> ready,option |-> option,legality |-> legality,c |-> c,p |-> p,afterStack |-> afterStack] PersistentGateOrdinaryReserveValid912(q) == ReservePersistentPaid912(q.b.r,<>,q.afterStack,q.p,19730,q.f.d,q.f.inventory.lexemes[q.f.key],q.c,q.option,q.legality,{}, PersistentGateOrdinaryFacts912,q.b.l,q.b.a) PersistentGateOrdinaryLowerReserveChecks912 == \A laterTraversal \in BOOLEAN : LET q == PersistentGateOrdinaryReserveFixture912(laterTraversal) IN /\ PersistentGateOrdinaryBirthValid912(q.f) /\ PersistentGateCutoffCoreValid912(q.g) /\ PersistentTraversalMoveValid912(q.g.after,q.other,q.base,q.execution) /\ BeginEncounter6(q.encounter0,q.encounter1,TRUE,{[tag |-> "EncounterBarrier",encounterId |-> 19710,barrierCard |-> 4,traversalId |-> q.b.w.control.traversal.id]}) /\ BeginEncounterPaid6(q.encounter1,q.encounter,TRUE,{}) /\ q.b.w.objects[4].card="Specimen0245" /\ q.b.w.objects[4].kind="Barrier" /\ q.encounter.forced /\ ~AbilityInterrupt99(q.f.d,q.f.inventory.lexemes[q.f.key]) /\ PaidWindowKinds99(q.f.d,q.f.inventory.lexemes[q.f.key])={"Paid"} /\ PaidEligibility99(q.f.d,q.f.inventory.lexemes[q.f.key],q.c,q.ready,PersistentGateOrdinaryFacts912) /\ 1 \notin DOMAIN q.b.w.objects /\ q.p.ability.source=ObjectAbilitySource9(1) /\ q.p.ability.sourceZone="Play" /\ q.ready.priority="SideA" /\ q.ready.kind="Paid" /\ q.site.traversalId=IF laterTraversal THEN 3 ELSE 2 /\ (PersistentGateOrdinaryReserveValid912(q))=~laterTraversal PersistentThreatFacts912 == ReplacementOverlay99(CardFacts9,[card \in {"synthetic_persistent_threat_912","synthetic_persistent_paid_threat_912"} |-> [kind |-> "Attachment",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> IF card="synthetic_persistent_paid_threat_912" THEN "056ca048bd521ada8b2fa7fc4e8ca353590fe0855e3945f691709ca1167e9807" ELSE "80239c44327fd4682f302b90eb20fbedf010969d878397e65fbddf479d5e53bb"]]) PersistentThreatDefinition912 == LET raw == ConditionalDefinitionFixture96(19000,"Specimen0010","Trigger","TraversalEnds","SchemaAtom016","SideB","SideB") IN [raw EXCEPT !.syntax.units= <> \o @] PersistentPaidThreatDefinition912 == [PersistentGateOrdinaryDefinition912 EXCEPT !.syntax.units= <> \o BaseUnits93("Paid")] PersistentThreatBirthForKindFixture912(kind,isPresent) == LET withTraversal == TRUE sourceCard == IF kind="Conditional" THEN "synthetic_persistent_threat_912" ELSE "synthetic_persistent_paid_threat_912" d == IF kind="Conditional" THEN PersistentThreatDefinition912 ELSE PersistentPaidThreatDefinition912 doppelDeployed == FALSE dg == PersistentDoppelDefinitionFixture912 key == AbilityKey99(d) definitions == [k \in (IF d.syntax.kind="Conditional" THEN {key,ConditionalKey96(dg)} ELSE {ConditionalKey96(dg)}) |-> IF k=key THEN d ELSE dg] sourceLex == LexicalSingleFixture99(d,sourceCard,IF kind="Conditional" THEN "whenever" ELSE "gain",IF kind="Conditional" THEN 3 ELSE 4, IF kind="Conditional" THEN "ActualOccurrenceTrigger" ELSE "EffectOperator",PersistentThreatFacts912) lexemes == [k \in DOMAIN definitions |-> IF k=key THEN sourceLex ELSE LexicalSingleFixture99(dg,"Specimen0076","when",2,"ActualOccurrenceTrigger",PersistentThreatFacts912)] objects == [id \in {1,2,4} |-> IF id=1 THEN [card |-> sourceCard,form |-> "Card",kind |-> "Attachment",side |-> "SideA",zone |-> "Play",loc |-> <<"Root","SchemaAtom082">>,host |-> 0, deployed |-> TRUE,face |-> "Up",activated |-> TRUE,targetSite |-> "SchemaAtom082",targetSiteKind |-> "SchemaAtom033",area |-> "Root",position |-> "NoValue",marks |-> {}] ELSE IF id=4 THEN [CardObject9("Specimen0245","Play",TRUE,"Up") EXCEPT !.activated=TRUE,!.targetSite="SchemaAtom082",!.targetSiteKind="SchemaAtom033",!.area="Barrier",!.loc= <<"Barrier","SchemaAtom082","outer">>,!.position="outer"] ELSE CardObject9("Specimen0076",IF doppelDeployed THEN "Play" ELSE "SideBDiscard",doppelDeployed,"Up")] traversal == IF withTraversal THEN [TraversalFixture92("ProcedureCoded75d879e00ff") EXCEPT !.reachedSuccess=TRUE,!.successful=TRUE,!.position="NoValue"] ELSE NoTraversal6 itemInspection == [OpenItemInspection7(200,1,objects[1],traversal.id,201,"siteInspection",{}) EXCEPT !.active=TRUE,!.beginMet=TRUE,!.step="ProcedureCode1dd0e8f05be2"] beforeWorld == [LifetimeWorldFixture910 EXCEPT !.cardFacts=PersistentThreatFacts912,!.objects=objects,!.present=IF isPresent THEN {19000,19001} ELSE {19001},!.turn=TurnFixture92("SideB"), !.control=[traversal |-> traversal,phaseEndedIds |-> {}],!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.itemInspections=[id \in {200} |-> itemInspection]] beforeAuthority == NewLifetimeAuthority910(beforeWorld) beforeRegistry == NewPersistentRegistry912(ObservedWithFrontier910(NewLingeringRegistry910,beforeAuthority,1)) beforeSnapshot == [ConditionalSnapshotFixture96(1,0,"BeforeItemInspectionRetire",definitions,objects) EXCEPT !.present=beforeWorld.present] beforeLedger == NewConditionalLedger96(beforeSnapshot) inventory == [tag |-> "AuthoritativeSourceAbilityInventory",worldId |-> 1,source |-> d.syntax.source, card |-> sourceCard,sourceSHA |-> PersistentThreatFacts912[sourceCard].sourceSHA, definitions |-> [k \in {key} |-> d],lexemes |-> [k \in {key} |-> sourceLex]] movement == [tag |-> "CardMovement",kind |-> "Retire",id |-> 210,disposition |-> "Complete",sources |-> {1},successors |-> [id \in {1} |-> 3]] trashEvent == MovementEvent8(210,"Retire",{1}) trash == [tag |-> "ActualSideBItemInspectionRetire",id |-> 210,actor |-> "SideB",source |-> 1,successor |-> 3,itemInspection |-> itemInspection,movement |-> movement, historyBefore |-> Empty9,historyAfter |-> [id \in {210} |-> trashEvent],events |-> {trashEvent}] effectIds == [k \in {key} |-> 55000] created == PersistentBirthProposedFixture912(beforeRegistry,inventory,trash,effectIds,beforeWorld) afterObjects == [id \in {2,3,4} |-> IF id \in {2,4} THEN objects[id] ELSE [objects[1] EXCEPT !.zone="SideADiscard",!.loc="SideADiscard", !.deployed=FALSE,!.activated=FALSE,!.face="Up",!.host=0,!.marks={}]] base == [beforeWorld EXCEPT !.id=2,!.objects=afterObjects,!.present={19001}] afterWorld == PersistentWorld912(base,created) execution == [tag |-> "ActualObjectTransition",id |-> 210,snapshotId |-> 2,source |-> RuleAbilitySource9("ProcedureCode17f2a65162fb"),trash |-> trash] afterAuthority == LifetimeAuthorityAfter910(beforeAuthority,LifetimeKernelTransition910(beforeWorld,afterWorld,execution)) afterRegistry == [created EXCEPT !.frontier=LifetimeFrontier910(afterAuthority,2)] afterLedger == IF withTraversal \/ key \notin DOMAIN beforeLedger.activationEpoch THEN beforeLedger ELSE [beforeLedger EXCEPT !.activationEpoch[key]=1,!.activationSerial=1] afterSnapshot == [ConditionalSnapshotFixture96(2,0,"AfterItemInspectionRetire",definitions,afterObjects) EXCEPT !.present=afterWorld.present,!.activity=afterWorld.activity,!.usedObjects={1,2,3,4},!.activationEpoch=afterLedger.activationEpoch, !.activationSerial=afterLedger.activationSerial] IN [d |-> d,dg |-> dg,key |-> key,definitions |-> definitions,lexemes |-> lexemes,objects |-> objects,traversal |-> traversal,itemInspection |-> itemInspection, beforeWorld |-> beforeWorld,beforeAuthority |-> beforeAuthority,beforeRegistry |-> beforeRegistry,beforeSnapshot |-> beforeSnapshot,beforeLedger |-> beforeLedger, inventory |-> inventory,trash |-> trash,effectIds |-> effectIds,created |-> created,afterObjects |-> afterObjects,afterWorld |-> afterWorld, execution |-> execution,afterAuthority |-> afterAuthority,afterRegistry |-> afterRegistry,afterLedger |-> afterLedger,afterSnapshot |-> afterSnapshot] PersistentThreatBirthFixture912(isPresent) == PersistentThreatBirthForKindFixture912("Conditional",isPresent) PersistentThreatBirthValid912(f) == CreatePersistentOnRetire912(f.beforeRegistry,f.afterRegistry,f.beforeLedger,f.afterLedger,<<>>,<<>>,f.beforeSnapshot,f.afterSnapshot, f.inventory,f.trash,f.effectIds,{1,2,4},f.beforeAuthority,f.afterAuthority,PersistentThreatFacts912) PersistentThreatState912(f,r,l,w,a,stack) == [PersistentTraversalStateFixture912(f,r,l,w,a,stack) EXCEPT !.s.points=w.points] PersistentThreatPointFixture912(b,id,amount) == LET points == [b.w.points EXCEPT !["SideB"]=amount] first == [b.s EXCEPT !.id=id,!.points=points] lost == ConditionalActivityLosses96(b.s,first) epochs == [key \in DOMAIN b.l.activationEpoch |-> b.l.activationEpoch[key]+IF key \in lost THEN 1 ELSE 0] observed == [b.l EXCEPT !.activationEpoch=epochs,!.activationSerial=@+IF lost={} THEN 0 ELSE 1] candidateSnapshot == [first EXCEPT !.activationEpoch=epochs,!.activationSerial=observed.activationSerial] ledger == ConditionalActivityLedger96(observed,b.f.definitions,candidateSnapshot) stack == [i \in 1..Len(b.stack) |-> LET gone == {j \in b.stack[i].pending \cap DOMAIN b.l.instances : ledger.instances[j].status#"Pending"} IN [b.stack[i] EXCEPT !.pending=@ \ gone,!.lostPending=@ \cup gone]] base == [b.w EXCEPT !.id=id,!.points=points,!.activity.instances=PersistentInstanceRows912(@,ledger)] world == PersistentWorld912(base,b.r) execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> id,snapshotId |-> id,source |-> RuleAbilitySource9("SyntheticCurrentPointEvaluation912")] authority == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,world,execution)) registry == [b.r EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] snapshot == LingeringConditionalSnapshot910([candidateSnapshot EXCEPT !.activity=world.activity,!.present=world.present],registry,b.l,world) after == PersistentThreatState912(b.f,registry,ledger,world,authority,stack) IN [b |-> b,base |-> base,execution |-> execution,inputSnapshot |-> snapshot,after |-> after] PersistentThreatPointValid912(p) == ObservePersistentKernel912(p.b.r,p.after.r,p.b.l,p.after.l,p.b.stack,p.after.stack,p.b.s,p.inputSnapshot, p.base,p.execution,p.b.a,p.after.a) PersistentThreatTraversalFixture912 == LET f == PersistentThreatBirthFixture912(TRUE) initial == PersistentThreatState912(f,f.afterRegistry,f.afterLedger,f.afterWorld,f.afterAuthority,<<>>) raised == PersistentThreatPointFixture912(initial,20,5) active == [f EXCEPT !.afterRegistry=raised.after.r,!.afterLedger=raised.after.l,!.afterWorld=raised.after.w, !.afterAuthority=raised.after.a,!.afterSnapshot=raised.after.s] traversal == PersistentTraversalEndFixture912(active,TRUE) IN [f |-> f,initial |-> initial,raised |-> raised,active |-> active,g |-> traversal] PersistentThreatTraversalValid912(h) == LET g == h.g IN /\ PersistentThreatBirthValid912(h.f) /\ PersistentThreatPointValid912(h.raised) /\ PersistentTraversalMoveValid912(g.initial,g.before,g.beforeBase,g.beforeExecution) /\ CompleteTraversal6(g.preEnd,g.ended,TRUE,g.events6,{2}) /\ PersistentTraversalMoveValid912(g.before,g.end,g.endBase,g.endExecution) /\ ProcessPersistentCheckpoint912(g.end.r,g.end.l,g.after.l,<<>>,<<>>,g.f.definitions,g.f.lexemes,g.cp,g.conditions,g.allocation,g.bindings, Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> g.cp.id,caller |-> g.cp.caller,traversalId |-> 2],{}, PersistentThreatFacts912,g.end.w,g.end.a) /\ CutoffPersistentAtTraversalEnd912(g.end.r,g.after.r,g.after.l,g.cp,g.preEnd,g.ended,g.events6,{2},g.boundary) PersistentThreatPendingFixture912 == LET h == PersistentThreatTraversalFixture912 b == h.g.after members == ConditionalWindowMembers96(b.l.instances,19520) site == TraversalPrioritySite9(b.w.turn,h.g.ended.traversal,ApproachFixture92,LayoutFixture92,h.g.ended) open == WindowFixture92(19520,"Reaction",site,members,1952,NoTimingRef9) opened == [b EXCEPT !.stack= <>] dropped == PersistentThreatPointFixture912(opened,21,0) restored == PersistentThreatPointFixture912(dropped.after,22,5) IN [h |-> h,open |-> open,opened |-> opened,dropped |-> dropped,restored |-> restored] PersistentPresentInactiveThreatBirthChecks912 == LET f == PersistentThreatBirthFixture912(TRUE) IN /\ ConditionalDefinitionValid96(f.d) /\ PersistentThreatBirthValid912(f) /\ 19000 \in f.beforeWorld.present /\ PersistentBirthCohort912(f.inventory,f.beforeWorld)={f.key} /\ ~PersistentSourceActive912(f.d,f.beforeWorld) /\ ~PersistentSourceActive912(f.d,f.afterWorld) /\ ~ConditionalActive96(f.d,f.beforeSnapshot) /\ ~ConditionalActive96(f.d,f.afterSnapshot) /\ f.afterRegistry.persistent[f.key].phase="Persisting" /\ f.afterRegistry.effects[55000].status="Active" /\ 19000 \in f.afterWorld.activity.persistentAbilities /\ 19000 \in f.afterWorld.present /\ f.afterLedger.activationEpoch=f.beforeLedger.activationEpoch /\ f.afterLedger.activationSerial=0 /\ f.afterRegistry.persistent[f.key].definition=f.d /\ f.afterRegistry.persistent[f.key].definition.syntax.source=ObjectAbilitySource9(1) PersistentLostThreatAbilityChecks912 == LET f == PersistentThreatBirthFixture912(FALSE) IN /\ PersistentRetireBound912(f.trash,f.inventory,f.beforeWorld,f.afterObjects,{1,2,4},PersistentThreatFacts912) /\ 19000 \notin f.beforeWorld.present /\ PersistentBirthCohort912(f.inventory,f.beforeWorld)={} /\ ~PersistentThreatBirthValid912(f) PersistentThreatActivationRecognitionChecks912 == LET h == PersistentThreatTraversalFixture912 IN /\ PersistentThreatTraversalValid912(h) /\ PersistentSourceActive912(h.f.d,h.raised.after.w) /\ ConditionalActive96(h.f.d,h.raised.after.s) /\ h.raised.after.l.activationEpoch[h.f.key]=0 /\ DOMAIN h.g.after.l.instances={19510} /\ h.g.after.l.instances[19510].status="Pending" /\ h.g.after.l.instances[19510].member.source=ObjectAbilitySource9(1) /\ h.g.after.l.instances[19510].definitionCopy=h.f.d /\ ~h.g.after.r.persistent[h.f.key].creationOpen PersistentThreatDeactivationEpochChecks912 == LET p == PersistentThreatPendingFixture912 IN /\ PersistentThreatTraversalValid912(p.h) /\ OpenConditionalReaction96(<<>>,<>,p.opened.l,19520,p.open.site, OpeningFixture92(19520,"Reaction",p.open.site,p.open.members,1952,NoTimingRef9),{}) /\ PersistentThreatPointValid912(p.dropped) /\ PersistentThreatPointValid912(p.restored) /\ ~ConditionalActive96(p.h.f.d,p.dropped.after.s) /\ ConditionalActive96(p.h.f.d,p.restored.after.s) /\ p.dropped.after.l.activationEpoch[p.h.f.key]=1 /\ p.dropped.after.l.activationSerial=1 /\ p.restored.after.l.activationEpoch=p.dropped.after.l.activationEpoch /\ p.restored.after.l.activationSerial=1 /\ p.dropped.after.l.instances[19510].status="Lost" /\ p.restored.after.l.instances[19510].status="Lost" /\ WindowTop9(p.dropped.after.stack).pending={} /\ WindowTop9(p.dropped.after.stack).lostPending={19510} /\ p.restored.after.r.effects[55000].status="Active" /\ p.restored.after.r.persistent[p.h.f.key].phase="Persisting" /\ p.restored.after.r.persistent[p.h.f.key].endWindow=19520 /\ ~PersistentGenerationAllowed912(p.restored.after.r,p.h.f.d,2) PersistentThreatPointWithLedger912(p,ledger) == LET b == p.b stack == [i \in 1..Len(b.stack) |-> LET gone == {j \in b.stack[i].pending \cap DOMAIN b.l.instances : ledger.instances[j].status#"Pending"} IN [b.stack[i] EXCEPT !.pending=@ \ gone,!.lostPending=@ \cup gone]] base == [p.base EXCEPT !.activity.instances=PersistentInstanceRows912(b.w.activity.instances,ledger)] world == PersistentWorld912(base,b.r) authority == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,world,p.execution)) registry == [b.r EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] raw == [p.inputSnapshot EXCEPT !.activity=world.activity,!.present=world.present, !.activationEpoch=ledger.activationEpoch,!.activationSerial=ledger.activationSerial] snapshot == LingeringConditionalSnapshot910(raw,registry,b.l,world) after == PersistentThreatState912(b.f,registry,ledger,world,authority,stack) IN [p EXCEPT !.base=base,!.inputSnapshot=snapshot,!.after=after] PersistentThreatWrongPublicationChecks912 == LET p == PersistentThreatPendingFixture912 noEpochLedger == [p.dropped.after.l EXCEPT !.activationEpoch=p.dropped.b.l.activationEpoch,!.activationSerial=p.dropped.b.l.activationSerial] noEpoch == PersistentThreatPointWithLedger912(p.dropped,noEpochLedger) revivedLedger == [p.restored.after.l EXCEPT !.instances[19510].status="Pending"] revived == PersistentThreatPointWithLedger912(p.restored,revivedLedger) IN /\ PersistentThreatTraversalValid912(p.h) /\ PersistentThreatPointValid912(p.dropped) /\ PersistentThreatPointValid912(p.restored) /\ LifetimeAuthorityValid910(noEpoch.after.a) /\ PersistentRegistryWorldBound912(noEpoch.after.r,noEpoch.after.w) /\ LifetimeAuthorityValid910(revived.after.a) /\ PersistentRegistryWorldBound912(revived.after.r,revived.after.w) /\ ~PersistentThreatPointValid912(noEpoch) /\ ~PersistentThreatPointValid912(revived) PersistentThreatPaidReserveFixture912 == LET f == PersistentThreatBirthForKindFixture912("Paid",TRUE) b == PersistentThreatState912(f,f.afterRegistry,f.afterLedger,f.afterWorld,f.afterAuthority,<<>>) encounter0 == OpenEncounter6(19810,4,2,TRUE,"SyntheticForcedEncounterBoundary",<<19811,19812>>) encounter1 == [encounter0 EXCEPT !.stage="BeginReactions"] encounter == WithFullySuppressInstruction6([encounter1 EXCEPT !.stage="Paid",!.paidReached=TRUE]) site == EncounterPaidSite95(b.w.turn,encounter,b.w.control) sideBReady == ReadyFixture92(WindowFixture92(19820,"Paid",site,Empty9,0,NoTimingRef9)) passed == PassPriorityFrame9(sideBReady) ready == ReadyFixture92(passed) c == [PaidContextFixture95(f.d,b.w.objects,b.w.turn) EXCEPT !.traversal=b.w.control.traversal,!.traversalControl=b.w.control, !.encounter=encounter,!.present=b.w.present,!.activity=b.w.activity,!.points=b.w.points,!.defaultActive=FALSE] option == PaidOptionFixture95(f.d,ready) legality == LegalityFixture92(ready,option) p == OpenPaidProcedure95(19830,f.d,option,ready,legality.transactionId,"Play") after == <> IN [f |-> f,b |-> b,encounter0 |-> encounter0,encounter1 |-> encounter1,encounter |-> encounter,ready |-> ready,c |-> c, option |-> option,legality |-> legality,p |-> p,after |-> after] PersistentThreatPaidReserve912(q,lex,c) == ReservePersistentPaid912(q.b.r,<>,q.after,q.p,19830,q.f.d,lex,c,q.option,q.legality,{},PersistentThreatFacts912,q.b.l,q.b.a) PersistentPaidThreatAuthorityChecks912 == LET q == PersistentThreatPaidReserveFixture912 lex == q.f.inventory.lexemes[q.f.key] forged == [q.c EXCEPT !.points["SideB"]=5] raised == PersistentThreatPointFixture912(q.b,23,5) active == [q EXCEPT !.b=raised.after,!.c.points=raised.after.w.points,!.c.present=raised.after.w.present,!.c.activity=raised.after.w.activity] IN /\ PersistentThreatBirthValid912(q.f) /\ BeginEncounter6(q.encounter0,q.encounter1,TRUE,{[tag |-> "EncounterBarrier",encounterId |-> 19810,barrierCard |-> 4,traversalId |-> 2]}) /\ BeginEncounterPaid6(q.encounter1,q.encounter,TRUE,{}) /\ ~PaidEligibility99(q.f.d,lex,q.c,q.ready,PersistentThreatFacts912) /\ PaidEligibility99(q.f.d,lex,forged,q.ready,PersistentThreatFacts912) /\ ~PersistentThreatPaidReserve912(q,lex,q.c) /\ ~PersistentThreatPaidReserve912(q,lex,forged) /\ PersistentThreatPointValid912(raised) /\ PaidEligibility99(q.f.d,lex,active.c,active.ready,PersistentThreatFacts912) /\ PersistentThreatPaidReserve912(active,lex,active.c) PersistentLowerPaidFrozenViewChecks912 == LET q == PersistentGateOrdinaryReserveFixture912(FALSE) original == q.f.inventory.lexemes[q.f.key] lex == [original EXCEPT !.mentions[1].role="OtherOwnText"] points == [q.c EXCEPT !.points["SideB"]=42] presence == [q.c EXCEPT !.present=@ \cup {99999}] activity == [q.c EXCEPT !.activity.activeRules=@ \cup {"ForgedUnrelatedRule"}] IN /\ PersistentGateOrdinaryBirthValid912(q.f) /\ PersistentGateOrdinaryReserveValid912(q) /\ AbilityLexemesValid99(q.f.d,lex,q.c.objects,PersistentGateOrdinaryFacts912) /\ PaidEligibility99(q.f.d,lex,q.c,q.ready,PersistentGateOrdinaryFacts912) /\ PaidEligibility99(q.f.d,original,points,q.ready,PersistentGateOrdinaryFacts912) /\ PaidEligibility99(q.f.d,original,activity,q.ready,PersistentGateOrdinaryFacts912) /\ PaidEligibility99(q.f.d,original,presence,q.ready,PersistentGateOrdinaryFacts912) /\ ~ReservePersistentPaid912(q.b.r,<>,q.afterStack,q.p,19730,q.f.d,lex,q.c,q.option,q.legality,{},PersistentGateOrdinaryFacts912,q.b.l,q.b.a) /\ ~ReservePersistentPaid912(q.b.r,<>,q.afterStack,q.p,19730,q.f.d,original,points,q.option,q.legality,{},PersistentGateOrdinaryFacts912,q.b.l,q.b.a) /\ ~ReservePersistentPaid912(q.b.r,<>,q.afterStack,q.p,19730,q.f.d,original,activity,q.option,q.legality,{},PersistentGateOrdinaryFacts912,q.b.l,q.b.a) /\ ~ReservePersistentPaid912(q.b.r,<>,q.afterStack,q.p,19730,q.f.d,original,presence,q.option,q.legality,{},PersistentGateOrdinaryFacts912,q.b.l,q.b.a) PersistentRetentionLossFixture912 == LET g == PersistentTraversalEndFixture912(PersistentBirthFixture912(TRUE),TRUE) b == g.after definitions == [key \in DOMAIN b.s.definitions \ {g.f.key} |-> b.s.definitions[key]] epochs == [b.l.activationEpoch EXCEPT ![g.f.key]=@+1] first == [b.s EXCEPT !.id=5,!.definitions=definitions,!.activationEpoch=epochs,!.activationSerial=@+1, !.ordinaryActivity=[key \in DOMAIN definitions |-> @ [key]]] observed == [b.l EXCEPT !.activationEpoch=epochs,!.activationSerial=@+1] ledger == ConditionalActivityLedger96(observed,definitions,first) baseWorld == [b.w EXCEPT !.id=5,!.activity.instances=PersistentInstanceRows912(@,ledger)] world == PersistentWorld912(baseWorld,b.r) execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 19800,snapshotId |-> 5, source |-> RuleAbilitySource9("SyntheticDefinitionProjectionBoundary912")] authority == LifetimeAuthorityAfter910(b.a,LifetimeKernelTransition910(b.w,world,execution)) registry == [b.r EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] snapshot == LingeringConditionalSnapshot910(first,registry,b.l,world) IN [g |-> g,b |-> b,definitions |-> definitions,epochs |-> epochs,first |-> first,observed |-> observed,ledger |-> ledger, baseWorld |-> baseWorld,world |-> world,execution |-> execution,authority |-> authority,registry |-> registry,snapshot |-> snapshot] PersistentRetentionLossAdmitted912(q) == ObservePersistentKernel912(q.b.r,q.registry,q.b.l,q.ledger,<<>>,<<>>,q.b.s,q.snapshot,q.baseWorld,q.execution,q.b.a,q.authority) PersistentRetentionKernelDefinitionsChecks912 == LET q == PersistentRetentionLossFixture912 positiveBase == [q.b.w EXCEPT !.id=5] positive == PersistentTraversalMoveFixture912(q.b,positiveBase,q.execution) IN /\ PersistentTraversalEndValid912(q.g) /\ q.b.l.instances[19510].status="Pending" /\ q.ledger.instances[19510].status="Lost" /\ 19000 \in q.world.present /\ PersistentRegistryWorldBound912(q.registry,q.world) /\ q.registry.persistent[q.g.f.key].phase="Persisting" /\ q.registry.effects[55000].status="Active" /\ ObserveConditionalActivity96(q.b.l,q.b.l,q.ledger,<<>>,<<>>,q.b.s,q.snapshot) /\ PersistentTraversalMoveValid912(q.b,positive,positiveBase,q.execution) /\ positive.l.instances[19510].status="Pending" /\ ~PersistentRetentionLossAdmitted912(q) PersistentRetentionCheckpointLossFixture912 == LET g == PersistentTraversalEndFixture912(PersistentBirthFixture912(TRUE),TRUE) b == g.after definitions == [key \in DOMAIN b.s.definitions \ {g.f.key} |-> b.s.definitions[key]] lexemes == [key \in DOMAIN definitions |-> g.f.lexemes[key]] snapshot == [b.s EXCEPT !.definitions=definitions,!.ordinaryActivity=[key \in DOMAIN definitions |-> @[key]]] id == b.l.lastCheckpoint+1 cp == ConditionalCheckpointFixture96(b.l,id,[snapshot EXCEPT !.checkpointId=id,!.point="CheckpointBeginning"], [snapshot EXCEPT !.checkpointId=id,!.point="ProcedureCodee605a78f5d5e"],Empty9) ledger == ConditionalCommittedFixture96(b.l,definitions,cp,Empty9,Empty9,Empty9) scope == [tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> cp.id,caller |-> cp.caller,traversalId |-> 2] IN [g |-> g,b |-> b,definitions |-> definitions,lexemes |-> lexemes,snapshot |-> snapshot,cp |-> cp,ledger |-> ledger,scope |-> scope] PersistentRetentionCheckpointLossAdmitted912(q) == ProcessPersistentCheckpoint912(q.b.r,q.b.l,q.ledger,<<>>,<<>>,q.definitions,q.lexemes,q.cp,Empty9,Empty9,Empty9,Empty9,Empty9, q.scope,{},CardFacts9,q.b.w,q.b.a) PersistentRetentionCheckpointDefinitionsChecks912 == LET q == PersistentRetentionCheckpointLossFixture912 IN /\ PersistentTraversalEndValid912(q.g) /\ q.ledger.instances[19510].status="Lost" /\ ConditionalSnapshotBound96(q.cp.processingSnapshot,q.b.l) /\ ConditionalLexemesBound99(q.definitions,q.lexemes,q.cp.processingSnapshot,CardFacts9) /\ ConditionalDefinitionsStable96(q.b.l.lastSnapshot,q.cp.processingSnapshot) /\ q.b.r.effects[55000].status="Active" /\ ConditionalActive96(q.g.f.d,q.b.s) /\ ~PersistentRetentionCheckpointLossAdmitted912(q) PersistentRetentionOmitWorldFixture912(kind) == LET f == PersistentGateOpeningFixture912(kind,"Birth") key == f.s.f.key conditional == IF kind="Conditional" THEN [f.world.conditional EXCEPT !.definitions=[k \in DOMAIN @ \ {key} |-> @[k]],!.ordinaryActivity=[k \in DOMAIN @ \ {key} |-> @[k]]] ELSE f.world.conditional paid == IF kind="Paid" THEN [k \in DOMAIN f.world.paidDefinitions \ {key} |-> f.world.paidDefinitions[k]] ELSE f.world.paidDefinitions world == [f.world EXCEPT !.conditional=conditional,!.paidDefinitions=paid, !.paidContexts=[k \in DOMAIN paid |-> @[k]],!.lexemes=[k \in DOMAIN @ \ {key} |-> @[k]], !.capabilities=[k \in DOMAIN @ \ {key} |-> @[k]]] IN [f |-> f,world |-> world] PersistentRetentionOmitWorldAdmitted912(q) == PersistentInterruptWorld912(q.f.s.b.r,q.world,q.f.s.b.l,q.f.s.b.a) PersistentRetentionWorldDefinitionsChecks912 == \A kind \in {"Paid","Conditional"} : LET q == PersistentRetentionOmitWorldFixture912(kind) IN /\ PersistentGateOpeningValid912(q.f) /\ PersistentInterruptWorld912(q.f.s.b.r,q.f.world,q.f.s.b.l,q.f.s.b.a) /\ CurrentInterruptWorld99(q.world,q.f.s.b.l,PersistentGateFacts912) /\ q.f.s.f.d=q.f.s.b.r.persistent[q.f.s.f.key].definition /\ 19000 \in q.world.conditional.present /\ ~PersistentRetentionOmitWorldAdmitted912(q) PersistentRetentionCheckpointLexFixture912 == LET g == PersistentTraversalEndFixture912(PersistentBirthFixture912(TRUE),TRUE) lex == [g.f.lexemes[g.f.key] EXCEPT !.mentions[1].role="OtherOwnText"] lexemes == [g.f.lexemes EXCEPT ![g.f.key]=lex] IN [g |-> g,lex |-> lex,lexemes |-> lexemes] PersistentRetentionCheckpointLexAdmitted912(q) == ProcessPersistentCheckpoint912(q.g.end.r,q.g.end.l,q.g.after.l,<<>>,<<>>,q.g.f.definitions,q.lexemes,q.g.cp,q.g.conditions, q.g.allocation,q.g.bindings,Empty9,Empty9,[tag |-> "PersistentCheckpointTraversalScope",checkpointId |-> q.g.cp.id,caller |-> q.g.cp.caller,traversalId |-> 2], {},CardFacts9,q.g.end.w,q.g.end.a) PersistentRetentionCheckpointLexemesChecks912 == LET q == PersistentRetentionCheckpointLexFixture912 IN /\ PersistentTraversalEndValid912(q.g) /\ q.lex.definition=q.g.f.d /\ q.lex.source=q.g.f.d.syntax.source /\ q.lex.sourceSHA=q.g.f.lexemes[q.g.f.key].sourceSHA /\ q.lex.origin=q.g.f.lexemes[q.g.f.key].origin /\ AbilityLexemesValid99(q.g.f.d,q.lex,q.g.end.w.objects,CardFacts9) /\ ConditionalLexemesBound99(q.g.f.definitions,q.lexemes,q.g.cp.processingSnapshot,CardFacts9) /\ ~PersistentRetentionCheckpointLexAdmitted912(q) PersistentRetentionWorldLexFixture912(kind) == LET f == PersistentGateOpeningFixture912(kind,"Birth") key == f.s.f.key lex == IF kind="Paid" THEN [f.world.lexemes[key] EXCEPT !.mentions[1].role="OtherOwnText"] ELSE [f.world.lexemes[key] EXCEPT !.mentions=ReplacementOverlay99(@,[id \in {2} |-> LexicalMentionFixture99(f.s.f.d,"would",3,"OtherOwnText")])] world == [f.world EXCEPT !.lexemes[key]=lex,!.capabilities[key]=PersistentGateCapabilities912(f.s.f.d,lex,f.world.turn.id)] IN [f |-> f,lex |-> lex,world |-> world] PersistentRetentionWorldLexAdmitted912(q) == PersistentInterruptWorld912(q.f.s.b.r,q.world,q.f.s.b.l,q.f.s.b.a) PersistentRetentionWorldLexemesChecks912 == \A kind \in {"Paid","Conditional"} : LET q == PersistentRetentionWorldLexFixture912(kind) IN /\ PersistentGateOpeningValid912(q.f) /\ q.lex.definition=q.f.s.f.d /\ q.lex.source=q.f.s.f.d.syntax.source /\ q.lex.sourceSHA=q.f.world.lexemes[q.f.s.f.key].sourceSHA /\ q.lex.origin=q.f.world.lexemes[q.f.s.f.key].origin /\ AbilityLexemesValid99(q.f.s.f.d,q.lex,q.world.objects,PersistentGateFacts912) /\ CurrentInterruptWorld99(q.world,q.f.s.b.l,PersistentGateFacts912) /\ ~PersistentRetentionWorldLexAdmitted912(q) PersistentRetentionFrozenLexemeOriginChecks912 == LET f == PersistentBirthFixture912(TRUE) key == f.key lex == [f.afterRegistry.persistent[key].lexemes EXCEPT !.mentions[1].role="OtherOwnText"] wrongRow == [f.afterRegistry EXCEPT !.persistent[key].lexemes=lex] wrongSpecimen0139 == [f.afterWorld EXCEPT !.statedDurations[55000].persistence.lexemes=lex] IN /\ PersistentBirthValid912(f) /\ PersistentRegistryWorldBound912(f.afterRegistry,f.afterWorld) /\ f.afterRegistry.effects[55000].persistence.lexemes=f.inventory.lexemes[key] /\ f.afterWorld.statedDurations[55000].persistence.lexemes=f.inventory.lexemes[key] /\ ~PersistentRegistryBound912(wrongRow) /\ ~PersistentRegistryWorldBound912(f.afterRegistry,wrongSpecimen0139) OccurrenceSchemaText912 == "SyntheticText640e46b6a9db" OccurrenceSchemaCard912 == "structural_occurrence_schema_912" OccurrenceSchemaSHA912 == "e6b2b62e60d0bc6ff3304c742e95b03dc829bca915e3ad8a5c06b4d52a612722" OccurrenceFacts912 == ReplacementOverlay99(CardFacts9,[card \in {OccurrenceSchemaCard912} |-> [kind |-> "Objective",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> OccurrenceSchemaSHA912]]) OccurrenceObjects912 == [RootBranchObjects911 EXCEPT ![1].card=OccurrenceSchemaCard912] OccurrenceSourceTechnique912 == LET p == ConditionalGraphTechniqueFixture911 lex == LexicalReceiptFixture99(p.definition,OccurrenceSchemaCard912,Empty9,OccurrenceFacts912) IN [p EXCEPT !.card=OccurrenceSchemaCard912,!.sourceSHA=OccurrenceSchemaSHA912,!.lexemes=lex,!.nodes[11901].options=[i \in 1..2 |-> IF i=1 THEN 11902 ELSE 11903], !.units[1].optionInstructions=[i \in 1..2 |-> IF i=1 THEN <<11902>> ELSE <<11903,11904>>]] OccurrenceBaseWorld912 == [RootBranchWorld911 EXCEPT !.objects=OccurrenceObjects912,!.cardFacts=OccurrenceFacts912] OccurrenceSpecificationFixture912(p) == [tag |-> "OccurrenceTechniqueSpecification",definition |-> p.definition,source |-> p.source,sourceSHA |-> p.sourceSHA,card |-> p.card, repeat |-> [kind |-> "NoValue",node |-> 0],modal |-> [s \in {11901} |-> [selector |-> 11901,quotaPolicy |-> "Fixed",maximum |-> 2,upTo |-> FALSE,allowRepeat |-> FALSE,chooser |-> "SideB", bodies |-> [i \in 1..2 |-> IF i=1 THEN <<11902>> ELSE <<11903,11904>>],join |-> 0]]] OccurrenceFirstEffectsFixture912(r,option,world) == LET f == RootBranchStepFixture911(r,1,world) effects == [f.context.actualEffects EXCEPT ![1].kind=IF "repeatTemplate" \in DOMAIN r.technique THEN "InstructionChoice" ELSE "ModalChoice"] IN [f EXCEPT !.context.actualEffects=ReplacementOverlay99(effects,[id \in {1} |-> ReplacementOverlay99(effects[1], [options |-> {1,2},maximum |-> 2,upTo |-> FALSE,requested |-> FALSE]) ])] OccurrenceSelectionForTechniqueFixture912(technique,baseWorld) == LET d == technique.definition key == ConditionalKey96(d) definitions == [k \in {key} |-> d] objects == baseWorld.objects initial == ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",definitions,objects) seed == NewConditionalLedger96(initial) event == ConditionalEventFixture96(12101,"StructuralEvent",0,"SideB","SideB",initial,12099) events == [id \in {12101} |-> event] begin == ConditionalSnapshotFixture96(10,1,"CheckpointBeginning",definitions,objects) current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] cp1 == ConditionalCheckpointFixture96(seed,1,begin,current,events) recognition == [definition |-> key,occurrence |-> 12101] allocation == [k \in {recognition} |-> 12110] bindings == ConditionalBindingsFixture96({recognition},1,12120,121) pending == ConditionalCommittedFixture96(seed,definitions,cp1,allocation,bindings,Empty9) site == TurnSiteFixture92("SideB","ProcedureCode989abc27e0c6",2) members == ConditionalWindowMembers96(pending.instances,12120) open == WindowFixture92(12120,"Reaction",site,members,121,NoTimingRef9) cp2 == SearchCheckpointFixture911(pending,2,objects,ConditionalPriorityCaller96(open),Empty9) sideBReady == [open EXCEPT !.stage="Ready",!.checkpoint=2] sideAWindow == PassPriorityFrame9(sideBReady) cp3 == SearchCheckpointFixture911(cp2.after,3,objects,ConditionalPriorityCaller96(sideAWindow),Empty9) ready == [sideAWindow EXCEPT !.stage="Ready",!.checkpoint=3] option == ConditionalOptionFixture92(ready,12110) legality == LegalityFixture92(ready,option) busy == StartedFixture92(ready,option) before == OpenConditionalRuntime911(12110,technique,ready,option,legality.transactionId,"SideAObjectiveCompletion") plan == OpenInstruction93(11901,"Ability",12110,technique.source,"SideAObjectiveCompletion",1,"NoValue",technique.nodes[11901].steps,FALSE) targets == [InstructionTargetsFixture93(plan) EXCEPT !.targets={}] imminentPlan == [plan EXCEPT !.phase="Imminent",!.announced=TRUE] imminent == [before EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [cp3.after EXCEPT !.instances[12110].status="Imminent"] restrictions == [tag |-> "AbilityRestrictions",ability |-> d.syntax.id,source |-> d.syntax.source,results |-> Empty9] receipt == ReplacementOverlay99(InstructionEntryFixture93(plan),[checkpointId |-> 3]) entry == [tag |-> "ActualGraphInstructionEntry",id |-> 12150,snapshotId |-> 31,kind |-> "ConditionalFirst", beforeLedger |-> cp3.after,afterLedger |-> selected,stackBefore |-> <>,stackAfter |-> <>, before |-> before,after |-> imminent,snapshot |-> SnapshotWithConditionalRegistry96(cp3.current,cp3.after),option |-> option, legality |-> legality,currentEffect |-> Empty9,beforePlan |-> plan,afterPlan |-> imminentPlan,targets |-> targets, receipt |-> receipt,turnUses |-> Empty9,restrictions |-> restrictions, owner |-> [windowId |-> 12120,option |-> option,transaction |-> legality.transactionId]] lifeWorld == [baseWorld EXCEPT !.id=31,!.turn=TurnFixture92("SideB"), !.activity.instances=[id \in {12110} |-> [ability |-> d.syntax.id,sourceObject |-> 1,status |-> "Imminent",owner |-> RuntimeLookOwner911(imminent)]]] authority == NewLifetimeAuthority910(lifeWorld) registry == ReplacementOverlay99(NewPersistentRegistry912(NewLingeringRegistry910),[frontier |-> LifetimeFrontier910(authority,1)]) IN [technique |-> technique,d |-> d,key |-> key,definitions |-> definitions,objects |-> objects,initial |-> initial,seed |-> seed, events |-> events,cp1 |-> cp1,allocation |-> allocation,bindings |-> bindings,pending |-> pending, site |-> site,members |-> members,open |-> open,cp2 |-> cp2,sideBReady |-> sideBReady,sideAWindow |-> sideAWindow, cp3 |-> cp3,ready |-> ready,option |-> option,legality |-> legality,busy |-> busy,before |-> before, plan |-> plan,targets |-> targets,imminentPlan |-> imminentPlan,imminent |-> imminent,selected |-> selected, restrictions |-> restrictions,receipt |-> receipt,entry |-> entry,entrySnapshot |-> cp3.current,lifeWorld |-> lifeWorld,authority |-> authority,registry |-> registry] OccurrenceSelectionFixture912 == OccurrenceSelectionForTechniqueFixture912(OccurrenceSourceTechnique912,OccurrenceBaseWorld912) OccurrenceSelectionValid912(s) == /\ CompiledInstructionTechnique911(s.technique,s.objects,s.lifeWorld.cardFacts) /\ ProcessConditionalCheckpoint96(s.seed,s.pending,<<>>,<<>>,s.definitions,s.cp1,ConditionalConditionsFixture96(s.definitions,s.events), s.allocation,s.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,s.pending,12120,s.site,OpeningFixture92(12120,"Reaction",s.site,s.members,121,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.cp2.after,<>,<>,s.definitions,s.cp2.checkpoint, ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12120}) /\ CheckpointPriorityWithConditionals96(s.cp2.after,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ PassConditionalPriorityCore96(s.cp2.after,s.cp2.after,<>,<>,"SideB",Empty9) /\ ProcessConditionalCheckpoint96(s.cp2.after,s.cp3.after,<>,<>,s.definitions,s.cp3.checkpoint, ConditionalConditionsFixture96(s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12120}) /\ CheckpointPriorityWithConditionals96(s.cp3.after,<>,<>,[CheckpointFixture92(s.sideAWindow) EXCEPT !.id=3]) /\ OpenChapterRegistry912(s.authority,s.registry) /\ BeginConditionalRuntime911(s.cp3.after,s.selected,<>,<>,s.before,s.imminent,s.entry.snapshot,s.option,s.legality,Empty9, s.plan,s.imminentPlan,s.targets,s.receipt,Empty9,s.restrictions,s.registry,s.authority,s.lifeWorld.cardFacts) OccurrenceFirstContextFromEntryFixture912(s,contextId,observationId,openingId,groupId,atomicWorldId,beforeExpectedRegistry,beforeHistory) == LET origin == [kind |-> "Instruction",plan |-> s.imminentPlan,parent |-> s.imminent.ability,ruleStep |-> "NoValue"] atomicR == [s.imminent EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] effectFixture == OccurrenceFirstEffectsFixture912(atomicR,"A",s.lifeWorld) effects == effectFixture.context.actualEffects capabilities == [tag |-> "NormalizedInterruptCapabilities",definition |-> s.d,origin |-> s.technique.lexemes.origin,clauses |-> Empty9] world == [tag |-> "CurrentInterruptWorld",id |-> s.lifeWorld.id,turn |-> s.lifeWorld.turn,traversalControl |-> s.lifeWorld.control, objects |-> s.objects,controllers |-> [id \in DOMAIN s.objects |-> s.objects[id].side],activePeriods |-> Empty9, conditional |-> SnapshotWithConditionalRegistry96(s.entrySnapshot,s.selected),paidDefinitions |-> Empty9, lexemes |-> [k \in {s.key} |-> s.technique.lexemes],capabilities |-> [k \in {s.key} |-> capabilities], paidContexts |-> Empty9,turnUses |-> Empty9,replacementDefinitions |-> Empty9,liveReplacementIds |-> {}, entries |-> [id \in {s.entry.id} |-> s.entry]] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> s.technique.source, snapshotId |-> s.lifeWorld.id,effects |-> effects,order |-> <<1>>] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> s.lifeWorld.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(contextId,s.entry.id,origin,world,description,effects,s.entry.owner) expectedRegistry == [beforeExpectedRegistry EXCEPT !.contexts=ReplacementOverlay99(@,[id \in {contextId} |-> context]), !.entryIds=@ \cup {s.entry.id},!.usedContextIds=@ \cup {contextId}] observation == InitialWouldObservation99(context,observationId) history == InitialCaptureAfterFixture99(beforeHistory,context,observation) observed == [s.selected EXCEPT !.instances[12110].expected=ReplacementOverlay99(@,[i \in {s.imminentPlan.index} |-> [instruction |-> context.initialRef,effects |-> ExpectedObservationSet99(effects)]])] prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=openingId,!.group=groupId] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] atomicOrigin == [origin EXCEPT !.plan=atomicPlan,!.parent=atomicR.ability] atomicContext == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] atomicLedger == [observed EXCEPT !.instances[12110].status="Resolving"] atomicWorld == [s.lifeWorld EXCEPT !.id=atomicWorldId,!.activity.instances[12110].status="Resolving",!.activity.instances[12110].owner=RuntimeLookOwner911(atomicR)] atomicExecution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> contextId,snapshotId |-> atomicWorldId,source |-> s.technique.source] atomicAuthority == LifetimeAuthorityAfter910(s.authority,LifetimeKernelTransition910(s.lifeWorld,atomicWorld,atomicExecution)) atomicRegistry == [s.registry EXCEPT !.frontier=LifetimeFrontier910(atomicAuthority,Len(atomicAuthority.order))] atomicSnapshot == SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(atomicWorldId,s.entrySnapshot.checkpointId,"AfterAtomicEntry",s.definitions,s.objects),atomicLedger) currentContext == [atomicContext EXCEPT !.currentWorld=atomicWorldId] currentWorld == [world EXCEPT !.id=atomicWorldId,!.conditional=atomicSnapshot] IN [beforeExpectedRegistry |-> beforeExpectedRegistry,beforeHistory |-> beforeHistory,s |-> s,origin |-> origin,atomicR |-> atomicR,effects |-> effects,world |-> world,description |-> description,projection |-> projection, context |-> context,expectedRegistry |-> expectedRegistry,observation |-> observation,history |-> history, observed |-> observed,prepared |-> prepared,noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared, atomicPlan |-> atomicPlan,atomicOrigin |-> atomicOrigin,atomicContext |-> atomicContext,atomicLedger |-> atomicLedger, atomicWorld |-> atomicWorld,atomicExecution |-> atomicExecution,atomicAuthority |-> atomicAuthority,atomicRegistry |-> atomicRegistry, atomicSnapshot |-> atomicSnapshot,currentContext |-> currentContext,currentWorld |-> currentWorld] OccurrenceFirstContextFixture912 == OccurrenceFirstContextFromEntryFixture912(OccurrenceSelectionFixture912,12200,12201,12202,122,32,NewExpectedRegistry99,NewWouldAccounting99) OccurrenceFirstContextProtocolValid912(f) == LET s == f.s IN /\ BeginChapterExpected912(f.beforeExpectedRegistry,f.expectedRegistry,f.context.id,f.origin,f.world,s.entry,f.description,f.projection,f.effects, s.entry.owner,s.lifeWorld.cardFacts,f.beforeHistory,f.history,f.observation,s.selected,s.registry,s.authority) /\ ObserveConditionalRuntimeExpected911(s.selected,f.observed,s.imminent,s.imminentPlan,f.context,f.history) /\ ApplyAutomaticReplacements99(f.context,f.context,f.origin,f.origin,f.world,<>,<<>>,s.lifeWorld.cardFacts,f.history) /\ PreparePersistentOpening912(s.registry,f.context,f.prepared,f.observed,f.observed,f.origin,f.world,f.history,f.prepared.windowId,f.prepared.group,Empty9,{12120},s.lifeWorld.cardFacts,s.authority) /\ NoPersistentPrepared912(s.registry,f.prepared,f.noWindow,f.origin,f.world,f.history,f.observed,<>,s.site,s.lifeWorld.cardFacts,s.authority) /\ ClearPersistentInstruction912(s.registry,f.noWindow,f.cleared,f.origin,f.world,f.history,f.observed,<>,<>,"NoModifiers",f.clearance,s.lifeWorld.cardFacts,s.authority) /\ BeginConditionalRuntimeAtomic911(f.observed,f.atomicLedger,s.imminent,f.atomicR,s.imminentPlan,f.atomicPlan,f.cleared,f.origin, f.clearance,f.world,s.registry,s.authority,<>) /\ CommitLifetimeKernelCore910(s.authority,f.atomicAuthority,f.atomicWorld,f.atomicExecution) /\ PublishNextLifetime910(s.registry,f.atomicRegistry,f.atomicAuthority) /\ ObserveConditionalActivity96(f.observed,f.atomicLedger,f.atomicLedger,<>,<>,f.world.conditional,f.atomicSnapshot) /\ ObserveResolvingLifetimeContext910(f.atomicContext,f.currentContext,f.atomicRegistry,f.atomicAuthority,f.atomicOrigin) OccurrenceFirstContextValid912(f) == OccurrenceSelectionValid912(f.s) /\ OccurrenceFirstContextProtocolValid912(f) OccurrenceAdoptionFromContextFixture912(f,spec) == LET r == NewOccurrenceRuntime912(f.atomicR,spec) world == [f.atomicWorld EXCEPT !.id=33,!.activity.instances[r.id].owner=OccurrenceLookOwner912(r)] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> f.currentContext.id,snapshotId |-> 33,source |-> RuleAbilitySource9("ProcedureCode29f759d7ea55")] authority == LifetimeAuthorityAfter910(f.atomicAuthority,LifetimeKernelTransition910(f.atomicWorld,world,execution)) registry == [f.atomicRegistry EXCEPT !.frontier=LifetimeFrontier910(authority,Len(authority.order))] context == [f.currentContext EXCEPT !.currentWorld=33] snapshot == [f.atomicSnapshot EXCEPT !.id=33] currentWorld == [f.currentWorld EXCEPT !.id=33,!.conditional=snapshot] IN [f |-> f,r |-> r,world |-> world,execution |-> execution,authority |-> authority,registry |-> registry, context |-> context,snapshot |-> snapshot,currentWorld |-> currentWorld] OccurrenceAdoptionFixture912 == OccurrenceAdoptionFromContextFixture912(OccurrenceFirstContextFixture912,OccurrenceSpecificationFixture912(OccurrenceSourceTechnique912)) OccurrenceAdoptionValid912(a) == /\ OccurrenceFirstContextValid912(a.f) /\ PublishChapterOccurrenceAdoption912(a.f.atomicRegistry,a.registry,a.f.atomicAuthority,a.authority,a.f.atomicR,a.r, a.r.specification,a.f.currentContext,a.context,a.f.atomicOrigin,a.f.atomicLedger,a.f.currentWorld,a.f.s.lifeWorld.cardFacts) OccurrenceAdoptionChecks912 == LET a == OccurrenceAdoptionFixture912 IN /\ OccurrenceAdoptionValid912(a) /\ a.r.id=a.f.atomicR.id /\ a.r.ability=a.f.atomicR.ability /\ a.r.technique.definition=a.f.atomicR.technique.definition /\ a.context.initialRef=a.f.context.initialRef /\ a.context.initialEffects=a.f.context.initialEffects /\ a.r.metadata.windowId=a.f.atomicR.windowId /\ a.r.trace= <<>> /\ a.r.current=11901 OccurrenceEffectMapFixture912(r) == LET node == r.technique.nodes[r.pc] modal == r.pc \in DOMAIN r.specification.modal quota == IF ~modal THEN [maximum |-> 0,upTo |-> FALSE] ELSE IF r.specification.modal[r.pc].quotaPolicy="Committed" THEN OccurrenceCommittedQuota912(r,r.specification.modal[r.pc]) ELSE r.specification.modal[r.pc] IN [id \in {1} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id, IF modal THEN "ModalChoice" ELSE IF r.pc=r.specification.repeat.node THEN "AbilityRepeat" ELSE IF node.kind="NestedCost" THEN "NestedCostChoice" ELSE IF node.kind="Choice" THEN "InstructionChoice" ELSE "StructuralTargetEffect", node.requiresTargets,IF node.requiresTargets THEN 2 ELSE 0), [value |-> 1,actor |-> "SideB",baseController |-> "SideA",baseOrigin |-> r.ability.source,targetSite |-> "NoValue", controlNode |-> r.pc,options |-> IF modal THEN DOMAIN r.specification.modal[r.pc].bodies \cup {0} ELSE DOMAIN node.options, chooser |-> "SideB",maximum |-> quota.maximum, upTo |-> quota.upTo,requested |-> r.pc=r.specification.repeat.node /\ r.specification.repeat.kind="Fixed"]) ] OccurrenceAfterStepFixture912(r,context,control,nextId,capture) == LET continuation == OccurrenceContinuation912(r,control,capture) next == continuation.sourceNode trace == Append(r.trace,r.current) ability == [r.ability EXCEPT !.instructions=IF next=0 THEN trace ELSE Append(trace,nextId), !.phase=IF next=0 THEN "Complete" ELSE "Between",!.lastFinished=next=0,!.complete=next=0] boundary == OccurrenceBoundary912(r,context,{"InstructionEnd"},0) IN [r EXCEPT !.ability=ability,!.trace=trace,!.pc=next,!.current=nextId, !.occurrences=IF next=0 THEN @ ELSE ReplacementOverlay99(@,[id \in {nextId} |-> [id |-> id,sourceNode |-> next,pass |-> continuation.repeat.pass]]), !.usedOccurrences=IF next=0 THEN @ ELSE @ \cup {nextId}, !.choices=IF OccurrenceHasControl912(r) THEN ReplacementOverlay99(@,[id \in {r.current} |-> control]) ELSE @, !.repeat=continuation.repeat,!.modal=continuation.modal,!.phase="Checkpoint",!.checkpoint=0,!.boundary=boundary] OccurrenceStepFixture912(r,context,plan,world,option,nextId,count) == LET returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> world.id,effects |-> context.actualEffects,complete |-> TRUE,childrenReturned |-> TRUE] control == IF OccurrenceHasControl912(r) THEN [tag |-> "ResolvedInstructionControl",instance |-> r.id,node |-> r.pc,instruction |-> context.currentRef, contextId |-> context.id,actualEffects |-> context.actualEffects,completion |-> returned,mode |-> "Selected",operation |-> 1, option |-> option,chooser |-> context.actualEffects[1].chooser, maximum |-> context.actualEffects[1].maximum,upTo |-> context.actualEffects[1].upTo,requested |-> context.actualEffects[1].requested] ELSE NoInstructionControl911 capture == IF OccurrencePassNext912(r,control)=0 /\ r.specification.repeat.kind="Fixed" /\ ~r.repeat.captured /\ OccurrenceRepeatRequested912(r,control) THEN [tag |-> "ResolvedRepetitionCount",instance |-> r.id,source |-> r.ability.source,definition |-> r.technique.definition, directive |-> r.specification.repeat.node,pass |-> 0,contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> world.id,completion |-> returned,count |-> count] ELSE [tag |-> "NoRepetitionCount"] after == OccurrenceAfterStepFixture912(r,context,control,nextId,capture) afterPlan == [plan EXCEPT !.phase="Complete",!.cursor=@+1,!.completedSteps=plan.steps] step == [tag |-> "InstructionStepReturn",instruction |-> r.current,index |-> plan.cursor, step |-> plan.steps[plan.cursor],complete |-> TRUE,expectedReturn |-> returned] IN [before |-> r,context |-> context,plan |-> plan,world |-> world,returned |-> returned,control |-> control, nextId |-> nextId,capture |-> capture,after |-> after,afterPlan |-> afterPlan,step |-> step,boundary |-> after.boundary] OccurrenceStepValid912(f) == FinishOccurrenceInstruction912(f.before,f.after,f.plan,f.afterPlan,f.context,f.returned,f.step,f.control, [tag |-> "NoInstructionPayment"],f.boundary,f.nextId,f.capture) OccurrenceStandaloneStepFixture912(r,option,nextId,requested,count) == LET resolving == [r EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.cursor=Len(r.trace)+1] node == resolving.technique.nodes[resolving.pc] plan == [OpenInstruction93(resolving.current,"Ability",resolving.id,resolving.ability.source,resolving.ability.sourceZone, Len(resolving.trace)+1,"NoValue",node.steps,node.requiresTargets) EXCEPT !.announced=TRUE,!.phase="Resolving"] effects == [OccurrenceEffectMapFixture912(resolving) EXCEPT ![1].requested=requested] context == [id |-> 150000+resolving.current,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(plan),currentWorld |-> 1,actualEffects |-> effects] IN OccurrenceStepFixture912(resolving,context,plan,[id |-> 1],option,nextId,count) OccurrenceSourceSpecificationGuardChecks912 == LET a == OccurrenceAdoptionFixture912 f == a.f IN \A spec \in {[a.r.specification EXCEPT !.sourceSHA="ForeignSHA"],[a.r.specification EXCEPT !.card="Specimen0110"], [a.r.specification EXCEPT !.source=ObjectAbilitySource9(2)], [a.r.specification EXCEPT !.modal[11901].bodies=[mode \in 1..2 |-> IF mode=1 THEN <<11903,11904>> ELSE <<11902>>]]} : ~AdoptOccurrenceRuntime912(f.atomicR,NewOccurrenceRuntime912(f.atomicR,spec),spec,f.currentContext,f.atomicOrigin, f.atomicLedger,f.currentWorld,f.atomicRegistry,f.atomicAuthority,OccurrenceFacts912) OccurrenceTopologyScopeChecks912 == LET p == OccurrenceSourceTechnique912 spec == OccurrenceSpecificationFixture912(p) overlap == [spec EXCEPT !.modal[11901].bodies[2]= <<11902>>] nested == [spec EXCEPT !.modal[11901].bodies[1]= <<11901>>] IN /\ ~OccurrenceSpecificationShapeSupported912(overlap,p) /\ ~OccurrenceSpecificationShapeSupported912(nested,p) OccurrenceAdoptedContextValue912(a) == [a.f EXCEPT !.atomicR=a.r,!.atomicWorld=a.world,!.atomicAuthority=a.authority,!.atomicRegistry=a.registry, !.currentContext=a.context,!.currentWorld=a.currentWorld,!.atomicSnapshot=a.snapshot] OccurrenceAdoptedContextFixture912 == OccurrenceAdoptedContextValue912(OccurrenceAdoptionFixture912) OccurrenceCountedReturnFromContextFixture912(f,option,nextWorldId,nextOccurrence,count) == LET op == OccurrenceStepFixture912(f.atomicR,f.currentContext,f.atomicPlan,f.atomicWorld,option,nextOccurrence,count) actualReturn == [op.returned EXCEPT !.contextId=f.currentContext.id,!.instruction=f.currentContext.currentRef, !.effects=f.currentContext.actualEffects,!.snapshotId=f.atomicWorld.id] control == op.control step == [op.step EXCEPT !.expectedReturn=actualReturn] after == op.after candidate == [f.atomicLedger EXCEPT !.instances[12110].status=IF after.pc=0 THEN "Complete" ELSE "Resolving"] nextWorld == [f.atomicWorld EXCEPT !.id=nextWorldId, !.finishedInstances=@ \cup (IF after.pc=0 THEN {after.id} ELSE {}), !.activity.instances[12110]=[ability |-> f.s.d.syntax.id,sourceObject |-> 1,status |-> IF after.pc=0 THEN "Complete" ELSE "Resolving",owner |-> OccurrenceLookOwner912(after)]] execution == [tag |-> "ActualObjectTransition",id |-> f.currentContext.id,snapshotId |-> nextWorldId, source |-> after.ability.source,instruction |-> f.currentContext.currentRef,return |-> actualReturn] authority == LifetimeAuthorityAfter910(f.atomicAuthority,LifetimeKernelTransition910(f.atomicWorld,nextWorld,execution)) registry == [f.atomicRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,nextWorld),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] snapshot == SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(nextWorldId,f.atomicSnapshot.checkpointId,"AfterGraphInstructionReturn",f.s.definitions,f.s.objects),candidate) returnedContext == [f.currentContext EXCEPT !.phase="Returned"] afterOrigin == [f.atomicOrigin EXCEPT !.plan=op.afterPlan,!.parent=after.ability] IN [f |-> f,op |-> op,actualReturn |-> actualReturn,control |-> control,step |-> step,after |-> after,candidate |-> candidate, nextWorld |-> nextWorld,execution |-> execution,authority |-> authority,registry |-> registry,snapshot |-> snapshot, returnedContext |-> returnedContext,afterOrigin |-> afterOrigin] OccurrenceReturnFromContextFixture912(f,option,nextWorldId,nextOccurrence) == OccurrenceCountedReturnFromContextFixture912(f,option,nextWorldId,nextOccurrence,0) OccurrenceReturnProtocolValid912(q) == LET f == q.f IN /\ RecordConditionalOccurrenceUse912(f.atomicLedger,f.atomicLedger,f.atomicR,f.atomicPlan, ConditionalExecutionFixture96([id |-> f.atomicR.id,ability |-> f.atomicR.ability],f.atomicPlan,{1}), Empty9,Empty9,Empty9,Empty9,0,{},f.currentWorld,f.atomicRegistry,f.atomicAuthority) /\ FinishObservedConditionalOccurrence912(f.atomicRegistry,q.registry,f.atomicLedger,q.candidate,q.candidate, <>,<>,f.atomicR,q.after,f.atomicPlan,q.op.afterPlan,f.currentContext,q.returnedContext, f.atomicOrigin,q.afterOrigin,f.currentWorld,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture, f.atomicSnapshot,q.snapshot,f.atomicAuthority,q.authority) OccurrenceCheckpointFixture912(q,id,worldId) == LET world == [q.nextWorld EXCEPT !.id=worldId] execution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 300000+worldId,snapshotId |-> worldId,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(q.authority,LifetimeKernelTransition910(q.nextWorld,world,execution)) registry == [q.registry EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] current == [SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(worldId,id,"ProcedureCodee605a78f5d5e",q.f.s.definitions,world.objects),q.candidate) EXCEPT !.usedObjects=q.candidate.lastSnapshot.usedObjects \cup DOMAIN world.objects, !.activationEpoch=ConditionalEpochMap96(q.candidate,q.f.s.definitions),!.activationSerial=q.candidate.activationSerial] begin == [current EXCEPT !.id=1000000+worldId,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(q.candidate,id,begin,current,Empty9) EXCEPT !.caller=OccurrenceBoundaryCaller912(q.op.boundary)] ledger == ConditionalCommittedFixture96(q.candidate,q.f.s.definitions,cp,Empty9,Empty9,Empty9) receipt == [tag |-> "OccurrenceInstructionCheckpoint",id |-> id,instance |-> q.after.id,source |-> q.after.ability.source, boundary |-> q.op.boundary,complete |-> TRUE,allNewerChainsComplete |-> TRUE] ready == [q.after EXCEPT !.checkpoint=id,!.phase=IF q.after.pc=0 THEN "Complete" ELSE "Targets"] IN [q |-> q,world |-> world,execution |-> execution,authority |-> authority,registry |-> registry,current |-> current, cp |-> cp,ledger |-> ledger,receipt |-> receipt,ready |-> ready] OccurrenceCheckpointValid912(g) == /\ CommitLifetimeKernelCore910(g.q.authority,g.authority,g.world,g.execution) /\ PublishNextLifetime910(g.q.registry,g.registry,g.authority) /\ ProcessConditionalCheckpoint96(g.q.candidate,g.ledger,<>,<>,g.q.f.s.definitions,g.cp, ConditionalConditionsFixture96(g.q.f.s.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{g.q.f.s.busy.id}) /\ CompleteOccurrenceCheckpoint912(g.q.after,g.ready,g.ledger,<>,g.receipt,g.registry,g.authority) OccurrenceNextSelectionFixture912(g,entryId) == LET s == g.q.f.s r == g.ready node == r.technique.nodes[r.pc] plan == OpenInstruction93(r.current,"Ability",r.id,r.ability.source,r.ability.sourceZone,Len(r.trace)+1,"NoValue",node.steps,node.requiresTargets) targets == InstructionTargetsFixture93(plan) afterPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent",!.targets=targets.targets] imminent == [r EXCEPT !.phase="Imminent",!.checkpoint=0,!.ability.phase="Imminent",!.ability.cursor=@+1] selected == [g.ledger EXCEPT !.instances[12110].status="Imminent"] receipt == ReplacementOverlay99(InstructionEntryFixture93(plan),[checkpointId |-> r.checkpoint]) entry == [tag |-> "ActualOccurrenceInstructionEntry",id |-> entryId,snapshotId |-> g.world.id,kind |-> "ConditionalNext", beforeLedger |-> g.ledger,afterLedger |-> selected,stackBefore |-> <>,stackAfter |-> <>, before |-> r,after |-> imminent,beforePlan |-> plan,afterPlan |-> afterPlan,targets |-> targets,receipt |-> receipt, owner |-> [windowId |-> r.metadata.windowId,option |-> r.metadata.option,transaction |-> r.metadata.transaction]] IN ReplacementOverlay99(s,[before |-> r,imminent |-> imminent,selected |-> selected,plan |-> plan,imminentPlan |-> afterPlan, targets |-> targets,receipt |-> receipt,entry |-> entry,entrySnapshot |-> g.current,lifeWorld |-> g.world, authority |-> g.authority,registry |-> g.registry]) OccurrenceNextSelectionValid912(g,s) == /\ OccurrenceCheckpointValid912(g) /\ EnterNextConditionalOccurrence912(g.ledger,s.selected,<>,g.ready,s.imminent,s.plan,s.imminentPlan,s.targets,s.receipt,s.registry,s.authority) OccurrenceContextFromEntryFixture912(s,contextId,observationId,openingId,groupId,atomicWorldId,beforeExpectedRegistry,beforeHistory) == LET origin == [kind |-> "Instruction",plan |-> s.imminentPlan,parent |-> s.imminent.ability,ruleStep |-> "NoValue"] atomicR == [s.imminent EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] effects == OccurrenceEffectMapFixture912(atomicR) capabilities == [tag |-> "NormalizedInterruptCapabilities",definition |-> s.d,origin |-> s.technique.lexemes.origin,clauses |-> Empty9] world == [tag |-> "CurrentInterruptWorld",id |-> s.lifeWorld.id,turn |-> s.lifeWorld.turn,traversalControl |-> s.lifeWorld.control, objects |-> s.objects,controllers |-> [id \in DOMAIN s.objects |-> s.objects[id].side],activePeriods |-> Empty9, conditional |-> SnapshotWithConditionalRegistry96(s.entrySnapshot,s.selected),paidDefinitions |-> Empty9, lexemes |-> [k \in {s.key} |-> s.technique.lexemes],capabilities |-> [k \in {s.key} |-> capabilities], paidContexts |-> Empty9,turnUses |-> Empty9,replacementDefinitions |-> Empty9,liveReplacementIds |-> {}, entries |-> [id \in {s.entry.id} |-> s.entry]] description == [tag |-> "NormalizedInstructionEffectDescription",context |-> OriginReference99(origin),source |-> s.technique.source, snapshotId |-> s.lifeWorld.id,effects |-> effects,order |-> <<1>>,sourceNode |-> s.imminent.pc,occurrence |-> s.imminent.current] projection == [tag |-> "CurrentStaticExpectedProjection",description |-> description,snapshotId |-> s.lifeWorld.id,forbiddenIds |-> {},values |-> Empty9] context == NewExpectedContext99(contextId,s.entry.id,origin,world,description,effects,s.entry.owner) expectedRegistry == [beforeExpectedRegistry EXCEPT !.contexts=ReplacementOverlay99(@,[id \in {contextId} |-> context]), !.entryIds=@ \cup {s.entry.id},!.usedContextIds=@ \cup {contextId}] observation == InitialWouldObservation99(context,observationId) history == InitialCaptureAfterFixture99(beforeHistory,context,observation) observed == [s.selected EXCEPT !.instances[12110].expected=ReplacementOverlay99(@,[i \in {s.imminentPlan.index} |-> [instruction |-> context.initialRef,effects |-> ExpectedObservationSet99(effects)]])] prepared == [context EXCEPT !.phase="Prepared",!.preparedEffects=effects,!.openingRef=context.currentRef,!.windowId=openingId,!.group=groupId] noWindow == [prepared EXCEPT !.phase="Cleared",!.site=s.site] clearance == ContextInstructionClearance99(noWindow,0) cleared == [noWindow EXCEPT !.phase="InstructionCleared",!.clearance=clearance] atomicPlan == [s.imminentPlan EXCEPT !.phase="Resolving"] atomicOrigin == [origin EXCEPT !.plan=atomicPlan,!.parent=atomicR.ability] atomicContext == [cleared EXCEPT !.phase="Resolving",!.actualEffects=effects] atomicLedger == [observed EXCEPT !.instances[12110].status="Resolving"] atomicWorld == [s.lifeWorld EXCEPT !.id=atomicWorldId,!.activity.instances[12110].status="Resolving",!.activity.instances[12110].owner=OccurrenceLookOwner912(atomicR)] atomicExecution == [tag |-> "CurrentCharacteristicsEvaluation",id |-> contextId,snapshotId |-> atomicWorldId,source |-> s.technique.source] atomicAuthority == LifetimeAuthorityAfter910(s.authority,LifetimeKernelTransition910(s.lifeWorld,atomicWorld,atomicExecution)) atomicRegistry == [s.registry EXCEPT !.frontier=LifetimeFrontier910(atomicAuthority,Len(atomicAuthority.order))] atomicSnapshot == SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(atomicWorldId,s.entrySnapshot.checkpointId,"AfterAtomicEntry",s.definitions,s.objects),atomicLedger) currentContext == [atomicContext EXCEPT !.currentWorld=atomicWorldId] currentWorld == [world EXCEPT !.id=atomicWorldId,!.conditional=atomicSnapshot] IN [beforeExpectedRegistry |-> beforeExpectedRegistry,beforeHistory |-> beforeHistory,s |-> s,origin |-> origin,atomicR |-> atomicR,effects |-> effects,world |-> world,description |-> description,projection |-> projection, context |-> context,expectedRegistry |-> expectedRegistry,observation |-> observation,history |-> history, observed |-> observed,prepared |-> prepared,noWindow |-> noWindow,clearance |-> clearance,cleared |-> cleared, atomicPlan |-> atomicPlan,atomicOrigin |-> atomicOrigin,atomicContext |-> atomicContext,atomicLedger |-> atomicLedger, atomicWorld |-> atomicWorld,atomicExecution |-> atomicExecution,atomicAuthority |-> atomicAuthority,atomicRegistry |-> atomicRegistry, atomicSnapshot |-> atomicSnapshot,currentContext |-> currentContext,currentWorld |-> currentWorld] OccurrenceContextProtocolValid912(f) == LET s == f.s IN /\ BeginChapterExpected912(f.beforeExpectedRegistry,f.expectedRegistry,f.context.id,f.origin,f.world,s.entry,f.description,f.projection,f.effects, s.entry.owner,s.lifeWorld.cardFacts,f.beforeHistory,f.history,f.observation,s.selected,s.registry,s.authority) /\ ObserveOccurrenceExpected912(s.selected,f.observed,s.imminent,s.imminentPlan,f.context,f.history) /\ ApplyAutomaticReplacements99(f.context,f.context,f.origin,f.origin,f.world,<>,<<>>,s.lifeWorld.cardFacts,f.history) /\ PreparePersistentOpening912(s.registry,f.context,f.prepared,f.observed,f.observed,f.origin,f.world,f.history,f.prepared.windowId,f.prepared.group,Empty9,{12120},s.lifeWorld.cardFacts,s.authority) /\ NoPersistentPrepared912(s.registry,f.prepared,f.noWindow,f.origin,f.world,f.history,f.observed,<>,s.site,s.lifeWorld.cardFacts,s.authority) /\ ClearPersistentInstruction912(s.registry,f.noWindow,f.cleared,f.origin,f.world,f.history,f.observed,<>,<>,"NoModifiers",f.clearance,s.lifeWorld.cardFacts,s.authority) /\ BeginConditionalOccurrenceAtomic912(f.observed,f.atomicLedger,s.imminent,f.atomicR,s.imminentPlan,f.atomicPlan,f.cleared,f.origin, f.clearance,f.world,<>,s.registry,s.authority) /\ CommitLifetimeKernelCore910(s.authority,f.atomicAuthority,f.atomicWorld,f.atomicExecution) /\ PublishNextLifetime910(s.registry,f.atomicRegistry,f.atomicAuthority) /\ ObserveConditionalActivity96(f.observed,f.atomicLedger,f.atomicLedger,<>,<>,f.world.conditional,f.atomicSnapshot) /\ ObserveResolvingLifetimeContext910(f.atomicContext,f.currentContext,f.atomicRegistry,f.atomicAuthority,f.atomicOrigin) OccurrenceModalSecondBodyPrefixFixture912 == LET first == OccurrenceAdoptedContextFixture912 q1 == OccurrenceReturnFromContextFixture912(first,1,34,13001) cp1 == OccurrenceCheckpointFixture912(q1,4,35) s2 == OccurrenceNextSelectionFixture912(cp1,13002) e1 == [first.expectedRegistry EXCEPT !.contexts[first.context.id]=q1.returnedContext] f2 == OccurrenceContextFromEntryFixture912(s2,13003,13004,13005,130,36,e1,first.history) q2 == OccurrenceReturnFromContextFixture912(f2,0,37,13006) cp2 == OccurrenceCheckpointFixture912(q2,5,39) s3 == OccurrenceNextSelectionFixture912(cp2,13007) e2 == [f2.expectedRegistry EXCEPT !.contexts[f2.context.id]=q2.returnedContext] f3 == OccurrenceContextFromEntryFixture912(s3,13008,13009,13010,131,40,e2,f2.history) q3 == OccurrenceReturnFromContextFixture912(f3,2,41,13011) cp3 == OccurrenceCheckpointFixture912(q3,6,43) s4 == OccurrenceNextSelectionFixture912(cp3,13012) e3 == [f3.expectedRegistry EXCEPT !.contexts[f3.context.id]=q3.returnedContext] f4 == OccurrenceContextFromEntryFixture912(s4,13013,13014,13015,132,44,e3,f3.history) IN OccurrenceStepFixture912(f4.atomicR,f4.currentContext,f4.atomicPlan,f4.atomicWorld,0,13016,0) OccurrenceWholeModeGuardChecks912 == LET f == OccurrenceModalSecondBodyPrefixFixture912 early == [f.after EXCEPT !.pc=11901,!.occurrences[13016].sourceNode=11901] IN /\ f.before.pc=11903 /\ f.after.pc=11904 /\ f.after.current=13016 /\ OccurrenceStepValid912(f) /\ ~FinishOccurrenceInstruction912(f.before,early,f.plan,f.afterPlan,f.context,f.returned,f.step,f.control, [tag |-> "NoInstructionPayment"],f.boundary,f.nextId,f.capture) OccurrenceFullModalFixture912 == LET first == OccurrenceAdoptedContextFixture912 q1 == OccurrenceReturnFromContextFixture912(first,1,34,13001) cp1 == OccurrenceCheckpointFixture912(q1,4,35) s2 == OccurrenceNextSelectionFixture912(cp1,13002) e1 == [first.expectedRegistry EXCEPT !.contexts[first.context.id]=q1.returnedContext] f2 == OccurrenceContextFromEntryFixture912(s2,13003,13004,13005,130,36,e1,first.history) q2 == OccurrenceReturnFromContextFixture912(f2,0,37,13006) cp2 == OccurrenceCheckpointFixture912(q2,5,39) s3 == OccurrenceNextSelectionFixture912(cp2,13007) e2 == [f2.expectedRegistry EXCEPT !.contexts[f2.context.id]=q2.returnedContext] f3 == OccurrenceContextFromEntryFixture912(s3,13008,13009,13010,131,40,e2,f2.history) q3 == OccurrenceReturnFromContextFixture912(f3,2,41,13011) cp3 == OccurrenceCheckpointFixture912(q3,6,43) s4 == OccurrenceNextSelectionFixture912(cp3,13012) e3 == [f3.expectedRegistry EXCEPT !.contexts[f3.context.id]=q3.returnedContext] f4 == OccurrenceContextFromEntryFixture912(s4,13013,13014,13015,132,44,e3,f3.history) q4 == OccurrenceReturnFromContextFixture912(f4,0,45,13016) cp4 == OccurrenceCheckpointFixture912(q4,7,47) s5 == OccurrenceNextSelectionFixture912(cp4,13017) e4 == [f4.expectedRegistry EXCEPT !.contexts[f4.context.id]=q4.returnedContext] f5 == OccurrenceContextFromEntryFixture912(s5,13018,13019,13020,133,48,e4,f4.history) q5 == OccurrenceReturnFromContextFixture912(f5,0,49,0) cp5 == OccurrenceCheckpointFixture912(q5,8,51) receipt == PaidReturnFixture95(s5.busy,8) afterStack == <> returned == [cp5.ready EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN [first |-> first,q1 |-> q1,cp1 |-> cp1,s2 |-> s2,f2 |-> f2,q2 |-> q2,cp2 |-> cp2,s3 |-> s3,f3 |-> f3, q3 |-> q3,cp3 |-> cp3,s4 |-> s4,f4 |-> f4,q4 |-> q4,cp4 |-> cp4,s5 |-> s5,f5 |-> f5,q5 |-> q5,cp5 |-> cp5, receipt |-> receipt,afterStack |-> afterStack,returned |-> returned] OccurrenceFullModalProtocolChecks912 == LET p == OccurrenceFullModalFixture912 IN /\ OccurrenceAdoptionChecks912 /\ OccurrenceReturnProtocolValid912(p.q1) /\ OccurrenceCheckpointValid912(p.cp1) /\ OccurrenceNextSelectionValid912(p.cp1,p.s2) /\ OccurrenceContextProtocolValid912(p.f2) /\ OccurrenceReturnProtocolValid912(p.q2) /\ OccurrenceCheckpointValid912(p.cp2) /\ OccurrenceNextSelectionValid912(p.cp2,p.s3) /\ OccurrenceContextProtocolValid912(p.f3) /\ OccurrenceReturnProtocolValid912(p.q3) /\ OccurrenceCheckpointValid912(p.cp3) /\ OccurrenceNextSelectionValid912(p.cp3,p.s4) /\ OccurrenceContextProtocolValid912(p.f4) /\ OccurrenceReturnProtocolValid912(p.q4) /\ OccurrenceCheckpointValid912(p.cp4) /\ OccurrenceNextSelectionValid912(p.cp4,p.s5) /\ OccurrenceContextProtocolValid912(p.f5) /\ OccurrenceReturnProtocolValid912(p.q5) /\ OccurrenceCheckpointValid912(p.cp5) /\ ReturnConditionalOccurrence912(<>,p.afterStack,p.cp5.ready,p.returned,p.cp5.ledger,p.receipt,p.cp5.registry,p.cp5.authority) /\ p.returned.ability.source=p.first.atomicR.ability.source /\ p.returned.id=p.first.atomicR.id /\ p.returned.trace= <<11901,13001,13006,13011,13016>> /\ p.returned.modal[11901].resolved= <<1,2>> /\ p.returned.technique=p.first.atomicR.technique /\ DOMAIN p.cp5.ledger.instances[p.returned.id].expected=1..5 /\ p.q2.after.current=13006 /\ p.q2.after.pc=11901 /\ ~p.q2.after.ability.complete /\ p.q3.after.current=13011 /\ p.q3.after.pc=11903 /\ p.q4.after.current=13016 /\ p.q4.after.pc=11904 /\ ~p.q4.after.ability.lastFinished /\ p.q5.after.current=0 /\ p.q5.after.ability.lastFinished OccurrenceReplayedSourceNodeChecks912 == LET p == OccurrenceFullModalFixture912 IN /\ p.q1.f.atomicR.pc=p.q3.f.atomicR.pc /\ p.q1.f.atomicR.current#p.q3.f.atomicR.current /\ p.q1.f.currentContext.initialRef#p.q3.f.currentContext.initialRef /\ p.q3.f.expectedRegistry.entryIds={12150,13002,13007} /\ DOMAIN p.q3.f.beforeHistory.observations \subseteq DOMAIN p.q3.f.history.observations /\ ~EnterNextOccurrence912(p.q2.after,p.s3.imminent,p.s3.plan,p.s3.imminentPlan,p.s3.targets,p.s3.receipt, p.cp2.ledger,<>,p.cp2.registry,p.cp2.authority) OccurrenceModalChoiceGuardChecks912 == LET p == OccurrenceFullModalFixture912 q == p.q3 wrongChooser == [q.control EXCEPT !.chooser="SideA"] chooserAfter == OccurrenceAfterStepFixture912(q.f.atomicR,q.f.currentContext,wrongChooser,q.op.nextId,q.op.capture) repeated == [q.control EXCEPT !.option=1] repeatAfter == OccurrenceAfterStepFixture912(q.f.atomicR,q.f.currentContext,repeated,q.op.nextId,q.op.capture) stop == [q.control EXCEPT !.option=0] stopAfter == OccurrenceAfterStepFixture912(q.f.atomicR,q.f.currentContext,stop,0,q.op.capture) IN /\ ~FinishOccurrenceInstruction912(q.f.atomicR,chooserAfter,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, wrongChooser,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) /\ ~FinishOccurrenceInstruction912(q.f.atomicR,repeatAfter,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, repeated,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) /\ ~FinishOccurrenceInstruction912(q.f.atomicR,stopAfter,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, stop,[tag |-> "NoInstructionPayment"],q.op.boundary,0,q.op.capture) OccurrenceFreshExecutionGuardChecks912 == LET q == OccurrenceFullModalFixture912.q3 reused == q.f.atomicR.trace[1] after == OccurrenceAfterStepFixture912(q.f.atomicR,q.f.currentContext,q.control,reused,q.op.capture) IN /\ reused \in q.f.atomicR.usedOccurrences /\ ~FinishOccurrenceInstruction912(q.f.atomicR,after,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, q.control,[tag |-> "NoInstructionPayment"],q.op.boundary,reused,q.op.capture) OccurrenceNextTargetGuardChecks912 == LET p == OccurrenceFullModalFixture912 s == p.s3 IN \A targets \in {[s.targets EXCEPT !.valid=FALSE],[s.targets EXCEPT !.source=ObjectAbilitySource9(2)], [s.targets EXCEPT !.instruction=s.targets.instruction+1],[s.targets EXCEPT !.abilityInstance=s.targets.abilityInstance+1]} : ~EnterNextConditionalOccurrence912(p.cp2.ledger,s.selected,<>,p.cp2.ready,s.imminent,s.plan,s.imminentPlan,targets,s.receipt,s.registry,s.authority) OccurrenceConsumedEntryGuardChecks912 == LET p == OccurrenceFullModalFixture912 f == p.f2 reused == p.first.s.entry.id entry == [f.s.entry EXCEPT !.id=reused] world == [f.world EXCEPT !.entries=[id \in {reused} |-> entry]] description == [f.description EXCEPT !.effects=Empty9,!.order= <<>>] projection == [f.projection EXCEPT !.description=description] context == NewExpectedContext99(f.context.id,reused,f.origin,world,description,Empty9,entry.owner) observation == InitialWouldObservation99(context,f.observation.id) history == InitialCaptureAfterFixture99(f.beforeHistory,context,observation) after == [f.beforeExpectedRegistry EXCEPT !.entryIds=@ \cup {reused},!.usedContextIds=@ \cup {context.id}, !.contexts=ReplacementOverlay99(@,[id \in {context.id} |-> context])] IN /\ reused \in f.beforeExpectedRegistry.entryIds /\ context.initialRef#p.first.currentContext.initialRef /\ context.initialEffects=Empty9 /\ ~BeginOccurrenceExpected912(f.beforeExpectedRegistry,after,context.id,f.origin,world,entry,description,projection,Empty9, entry.owner,OccurrenceFacts912,f.beforeHistory,history,observation,f.s.registry,f.s.authority) OccurrenceCapturedDefinitionGuardChecks912 == LET q == OccurrenceFullModalFixture912.q3 d == [q.f.atomicLedger.instances[q.after.id].definitionCopy EXCEPT !.effectChoices={{},{1}}] ledger == [q.f.atomicLedger EXCEPT !.instances[q.after.id].definitionCopy=d] candidate == [q.candidate EXCEPT !.instances[q.after.id].definitionCopy=d] IN /\ ConditionalKey96(d)=ConditionalKey96(q.after.technique.definition) /\ ~FinishConditionalOccurrenceCore912(ledger,candidate,<>,<>,q.f.atomicR,q.after, q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) OccurrencePendingChildGuardChecks912 == LET p == OccurrenceFullModalFixture912 g == p.cp2 d == g.q.f.s.d definitions == g.q.f.s.definitions event == ConditionalEventFixture96(13601,"StructuralEvent",0,"SideB","SideB",g.q.candidate.lastSnapshot,13600) events == [id \in {13601} |-> event] cp == [g.cp EXCEPT !.occurrences=events] recognition == [definition |-> ConditionalKey96(d),occurrence |-> 13601] allocation == [key \in {recognition} |-> 13610] bindings == ConditionalBindingsFixture96({recognition},cp.id,13620,136) pending == ConditionalCommittedFixture96(g.q.candidate,definitions,cp,allocation,bindings,Empty9) IN /\ ProcessConditionalCheckpoint96(g.q.candidate,pending,<>,<>,definitions,cp, ConditionalConditionsFixture96(definitions,events),allocation,bindings,Empty9,Empty9,{g.q.f.s.busy.id}) /\ pending.instances[13610].status="Pending" /\ ~CompleteOccurrenceCheckpoint912(g.q.after,g.ready,pending,<>,g.receipt,g.registry,g.authority) OccurrenceUpToAndSpecificRepeatChecks912 == LET p == OccurrenceFullModalFixture912 first == p.first.atomicR r == [first EXCEPT !.specification.modal[11901].upTo=TRUE] f == OccurrenceStandaloneStepFixture912(r,0,0,FALSE,0) prior == p.q3.f.atomicR permitted == [prior EXCEPT !.specification.modal[11901].allowRepeat=TRUE] repeated == OccurrenceStandaloneStepFixture912(permitted,1,14700,FALSE,0) IN /\ OccurrenceStepValid912(f) /\ f.after.current=0 /\ f.after.modal[11901].resolved= <<>> /\ OccurrenceStepValid912(repeated) /\ repeated.after.modal[11901].resolved= <<1,1>> /\ repeated.after.pc=11902 OccurrenceRemovedModalControlChecks912 == LET q == OccurrenceFullModalFixture912.q1 context == [q.f.currentContext EXCEPT !.actualEffects=Empty9] returned == [q.actualReturn EXCEPT !.effects=Empty9] control == [q.control EXCEPT !.mode="Removed",!.actualEffects=Empty9,!.completion=returned] after == OccurrenceAfterStepFixture912(q.f.atomicR,context,control,0,q.op.capture) step == [q.step EXCEPT !.expectedReturn=returned] IN /\ FinishOccurrenceInstruction912(q.f.atomicR,after,q.f.atomicPlan,q.op.afterPlan,context,returned,step,control, [tag |-> "NoInstructionPayment"],q.op.boundary,0,q.op.capture) /\ after.current=0 /\ after.modal[11901].resolved= <<>> OccurrenceActualChooserModificationChecks912 == LET q == OccurrenceFullModalFixture912.q1 context == [q.f.currentContext EXCEPT !.actualEffects[1].chooser="SideA"] returned == [q.actualReturn EXCEPT !.effects=context.actualEffects] control == [q.control EXCEPT !.chooser="SideA",!.actualEffects=context.actualEffects,!.completion=returned] after == OccurrenceAfterStepFixture912(q.f.atomicR,context,control,q.op.nextId,q.op.capture) step == [q.step EXCEPT !.expectedReturn=returned] IN /\ q.f.atomicR.specification.modal[11901].chooser="SideB" /\ FinishOccurrenceInstruction912(q.f.atomicR,after,q.f.atomicPlan,q.op.afterPlan,context,returned,step,control, [tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) OccurrenceControlProvenanceGuardChecks912 == LET q == OccurrenceFullModalFixture912.q3 foreign == [q.control EXCEPT !.instance=@+1] foreignAfter == OccurrenceAfterStepFixture912(q.f.atomicR,q.f.currentContext,foreign,q.op.nextId,q.op.capture) context == [q.f.currentContext EXCEPT !.actualEffects[1].controlNode=11902] returned == [q.actualReturn EXCEPT !.effects=context.actualEffects] control == [q.control EXCEPT !.actualEffects=context.actualEffects,!.completion=returned] after == OccurrenceAfterStepFixture912(q.f.atomicR,context,control,q.op.nextId,q.op.capture) step == [q.step EXCEPT !.expectedReturn=returned] IN /\ ~FinishOccurrenceInstruction912(q.f.atomicR,foreignAfter,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, foreign,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) /\ ~FinishOccurrenceInstruction912(q.f.atomicR,after,q.f.atomicPlan,q.op.afterPlan,context,returned,step, control,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) OccurrenceActualReturnGuardChecks912 == LET q == OccurrenceFullModalFixture912.q3 IN \A returned \in {[q.actualReturn EXCEPT !.complete=FALSE],[q.actualReturn EXCEPT !.childrenReturned=FALSE]} : LET control == [q.control EXCEPT !.completion=returned] after == OccurrenceAfterStepFixture912(q.f.atomicR,q.f.currentContext,control,q.op.nextId,q.op.capture) step == [q.step EXCEPT !.expectedReturn=returned] IN ~FinishOccurrenceInstruction912(q.f.atomicR,after,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,returned,step, control,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,q.op.capture) OccurrenceCheckpointReceiptGuardChecks912 == LET g == OccurrenceFullModalFixture912.cp2 IN \A receipt \in {[g.receipt EXCEPT !.complete=FALSE],[g.receipt EXCEPT !.allNewerChainsComplete=FALSE], [g.receipt EXCEPT !.boundary.node=11904],[g.receipt EXCEPT !.source=ObjectAbilitySource9(2)]} : ~CompleteOccurrenceCheckpoint912(g.q.after,g.ready,g.ledger,<>,receipt,g.registry,g.authority) OccurrenceForgedPublicationFixture912(q,before,after,nextId) == LET candidate == [q.f.atomicLedger EXCEPT !.instances[before.id].status=IF after.current=0 THEN "Complete" ELSE "Resolving"] world == [q.f.atomicWorld EXCEPT !.id=q.nextWorld.id, !.finishedInstances=@ \cup (IF after.current=0 THEN {before.id} ELSE {}), !.activity.instances[before.id]=[ability |-> before.technique.definition.syntax.id,sourceObject |-> 1, status |-> IF after.current=0 THEN "Complete" ELSE "Resolving",owner |-> OccurrenceLookOwner912(after)]] execution == [tag |-> "ActualObjectTransition",id |-> q.f.currentContext.id,snapshotId |-> world.id, source |-> before.ability.source,instruction |-> q.f.currentContext.currentRef,return |-> q.actualReturn] authority == LifetimeAuthorityAfter910(q.f.atomicAuthority,LifetimeKernelTransition910(q.f.atomicWorld,world,execution)) registry == [q.f.atomicRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,world),!.frontier=LifetimeFrontier910(authority,Len(authority.order))] snapshot == [SnapshotWithConditionalRegistry96(q.f.atomicSnapshot,candidate) EXCEPT !.id=world.id] origin == [q.f.atomicOrigin EXCEPT !.plan=q.op.afterPlan,!.parent=after.ability] IN [q |-> q,before |-> before,after |-> after,nextId |-> nextId,candidate |-> candidate,world |-> world,execution |-> execution, authority |-> authority,registry |-> registry,snapshot |-> snapshot,origin |-> origin] OccurrenceForgedPublicationAccepted912(g) == LET q == g.q IN FinishObservedConditionalOccurrence912(q.f.atomicRegistry,g.registry,q.f.atomicLedger,g.candidate,g.candidate, <>,<>,g.before,g.after,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.returnedContext, q.f.atomicOrigin,g.origin,q.f.currentWorld,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary, g.nextId,q.op.capture,q.f.atomicSnapshot,g.snapshot,q.f.atomicAuthority,g.authority) OccurrenceOwnedChoiceHistoryGuardChecks912 == LET q == OccurrenceFullModalFixture912.q3 before == [q.f.atomicR EXCEPT !.choices[11901].option=2] after == OccurrenceAfterStepFixture912(before,q.f.currentContext,q.control,q.op.nextId,q.op.capture) g == OccurrenceForgedPublicationFixture912(q,before,after,q.op.nextId) IN ~OccurrenceForgedPublicationAccepted912(g) OccurrenceDynamicQuotaSupportChecks912 == LET q == OccurrenceFullModalFixture912.q3 context == [q.f.currentContext EXCEPT !.actualEffects[1].maximum=1,!.actualEffects[1].upTo=TRUE] returned == [q.actualReturn EXCEPT !.effects=context.actualEffects] control == [q.control EXCEPT !.maximum=1,!.upTo=TRUE,!.actualEffects=context.actualEffects,!.completion=returned] receipt == [tag |-> "CurrentModalQuotaSupport",instance |-> q.f.atomicR.id,contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> q.f.atomicAuthority.current.id,status |-> "Unsupported",policy |-> "FixedOrAlreadyCommittedQuota"] IN /\ ReadOccurrenceQuotaSupport912(q.f.atomicR,context,returned,control,q.f.atomicRegistry,q.f.atomicAuthority,receipt) /\ ~OccurrenceModalQuotaSupported912(q.f.atomicR,control) OccurrenceQuotaReadBindingChecks912 == LET q == OccurrenceFullModalFixture912.q3 base == [q.f.currentContext EXCEPT !.actualEffects[1].maximum=1,!.actualEffects[1].upTo=TRUE] IN \A context \in {[base EXCEPT !.phase="Returned"],[base EXCEPT !.currentRef.id=@+1], [base EXCEPT !.currentRef.abilityInstance=@+1],[base EXCEPT !.currentRef.index=@+1]} : LET returned == [q.actualReturn EXCEPT !.instruction=context.currentRef,!.effects=context.actualEffects] control == [q.control EXCEPT !.maximum=1,!.upTo=TRUE,!.actualEffects=context.actualEffects,!.completion=returned,!.instruction=context.currentRef] receipt == [tag |-> "CurrentModalQuotaSupport",instance |-> q.f.atomicR.id,contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> q.f.atomicAuthority.current.id,status |-> "Unsupported",policy |-> "FixedOrAlreadyCommittedQuota"] IN ~ReadOccurrenceQuotaSupport912(q.f.atomicR,context,returned,control,q.f.atomicRegistry,q.f.atomicAuthority,receipt) OccurrenceQuotaReadReturnChecks912 == LET q == OccurrenceFullModalFixture912.q3 IN \A returned \in {[q.actualReturn EXCEPT !.complete=FALSE],[q.actualReturn EXCEPT !.childrenReturned=FALSE], [q.actualReturn EXCEPT !.contextId=@+1],[q.actualReturn EXCEPT !.effects=Empty9]} : LET control == [q.control EXCEPT !.completion=returned] receipt == [tag |-> "CurrentModalQuotaSupport",instance |-> q.f.atomicR.id,contextId |-> q.f.currentContext.id, instruction |-> q.f.currentContext.currentRef,snapshotId |-> q.f.atomicAuthority.current.id,status |-> "Supported",policy |-> "FixedOrAlreadyCommittedQuota"] IN ~ReadOccurrenceQuotaSupport912(q.f.atomicR,q.f.currentContext,returned,control,q.f.atomicRegistry,q.f.atomicAuthority,receipt) OccurrenceRepeatText912 == "SyntheticText608e0f7db8a7" OccurrenceRepeatCard912 == "structural_repeat_schema_912" OccurrenceRepeatSHA912 == "e085f5fd4e19b85841f3764c9427c94c9625f1e1cd51f494c53a7e801d0a9387" OccurrenceRepeatFacts912 == ReplacementOverlay99(CardFacts9,[card \in {OccurrenceRepeatCard912} |-> [kind |-> "Objective",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> OccurrenceRepeatSHA912]]) OccurrenceRepeatObjects912 == [RootBranchObjects911 EXCEPT ![1].card=OccurrenceRepeatCard912] OccurrenceRepeatTechnique912 == LET p == OccurrenceSourceTechnique912 nodes == [id \in DOMAIN p.nodes |-> CASE id=11901 -> InstructionNode911(id,"Choice",<<"ChooseGainOrDraw">>,FALSE,11904,[i \in 1..2 |-> IF i=1 THEN 11902 ELSE 11903],3,{1}) [] id=11902 -> InstructionNode911(id,"Plain",<<"Gain">>,FALSE,11904,Empty9,2,{1}) [] id=11903 -> InstructionNode911(id,"Plain",<<"Draw">>,FALSE,11904,Empty9,2,{1}) [] OTHER -> InstructionNode911(id,"Plain",<<"Repeat">>,FALSE,0,Empty9,1,{2})] units == [i \in 1..2 |-> IF i=1 THEN [category |-> "Trait",shape |-> "Options",sentence |-> 1, optionInstructions |-> [j \in 1..2 |-> IF j=1 THEN <<11902>> ELSE <<11903>>]] ELSE [category |-> "Trait",shape |-> "Single",sentence |-> 2]] groups == <<[rule |-> "ProcedureCodef6fc0286cf28",units |-> {1},nodes |-> <<11901,11902,11903>>,join |-> 11904], [rule |-> "ProcedureCode8b36a14c1569",units |-> {2},nodes |-> <<11904>>]>> IN ReplacementOverlay99(p,[nodes |-> nodes,units |-> units,groups |-> groups,card |-> OccurrenceRepeatCard912, sourceSHA |-> OccurrenceRepeatSHA912,lexemes |-> LexicalReceiptFixture99(p.definition,OccurrenceRepeatCard912,Empty9,OccurrenceRepeatFacts912),repeatTemplate |-> TRUE]) OccurrenceRepeatWorld912 == [RootBranchWorld911 EXCEPT !.objects=OccurrenceRepeatObjects912,!.cardFacts=OccurrenceRepeatFacts912] OccurrenceRepeatSpecification912 == [tag |-> "OccurrenceTechniqueSpecification",definition |-> OccurrenceRepeatTechnique912.definition,source |-> OccurrenceRepeatTechnique912.source, sourceSHA |-> OccurrenceRepeatSHA912,card |-> OccurrenceRepeatCard912,repeat |-> [kind |-> "Fixed",node |-> 11904],modal |-> Empty9] OccurrenceFullRepeatFixture912 == LET selection == OccurrenceSelectionForTechniqueFixture912(OccurrenceRepeatTechnique912,OccurrenceRepeatWorld912) context == OccurrenceFirstContextFromEntryFixture912(selection,13200,13201,13202,132,32,NewExpectedRegistry99,NewWouldAccounting99) adoption == OccurrenceAdoptionFromContextFixture912(context,OccurrenceRepeatSpecification912) first == OccurrenceAdoptedContextValue912(adoption) q1 == OccurrenceReturnFromContextFixture912(first,1,34,13203) cp1 == OccurrenceCheckpointFixture912(q1,4,35) s2 == OccurrenceNextSelectionFixture912(cp1,13204) e1 == [first.expectedRegistry EXCEPT !.contexts[first.context.id]=q1.returnedContext] f2 == OccurrenceContextFromEntryFixture912(s2,13205,13206,13207,133,36,e1,first.history) q2 == OccurrenceReturnFromContextFixture912(f2,0,37,13208) cp2 == OccurrenceCheckpointFixture912(q2,5,39) s3 == OccurrenceNextSelectionFixture912(cp2,13209) e2 == [f2.expectedRegistry EXCEPT !.contexts[f2.context.id]=q2.returnedContext] f3 == OccurrenceContextFromEntryFixture912(s3,13210,13211,13212,134,40,e2,f2.history) q3 == OccurrenceCountedReturnFromContextFixture912(f3,"NoValue",41,13213,1) cp3 == OccurrenceCheckpointFixture912(q3,6,43) s4 == OccurrenceNextSelectionFixture912(cp3,13214) e3 == [f3.expectedRegistry EXCEPT !.contexts[f3.context.id]=q3.returnedContext] f4 == OccurrenceContextFromEntryFixture912(s4,13215,13216,13217,135,44,e3,f3.history) q4 == OccurrenceReturnFromContextFixture912(f4,2,45,13218) cp4 == OccurrenceCheckpointFixture912(q4,7,47) s5 == OccurrenceNextSelectionFixture912(cp4,13219) e4 == [f4.expectedRegistry EXCEPT !.contexts[f4.context.id]=q4.returnedContext] f5 == OccurrenceContextFromEntryFixture912(s5,13220,13221,13222,136,48,e4,f4.history) q5 == OccurrenceReturnFromContextFixture912(f5,0,49,0) cp5 == OccurrenceCheckpointFixture912(q5,8,51) receipt == PaidReturnFixture95(s5.busy,8) afterStack == <> returned == [cp5.ready EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN [adoption |-> adoption,first |-> first,q1 |-> q1,cp1 |-> cp1,s2 |-> s2,f2 |-> f2,q2 |-> q2,cp2 |-> cp2,s3 |-> s3,f3 |-> f3, q3 |-> q3,cp3 |-> cp3,s4 |-> s4,f4 |-> f4,q4 |-> q4,cp4 |-> cp4,s5 |-> s5,f5 |-> f5,q5 |-> q5,cp5 |-> cp5, receipt |-> receipt,afterStack |-> afterStack,returned |-> returned] OccurrenceFullRepeatProtocolChecks912 == LET p == OccurrenceFullRepeatFixture912 IN /\ OccurrenceAdoptionValid912(p.adoption) /\ OccurrenceReturnProtocolValid912(p.q1) /\ OccurrenceCheckpointValid912(p.cp1) /\ OccurrenceNextSelectionValid912(p.cp1,p.s2) /\ OccurrenceContextProtocolValid912(p.f2) /\ OccurrenceReturnProtocolValid912(p.q2) /\ OccurrenceCheckpointValid912(p.cp2) /\ OccurrenceNextSelectionValid912(p.cp2,p.s3) /\ OccurrenceContextProtocolValid912(p.f3) /\ OccurrenceReturnProtocolValid912(p.q3) /\ OccurrenceCheckpointValid912(p.cp3) /\ OccurrenceNextSelectionValid912(p.cp3,p.s4) /\ OccurrenceContextProtocolValid912(p.f4) /\ OccurrenceReturnProtocolValid912(p.q4) /\ OccurrenceCheckpointValid912(p.cp4) /\ OccurrenceNextSelectionValid912(p.cp4,p.s5) /\ OccurrenceContextProtocolValid912(p.f5) /\ OccurrenceReturnProtocolValid912(p.q5) /\ OccurrenceCheckpointValid912(p.cp5) /\ ReturnConditionalOccurrence912(<>,p.afterStack,p.cp5.ready,p.returned,p.cp5.ledger,p.receipt,p.cp5.registry,p.cp5.authority) /\ p.q3.after.repeat.pass=1 /\ p.q3.after.repeat.total=1 /\ p.q3.after.repeat.remaining=0 /\ ~p.q3.after.ability.lastFinished /\ p.q3.candidate.instances[p.q3.after.id].status="Resolving" /\ p.q3.after.id \notin p.q3.authority.current.finishedInstances /\ p.returned.trace= <<11901,13203,13208,13213,13218>> /\ p.returned.repeat.captured /\ p.returned.repeat.total=1 /\ p.returned.choices[11901].option=1 /\ p.returned.choices[13213].option=2 /\ p.returned.technique=p.first.atomicR.technique /\ p.returned.ability.source=p.first.atomicR.ability.source /\ p.returned.metadata=p.first.atomicR.metadata /\ DOMAIN p.cp5.ledger.instances[p.returned.id].expected=1..5 OccurrenceFixedCountBindingChecks912 == LET q == OccurrenceFullRepeatFixture912.q3 IN \A capture \in {[q.op.capture EXCEPT !.source=ObjectAbilitySource9(2)], [q.op.capture EXCEPT !.snapshotId=@+1],[q.op.capture EXCEPT !.contextId=@+1], [q.op.capture EXCEPT !.directive=11903],[q.op.capture EXCEPT !.instance=@+1]} : ~FinishOccurrenceInstruction912(q.f.atomicR,q.after,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, q.control,[tag |-> "NoInstructionPayment"],q.op.boundary,q.op.nextId,capture) OccurrenceNoRecaptureChecks912 == LET p == OccurrenceFullRepeatFixture912 q == p.q5 recapture == [p.q3.op.capture EXCEPT !.count=5,!.contextId=q.f.currentContext.id, !.instruction=q.f.currentContext.currentRef,!.snapshotId=q.actualReturn.snapshotId,!.completion=q.actualReturn] IN /\ p.q3.after.repeat.captured /\ q.f.atomicR.repeat.total=1 /\ ~FinishOccurrenceInstruction912(q.f.atomicR,q.after,q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step, q.control,[tag |-> "NoInstructionPayment"],q.op.boundary,0,recapture) OccurrenceIntermediateLifetimeChecks912 == LET p == OccurrenceFullRepeatFixture912 q == p.q3 terminalAbility == [q.after.ability EXCEPT !.instructions=Append(q.f.atomicR.trace,q.f.atomicR.current), !.phase="Complete",!.lastFinished=TRUE,!.complete=TRUE] terminal == [q.after EXCEPT !.ability=terminalAbility,!.current=0,!.pc=0] candidate == [q.candidate EXCEPT !.instances[q.after.id].status="Complete"] IN /\ q.after.repeat.pass=1 /\ ~q.after.ability.complete /\ ~FinishConditionalOccurrenceCore912(q.f.atomicLedger,candidate,<>,<>,q.f.atomicR,terminal, q.f.atomicPlan,q.op.afterPlan,q.f.currentContext,q.actualReturn,q.step,q.control,[tag |-> "NoInstructionPayment"],q.op.boundary,0,q.op.capture) OccurrenceUseBoundaryFixture912(used) == LET f == OccurrenceFullRepeatFixture912.f4 old == f.atomicR.technique.definition syntax == [old.syntax EXCEPT !.units= <> \o @] d == [old EXCEPT !.syntax=syntax,!.optionalParts={1}] p == [f.atomicR.technique EXCEPT !.definition=d,!.lexemes.definition=d,!.originalUnits=syntax.units] r == [f.atomicR EXCEPT !.technique=p,!.specification.definition=d] ledger == [f.atomicLedger EXCEPT !.instances[r.id].definitionCopy=d,!.instances[r.id].used=used,!.instances[r.id].member=ConditionalMember96(r.id,d,r.metadata.windowId,f.atomicLedger.instances[r.id].member.group)] lifeWorld == [f.atomicWorld EXCEPT !.activity.instances[r.id].owner=OccurrenceLookOwner912(r)] authority == NewLifetimeAuthority910(lifeWorld) registry == [f.atomicRegistry EXCEPT !.frontier=LifetimeFrontier910(authority,1)] world == [f.currentWorld EXCEPT !.conditional=[@ EXCEPT !.definitions[ConditionalKey96(d)]=d]] execution == ConditionalExecutionFixture96([id |-> r.id,ability |-> r.ability],f.atomicPlan,{1}) event == [tag |-> "AbilityUsed",useId |-> 13401,abilityInstance |-> r.id,source |-> r.ability.source,player |-> d.syntax.controller] uses == [id \in {13401} |-> event] turnUses == [id \in {13401} |-> [turnId |-> r.metadata.turnId,ability |-> d.syntax.id,source |-> d.syntax.source,useId |-> 13401]] IN [f |-> f,d |-> d,r |-> r,ledger |-> ledger,lifeWorld |-> lifeWorld,authority |-> authority,registry |-> registry, world |-> world,execution |-> execution,event |-> event,uses |-> uses,turnUses |-> turnUses] OccurrenceUseAcrossPassesChecks912 == LET f == OccurrenceUseBoundaryFixture912(FALSE) after == [f.ledger EXCEPT !.instances[f.r.id].used=TRUE] continued == [f.world EXCEPT !.turnUses=f.turnUses] IN /\ ConditionalDefinitionValid96(f.d) /\ f.r.repeat.pass=1 /\ RecordConditionalOccurrenceUse912(f.ledger,after,f.r,f.f.atomicPlan,f.execution,Empty9,f.uses,Empty9,f.turnUses, 13401,{f.event},f.world,f.registry,f.authority) /\ RecordConditionalOccurrenceUse912(after,after,f.r,f.f.atomicPlan,f.execution,f.uses,f.uses,f.turnUses,f.turnUses, 0,{},continued,f.registry,f.authority) OccurrenceUsePointLimitChecks912 == LET f == OccurrenceUseBoundaryFixture912(FALSE) beforeTurnUses == [id \in {13400} |-> [turnId |-> f.r.metadata.turnId,ability |-> f.d.syntax.id,source |-> f.d.syntax.source,useId |-> 13400]] afterTurnUses == ReplacementOverlay99(beforeTurnUses,f.turnUses) world == [f.world EXCEPT !.turnUses=beforeTurnUses] after == [f.ledger EXCEPT !.instances[f.r.id].used=TRUE] IN /\ ~RecordConditionalOccurrenceUse912(f.ledger,after,f.r,f.f.atomicPlan,f.execution,Empty9,f.uses,beforeTurnUses,afterTurnUses, 13401,{f.event},world,f.registry,f.authority) OccurrenceSuppressedFixedBadFixture912(removed) == LET q == OccurrenceFullRepeatFixture912.q3 effects == IF removed THEN Empty9 ELSE [q.f.currentContext.actualEffects EXCEPT ![1].requested=FALSE] context == [q.f.currentContext EXCEPT !.actualEffects=effects] returned == [q.actualReturn EXCEPT !.effects=effects] control == [q.control EXCEPT !.mode=IF removed THEN "Removed" ELSE "Selected",!.requested=FALSE, !.actualEffects=effects,!.completion=returned] step == [q.step EXCEPT !.expectedReturn=returned] capture == [q.op.capture EXCEPT !.completion=returned] forced == OccurrenceAfterStepFixture912(q.f.atomicR,context,[control EXCEPT !.mode="Selected",!.requested=TRUE],14850,capture) badAfter == [forced EXCEPT !.choices[q.f.atomicR.current]=control] IN [q |-> q,context |-> context,returned |-> returned,control |-> control,step |-> step,capture |-> capture,badAfter |-> badAfter] OccurrenceSuppressedFixedAdmission912(f) == LET q == f.q IN FinishOccurrenceInstruction912(q.f.atomicR,f.badAfter,q.f.atomicPlan,q.op.afterPlan,f.context,f.returned,f.step,f.control, [tag |-> "NoInstructionPayment"],q.op.boundary,14850,f.capture) OccurrenceSuppressedFixedArmingGuardChecks912 == \A removed \in BOOLEAN : ~OccurrenceSuppressedFixedAdmission912(OccurrenceSuppressedFixedBadFixture912(removed)) OccurrenceUnboundedRepeatChecks912 == LET base == OccurrenceFullRepeatFixture912.f3.atomicR r == [base EXCEPT !.specification.repeat.kind="Unbounded"] first == OccurrenceStandaloneStepFixture912(r,"Repeat",14600,TRUE,0) choice == OccurrenceStandaloneStepFixture912(first.after,2,14601,FALSE,0) effect == OccurrenceStandaloneStepFixture912(choice.after,0,14602,FALSE,0) last == OccurrenceStandaloneStepFixture912(effect.after,"Stop",0,FALSE,0) IN /\ OccurrenceStepValid912(first) /\ OccurrenceStepValid912(choice) /\ OccurrenceStepValid912(effect) /\ OccurrenceStepValid912(last) /\ first.after.repeat.pass=1 /\ first.after.pc=base.technique.entry /\ ~first.after.ability.lastFinished /\ effect.after.pc=r.specification.repeat.node /\ effect.after.current#base.current /\ last.after.current=0 /\ last.after.ability.lastFinished /\ last.after.id=r.id /\ last.after.metadata=r.metadata /\ last.after.technique=r.technique OccurrenceZeroFixedCountChecks912 == LET r == OccurrenceFullRepeatFixture912.f3.atomicR f == OccurrenceStandaloneStepFixture912(r,"NoValue",0,TRUE,0) IN /\ OccurrenceStepValid912(f) /\ f.after.repeat.captured /\ f.after.repeat.total=0 /\ f.after.current=0 /\ f.after.ability.complete /\ f.after.repeat.pass=0 OccurrenceStaticBoundaryFixture912(terminal,nonempty,missing) == LET p == OccurrenceFullRepeatFixture912 q == IF terminal THEN p.q5 ELSE p.q3 old == q.f.atomicR.technique.definition d == [old EXCEPT !.primaryKind="Static",!.syntax.units[1].subtype="Static"] technique == [q.f.atomicR.technique EXCEPT !.definition=d,!.lexemes.definition=d,!.originalUnits=d.syntax.units] before == [q.f.atomicR EXCEPT !.technique=technique,!.specification.definition=d] after == [q.after EXCEPT !.technique=technique,!.specification.definition=d] expected == [i \in (DOMAIN q.f.atomicLedger.instances[before.id].expected) \ (IF missing THEN {1} ELSE {}) |-> [q.f.atomicLedger.instances[before.id].expected[i] EXCEPT !.effects=IF nonempty /\ i=1 THEN {"ExpectedPart"} ELSE {}]] ledger == [q.f.atomicLedger EXCEPT !.stepSerial=7,!.instances[before.id].definitionCopy=d, !.instances[before.id].primaryKind="Static",!.instances[before.id].expected=expected] candidate == [ledger EXCEPT !.instances[before.id].status=IF terminal THEN "Complete" ELSE "Resolving", !.throttle=IF terminal /\ ~nonempty /\ ~missing THEN [key \in {ConditionalKey96(d)} |-> 7] ELSE @] capture == IF terminal THEN q.op.capture ELSE [q.op.capture EXCEPT !.definition=d] IN [q |-> q,d |-> d,before |-> before,after |-> after,ledger |-> ledger,candidate |-> candidate,capture |-> capture] OccurrenceStaticBoundaryValid912(f) == FinishConditionalOccurrenceCore912(f.ledger,f.candidate,<>,<>,f.before,f.after, f.q.f.atomicPlan,f.q.op.afterPlan,f.q.f.currentContext,f.q.actualReturn,f.q.step,f.q.control,[tag |-> "NoInstructionPayment"], f.q.op.boundary,f.q.op.nextId,f.capture) OccurrenceStaticOuterTerminalChecks912 == LET middle == OccurrenceStaticBoundaryFixture912(FALSE,FALSE,FALSE) last == OccurrenceStaticBoundaryFixture912(TRUE,FALSE,FALSE) nonempty == OccurrenceStaticBoundaryFixture912(TRUE,TRUE,FALSE) IN /\ ConditionalDefinitionValid96(last.d) /\ OccurrenceStaticBoundaryValid912(middle) /\ middle.candidate.throttle=Empty9 /\ OccurrenceStaticBoundaryValid912(last) /\ last.candidate.throttle[ConditionalKey96(last.d)]=7 /\ Len(last.after.trace)=5 /\ Len(last.d.instructions)=4 /\ OccurrenceStaticBoundaryValid912(nonempty) /\ nonempty.candidate.throttle=Empty9 /\ ~StaticRetryAllowed96(last.d,last.candidate) /\ StaticRetryAllowed96(last.d,[last.candidate EXCEPT !.stepSerial=8]) OccurrenceStaticCompleteHistoryGuardChecks912 == LET f == OccurrenceStaticBoundaryFixture912(TRUE,FALSE,TRUE) IN /\ DOMAIN f.ledger.instances[f.before.id].expected=2..5 /\ ~OccurrenceStaticBoundaryValid912(f) OccurrenceOwnedRepeatHistoryGuardChecks912 == LET q == OccurrenceFullRepeatFixture912.q5 before == [q.f.atomicR EXCEPT !.repeat.remaining=1,!.repeat.total=2] after == OccurrenceAfterStepFixture912(before,q.f.currentContext,q.control,14800,q.op.capture) g == OccurrenceForgedPublicationFixture912(q,before,after,14800) IN /\ after.repeat.pass=2 /\ after.current=14800 /\ ~after.ability.complete /\ ~OccurrenceForgedPublicationAccepted912(g) OccurrenceSuppressedFixedFixture912(removed) == LET q == OccurrenceFullRepeatFixture912.q3 effects == IF removed THEN Empty9 ELSE [q.f.currentContext.actualEffects EXCEPT ![1].requested=FALSE] context == [q.f.currentContext EXCEPT !.actualEffects=effects] returned == [q.actualReturn EXCEPT !.effects=effects] control == [q.control EXCEPT !.mode=IF removed THEN "Removed" ELSE "Selected",!.requested=FALSE, !.actualEffects=effects,!.completion=returned] step == [q.step EXCEPT !.expectedReturn=returned] noCapture == [tag |-> "NoRepetitionCount"] after == OccurrenceAfterStepFixture912(q.f.atomicR,context,control,0,noCapture) capture == [q.op.capture EXCEPT !.completion=returned] forcedControl == [control EXCEPT !.mode="Selected",!.requested=TRUE] forced == OccurrenceAfterStepFixture912(q.f.atomicR,context,forcedControl,14850,capture) badAfter == [forced EXCEPT !.choices[q.f.atomicR.current]=control] IN [q |-> q,context |-> context,returned |-> returned,control |-> control,step |-> step,noCapture |-> noCapture, after |-> after,capture |-> capture,badAfter |-> badAfter] OccurrenceSuppressedFixedChecks912 == \A removed \in BOOLEAN : LET f == OccurrenceSuppressedFixedFixture912(removed) q == f.q IN /\ FinishOccurrenceInstruction912(q.f.atomicR,f.after,q.f.atomicPlan,q.op.afterPlan,f.context,f.returned,f.step,f.control, [tag |-> "NoInstructionPayment"],q.op.boundary,0,f.noCapture) /\ f.after.current=0 /\ ~f.after.repeat.captured /\ f.after.repeat.pass=0 /\ ~FinishOccurrenceInstruction912(q.f.atomicR,f.badAfter,q.f.atomicPlan,q.op.afterPlan,f.context,f.returned,f.step,f.control, [tag |-> "NoInstructionPayment"],q.op.boundary,14850,f.capture) OccurrenceFixedEmptyBodyScopeChecks912 == LET spec == OccurrenceRepeatSpecification912 p == [OccurrenceRepeatTechnique912 EXCEPT !.nodes=[id \in {11904} |-> @ [id]]] IN /\ ~OccurrenceSpecificationShapeSupported912(spec,p) /\ OccurrenceSpecificationShapeSupported912([spec EXCEPT !.repeat.kind="Unbounded"],p) OccurrenceCommittedCard912 == "structural_committed_quota_912" OccurrenceCommittedText912 == "SyntheticTextab2ff0b760f3" OccurrenceCommittedSHA912 == "d6ad2e46fb4e8515da621c3eaa4ac3e115445dd54b775cb672cceeae508723ee" OccurrenceCommittedFacts912 == ReplacementOverlay99(CardFacts9,[card \in {OccurrenceCommittedCard912} |-> [kind |-> "Objective",side |-> "SideA",hasRulesText |-> TRUE,sourceSHA |-> OccurrenceCommittedSHA912]]) OccurrenceCommittedObjects912 == [RootBranchObjects911 EXCEPT ![1].card=OccurrenceCommittedCard912] OccurrenceCommittedTechnique912 == LET p == OccurrenceSourceTechnique912 d == [p.definition EXCEPT !.instructions= <<11899>> \o @, !.partsByInstruction=ReplacementOverlay99(@,[id \in {11899} |-> {1}])] unit == [category |-> "Trait",shape |-> "Options",sentence |-> 0, optionInstructions |-> [i \in 1..2 |-> <<>>], quotaByOption |-> [i \in 1..2 |-> [maximum |-> i,upTo |-> FALSE]]] IN [p EXCEPT !.entry=11899,!.definition=d,!.card=OccurrenceCommittedCard912,!.sourceSHA=OccurrenceCommittedSHA912, !.lexemes=LexicalReceiptFixture99(d,OccurrenceCommittedCard912,Empty9,OccurrenceCommittedFacts912), !.nodes=ReplacementOverlay99(@,[id \in {11899} |-> InstructionNode911(id,"Choice",<<"CommitQuota">>,FALSE,11901,[i \in 1..2 |-> 11901],4,{0})]), !.units=ReplacementOverlay99(@,[id \in {0} |-> unit]), !.groups= <<[rule |-> "ProcedureCodef6fc0286cf28",units |-> {0},nodes |-> <<11899>>,join |-> 11901]>> \o @] OccurrenceCommittedBoundaryFixture912 == LET p == OccurrenceCommittedTechnique912 base == OccurrenceFullModalFixture912.first.atomicR spec == [OccurrenceSpecificationFixture912(p) EXCEPT !.modal[11901].quotaPolicy="Committed",!.modal[11901].maximum=1] commitment == [tag |-> "SourceQuotaCommitment",definition |-> p.definition,source |-> p.source,sourceSHA |-> p.sourceSHA, node |-> 11899,unit |-> 0,quotaByOption |-> p.units[0].quotaByOption] actualSpec == [spec EXCEPT !.modal[11901]=ReplacementOverlay99(@,[commitment |-> commitment])] priorPlan == OpenInstruction93(11899,"Ability",base.id,base.ability.source,base.ability.sourceZone,1,"NoValue",<<"CommitQuota">>,FALSE) priorControl == [tag |-> "ResolvedInstructionControl",instance |-> base.id,node |-> 11899, instruction |-> InstructionWindowRef93(priorPlan),mode |-> "Selected",option |-> 1] r == [base EXCEPT !.technique=p,!.specification=actualSpec,!.current=14801,!.pc=11901,!.trace= <<11899>>, !.ability.instructions= <<11899,14801>>,!.ability.cursor=2, !.occurrences=[id \in {11899,14801} |-> [id |-> id,sourceNode |-> IF id=11899 THEN 11899 ELSE 11901,pass |-> 0]], !.usedOccurrences={11899,14801},!.choices=[id \in {11899} |-> priorControl],!.modal=OccurrenceModalInitial912(actualSpec,0)] step == OccurrenceStandaloneStepFixture912(r,1,14802,FALSE,0) IN [p |-> p,spec |-> actualSpec,r |-> r,step |-> step] OccurrenceCommittedQuotaChecks912 == LET f == OccurrenceCommittedBoundaryFixture912 alternative == [f.r EXCEPT !.choices[11899].option=2] SchemaAtom187 == OccurrenceStandaloneStepFixture912(alternative,1,14802,FALSE,0) context == [f.step.context EXCEPT !.actualEffects[1].maximum=2] returned == [f.step.returned EXCEPT !.effects=context.actualEffects] control == [f.step.control EXCEPT !.maximum=2,!.actualEffects=context.actualEffects,!.completion=returned] after == OccurrenceAfterStepFixture912(f.r,context,control,f.step.nextId,f.step.capture) step == [f.step.step EXCEPT !.expectedReturn=returned] IN /\ OccurrenceSpecificationValid912(f.spec,f.p,OccurrenceCommittedObjects912,OccurrenceCommittedFacts912) /\ OccurrenceStepValid912(f.step) /\ f.step.after.modal[11901].maximum=1 /\ OccurrenceStepValid912(SchemaAtom187) /\ SchemaAtom187.after.modal[11901].maximum=2 /\ f.r.technique=alternative.technique /\ f.r.specification=alternative.specification /\ ~FinishOccurrenceInstruction912(f.r,after,f.step.plan,f.step.afterPlan,context,returned,step, control,[tag |-> "NoInstructionPayment"],f.step.boundary,f.step.nextId,f.step.capture) OccurrenceTerminalFromCallerFixture912(f) == LET old == f.runtime spec == [tag |-> "OccurrenceTechniqueSpecification",definition |-> old.technique.definition,source |-> old.technique.source, sourceSHA |-> old.technique.sourceSHA,card |-> old.technique.card,repeat |-> [kind |-> "NoValue",node |-> 0],modal |-> Empty9] seed == NewOccurrenceRuntime912([old EXCEPT !.pc=old.technique.entry],spec) r == [seed EXCEPT !.ability=old.ability,!.phase="Complete",!.checkpoint=old.checkpoint,!.current=0,!.pc=0, !.trace=old.visited,!.usedOccurrences=SubIds6(old.visited), !.occurrences=[id \in SubIds6(old.visited) |-> [id |-> id,sourceNode |-> id,pass |-> 0]]] world == [f.world EXCEPT !.activity.instances[r.id].owner=OccurrenceLookOwner912(r)] authority == NewLifetimeAuthority910(world) registry == [f.lifetimes EXCEPT !.frontier=LifetimeFrontier910(authority,1)] returned == [r EXCEPT !.ability.returned=TRUE,!.phase="Returned"] IN [r |-> r,world |-> world,authority |-> authority,registry |-> registry,returned |-> returned] OccurrencePaidCallerChecks912 == LET f == CallerPaidFixture911 g == OccurrenceTerminalFromCallerFixture912(f.terminal) IN /\ CallerPaidValid911(f) /\ SourceOccurrenceBound912(g.r) /\ ReturnPaidOccurrence912(<>,f.afterStack,g.r,g.returned,f.afterProcedure,f.receipt,f.objects,Empty9,g.registry,g.authority) /\ f.afterProcedure.transaction=g.r.metadata.sourceEntry.after.transaction /\ f.afterProcedure.costPaid /\ ~ReturnPaidOccurrence912(<>,f.afterStack,g.r,g.returned,[f.afterProcedure EXCEPT !.costPaid=FALSE], f.receipt,f.objects,Empty9,g.registry,g.authority) OccurrencePlayCallerChecks912 == LET f == CallerPlayFixture911 g == OccurrenceTerminalFromCallerFixture912(f.terminal) IN /\ CallerPlayValid911(f) /\ SourceOccurrenceBound912(g.r) /\ ReturnPlayOccurrence912(g.r,g.returned,f.s.imminent,f.afterCohort,f.s.f,<>,g.registry,g.authority) /\ ~g.r.ability.detached /\ g.returned.ability.caller=f.s.f.id /\ ~ReturnPlayOccurrence912(g.r,g.returned,f.s.imminent,[f.afterCohort EXCEPT !.dispositions[9930].disposition="Prevented"], f.s.f,<>,g.registry,g.authority) OccurrenceMidItemInspectionCallerChecks912 == LET f == CallerMidItemInspectionFixture911 g == OccurrenceTerminalFromCallerFixture912(f.terminal) IN /\ CallerMidItemInspectionValid911(f) /\ SourceOccurrenceBound912(g.r) /\ ReturnMidItemInspectionOccurrence912(<>,f.afterStack,g.r,g.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,f.ended,f.afterItemInspection,g.registry,g.authority) /\ ~ReturnPaidOccurrence912(<>,f.afterStack,g.r,g.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,g.registry,g.authority) /\ ~ReturnMidItemInspectionOccurrence912(<>,f.afterStack,g.r,g.returned,f.afterProcedure,f.receipt, f.movedObjects,Empty9,f.ended,[f.afterItemInspection EXCEPT !.midResolving=TRUE],g.registry,g.authority) OccurrenceDonorCallerChecks912 == LET f == CallerNestedFixture911 g == OccurrenceTerminalFromCallerFixture912(f.terminal) forgedCalls == [f.calls EXCEPT ![12601].source=ObjectAbilitySource9(2)] forgedAfter == [forgedCalls EXCEPT ![12601].status="Returned",![12601].disposition="Resolved"] IN /\ CallerNestedValid911(f) /\ SourceOccurrenceBound912(g.r) /\ ReturnNestedBarrierInstructionOccurrence912(g.r,g.returned,f.calls,f.afterCalls,f.parent.resolvingPlan, f.parent.resolving.ability,"NoValue",<<>>,f.receipt,g.registry,g.authority) /\ g.r.ability.source=ObjectAbilitySource9(4) /\ ResolvedBarrierInstructionCount98(f.s.selected,f.afterCalls,4,20)=1 /\ ~ReturnNestedBarrierInstructionOccurrence912(g.r,g.returned,forgedCalls,forgedAfter,f.parent.resolvingPlan, f.parent.resolving.ability,"NoValue",<<>>,f.receipt,g.registry,g.authority) NamedModalTechniqueFixture912(card) == LET kpi == card="Specimen0128" bodyIds == IF kpi THEN [mode \in 1..4 |-> CASE mode=1 -> <<14002,14003>> [] mode=2 -> <<14004>> [] mode=3 -> <<14005>> [] OTHER -> <<14006>>] ELSE [mode \in 1..2 |-> <<14001+mode>>] ids == {14001} \cup UNION {SubIds6(bodyIds[mode]) : mode \in DOMAIN bodyIds} syntax == SyntaxFixture93(14000,"Play",CardFacts9[card].side,CardFacts9[card].kind,<>) raw == ConditionalDefinitionFixture96(14000,card,"Trigger","StructuralEvent","SchemaAtom016","SchemaAtom016","SchemaAtom016") d == [raw EXCEPT !.syntax=syntax,!.activity.kind="Play",!.instructions=IF kpi THEN <<14001,14002,14003,14004,14005,14006>> ELSE <<14001,14002,14003>>, !.partsByInstruction=[id \in ids |-> {1}]] steps == [id \in ids |-> IF id=14001 THEN <<"ChooseNextMode">> ELSE IF kpi THEN CASE id=14002 -> <<"Draw1">> [] id=14003 -> <<"Shuffle1FromCentralA">> [] id=14004 -> <<"DeployBarrierIgnoreCosts">> [] id=14005 -> <<"PlaceProgress">> [] OTHER -> <<"Gain2">> ELSE IF card="Specimen0210" THEN IF id=14002 THEN <<"Remove2LiabilityMarker">> ELSE <<"ChosenSideBCardToDrawPile">> ELSE IF id=14002 THEN <<"Gain6">> ELSE <<"Draw4">>] nodes == [id \in ids |-> IF id=14001 THEN InstructionNode911(id,"Choice",steps[id],FALSE,0, [mode \in DOMAIN bodyIds |-> Head(bodyIds[mode])],3,{1}) ELSE InstructionNode911(id,"Plain",steps[id],card="Specimen0210" /\ id=14003, IF kpi /\ id=14002 THEN 14003 ELSE 0,Empty9,IF kpi /\ id=14002 THEN 2 ELSE 1,{1})] IN [tag |-> "NormalizedInstructionTechnique",source |-> syntax.source,ability |-> syntax.id,definition |-> d,nodes |-> nodes,entry |-> 14001, units |-> [id \in {1} |-> [category |-> "Trait",shape |-> "Options",sentence |-> 1,optionInstructions |-> bodyIds]], groups |-> <<[rule |-> "ProcedureCodef6fc0286cf28",units |-> {1},nodes |-> d.instructions,join |-> 0]>>,nonoperative |-> {},linked |-> {}, lexemes |-> LexicalReceiptFixture99(d,card,Empty9,CardFacts9),sourceSHA |-> CardFacts9[card].sourceSHA,card |-> card,originalUnits |-> syntax.units] NamedModalControlFixture912(card) == LET p == NamedModalTechniqueFixture912(card) bodies == p.units[1].optionInstructions chooser == IF card="Specimen0210" THEN "SideB" ELSE "SideA" spec == [tag |-> "OccurrenceTechniqueSpecification",definition |-> p.definition,source |-> p.source,sourceSHA |-> p.sourceSHA,card |-> card, repeat |-> [kind |-> "NoValue",node |-> 0],modal |-> [selector \in {14001} |-> [selector |-> 14001,quotaPolicy |-> "Fixed", maximum |-> IF card="Specimen0128" THEN 2 ELSE 1,upTo |-> FALSE,allowRepeat |-> FALSE,chooser |-> chooser,bodies |-> bodies,join |-> 0]]] base == ReplacementOverlay99(NewInstructionRuntime911(14010,p,"Play","Play",14020), [sourceEntry |-> [tag |-> "InitializedControlComponent"],sourceOwner |-> [windowId |-> 0,option |-> [id |-> 0],transaction |-> 0]]) r == [NewOccurrenceRuntime912(base,spec) EXCEPT !.phase="Resolve",!.ability.phase="Resolving",!.ability.firstImminent=TRUE] objects == [id \in {1} |-> CardObject9(card,"Play",FALSE,"Up")] IN [p |-> p,r |-> r,objects |-> objects,chooser |-> chooser] NamedModalFirstStepFixture912(f,mode) == LET initial == OccurrenceStandaloneStepFixture912(f.r,mode,14011,FALSE,0) context == [initial.context EXCEPT !.actualEffects[1].chooser=f.chooser,!.actualEffects[1].actor=f.chooser, !.actualEffects[1].baseController=f.p.definition.syntax.controller] IN OccurrenceStepFixture912(initial.before,context,initial.plan,[id |-> 1],mode,14011,0) OccurrencePinnedKPIModeChecks912 == LET f == NamedModalControlFixture912("Specimen0128") selector == NamedModalFirstStepFixture912(f,1) draw == OccurrenceStandaloneStepFixture912(selector.after,0,14012,FALSE,0) shuffle == OccurrenceStandaloneStepFixture912(draw.after,0,14013,FALSE,0) IN /\ OccurrenceSpecificationValid912(f.r.specification,f.p,f.objects,CardFacts9) /\ f.p.definition.syntax.kind="Play" /\ CardFacts9[f.p.card].kind="Plan" /\ OccurrenceStepValid912(selector) /\ selector.after.pc=14002 /\ OccurrenceStepValid912(draw) /\ draw.after.pc=14003 /\ ~draw.after.ability.lastFinished /\ OccurrenceStepValid912(shuffle) /\ shuffle.after.pc=14001 /\ shuffle.after.current=14013 /\ selector.after.technique=f.p /\ f.p.nodes[14002].steps= <<"Draw1">> /\ f.p.nodes[14003].steps= <<"Shuffle1FromCentralA">> OccurrencePinnedModalChoosersChecks912 == \A card \in {"Specimen0210","Specimen0266"} : LET f == NamedModalControlFixture912(card) step == NamedModalFirstStepFixture912(f,2) IN /\ OccurrenceSpecificationValid912(f.r.specification,f.p,f.objects,CardFacts9) /\ f.chooser#f.p.definition.syntax.controller /\ OccurrenceStepValid912(step) /\ step.control.chooser=f.chooser /\ step.after.pc=14003 Specimen0261StableQuotaFixture912(objects,source) == IF \E id \in DOMAIN objects \ {source} : objects[id].kind="Facility" /\ objects[id].deployed /\ ActivationStatus8(objects[id])="ItemActivated" THEN [maximum |-> 1,upTo |-> FALSE] ELSE [maximum |-> 3,upTo |-> TRUE] OccurrencePinnedSpecimen0261StableQuotaChecks912 == LET only == [id \in {1} |-> [CardObject9("Specimen0261","Play",TRUE,"Up") EXCEPT !.activated=TRUE]] unactivationzed == ReplacementOverlay99(only,[id \in {2} |-> CardObject9("Specimen0110","Play",TRUE,"Down")]) activated == [unactivationzed EXCEPT ![2].activated=TRUE,![2].face="Up"] upgrade == ReplacementOverlay99(only,[id \in {2} |-> [CardObject9("Specimen0198","Play",TRUE,"Up") EXCEPT !.activated=TRUE]]) IN /\ Specimen0261StableQuotaFixture912(only,1)=[maximum |-> 3,upTo |-> TRUE] /\ Specimen0261StableQuotaFixture912(unactivationzed,1)=[maximum |-> 3,upTo |-> TRUE] /\ Specimen0261StableQuotaFixture912(activated,1)=[maximum |-> 1,upTo |-> FALSE] /\ Specimen0261StableQuotaFixture912(upgrade,1)=[maximum |-> 3,upTo |-> TRUE] OccurrenceDelayedCreationFixture912(repeated) == LET source == RuleAbilitySource9("StructuralDelayedFactory911") raw == ConditionalDefinitionFixture96(12900,"Specimen0007","Trigger","StructuralOccurrence","SchemaAtom016","SideB","SideB") template == [raw EXCEPT !.instructions=IF repeated THEN <<700,701,702,703>> ELSE @, !.partsByInstruction=IF repeated THEN [id \in {700,701,702,703} |-> {1}] ELSE @, !.syntax.source=source,!.syntax.cardKind="NoValue",!.activity.source=source,!.activity.provider="Rule"] plan == OpenInstruction93(12901,"Rule",0,source,"NoValue",0,source.rule,<<"CreateStructuralDelayed">>,FALSE) announced == [plan EXCEPT !.announced=TRUE] imminent == [announced EXCEPT !.phase="Imminent"] resolving == [imminent EXCEPT !.phase="Resolving"] origin == [kind |-> "Instruction",plan |-> resolving,parent |-> Empty9,ruleStep |-> source.rule] world == [LifetimeWorldFixture910 EXCEPT !.turn=TurnFixture92("SideB"),!.objects=Empty9,!.present={},!.encounters=Empty9,!.currentEncounter=0,!.barrierResponseCards={}, !.activity.activeRules={source.rule},!.activity.instances=Empty9] initial == [ConditionalSnapshotFixture96(1,0,"ProcedureCodee605a78f5d5e",Empty9,Empty9) EXCEPT !.activity=world.activity] seed == NewConditionalLedger96(initial) creation == DelayedCreationReceiptFixture96(template,resolving,NoTimingRef9,NoTimingRef9) created == DelayedCreatedFixture96(seed,12910,12920,template,resolving,creation,NoTraversal6) d == created.effects[12910].definition definitions == [key \in {ConditionalKey96(d)} |-> d] blueprints == [id \in {12910} |-> DelayedLifetimeBlueprint910(created.effects[id],origin,world)] context == [id |-> 12902,imminenceId |-> 12903,currentRef |-> InstructionWindowRef93(resolving),currentWorld |-> world.id, phase |-> "Resolving",actualEffects |-> [id \in {1} |-> [kind |-> "CreateLingering",blueprints |-> blueprints]]] execution == [tag |-> "LingeringEffectExecution",contextId |-> context.id,instruction |-> context.currentRef,operation |-> 1, snapshotId |-> world.id,source |-> source,blueprints |-> blueprints,carriedOut |-> TRUE] rows == [id \in {12910} |-> NewLingeringEffect910(id,blueprints[id],context,1,world)] registry == [NewLingeringRegistry910 EXCEPT !.effects=ObserveLingeringEffects910(rows,world),!.usedEffects={12910}, !.creations={LingeringCreationKey910(context,1)}] snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(ConditionalSnapshotFixture96(2,0,"CreatedDelayed",definitions,Empty9),created) EXCEPT !.activity=world.activity],registry,created,world) published == [created EXCEPT !.activationEpoch=snapshot.activationEpoch,!.activationSerial=snapshot.activationSerial] IN [source |-> source,template |-> template,plan |-> plan,announced |-> announced,imminent |-> imminent,resolving |-> resolving,origin |-> origin, world |-> world,initial |-> initial,seed |-> seed,creation |-> creation,created |-> created,d |-> d,definitions |-> definitions, context |-> context,execution |-> execution,registry |-> registry,snapshot |-> snapshot,published |-> published] OccurrenceDelayedResolvingFixture912(repeated) == LET f == OccurrenceDelayedCreationFixture912(repeated) initial == f.snapshot begin == [initial EXCEPT !.id=10,!.checkpointId=1,!.point="CheckpointBeginning"] current == [begin EXCEPT !.id=11,!.point="ProcedureCodee605a78f5d5e"] events == [id \in {12931,12932} |-> ConditionalEventFixture96(id,"StructuralOccurrence",0,"SideB","SideB",initial,12901)] cp1 == ConditionalCheckpointFixture96(f.published,1,begin,current,events) keys == {[definition |-> ConditionalKey96(f.d),occurrence |-> id] : id \in DOMAIN events} allocation == [key \in keys |-> IF key.occurrence=12931 THEN 12940 ELSE 12941] bindings == ConditionalBindingsFixture96(keys,1,12950,129) pending == ConditionalCommittedFixture96(f.published,f.definitions,cp1,allocation,bindings,Empty9) site == TurnPrioritySite9(f.world.turn,"ProcedureCode989abc27e0c6",10,2,TurnContextFixture92(f.world.turn,"ProcedureCode989abc27e0c6")) members == ConditionalWindowMembers96(pending.instances,12950) open == WindowFixture92(12950,"Reaction",site,members,129,NoTimingRef9) begin2 == [SnapshotWithConditionalRegistry96(current,pending) EXCEPT !.id=20,!.checkpointId=2,!.point="CheckpointBeginning"] current2 == [begin2 EXCEPT !.id=21,!.point="ProcedureCodee605a78f5d5e"] cp2 == [ConditionalCheckpointFixture96(pending,2,begin2,current2,Empty9) EXCEPT !.caller=ConditionalPriorityCaller96(open)] received == ConditionalCommittedFixture96(pending,f.definitions,cp2,Empty9,Empty9,Empty9) ready == [open EXCEPT !.stage="Ready",!.checkpoint=2] option == ConditionalOptionFixture92(ready,12940) busy == StartedFixture92(ready,option) p == OpenConditionalProcedure96(12940,f.d,ready,option,LegalityFixture92(ready,option).transactionId,"Rule") imminentP == [p EXCEPT !.phase="Imminent",!.ability.phase="Imminent",!.ability.firstImminent=TRUE,!.ability.detached=TRUE] selected == [received EXCEPT !.instances[12940].status="Imminent"] plan == OpenInstruction93(700,"Ability",12940,f.source,"Rule",1,"NoValue",<<"ResolveSyntheticDelayed">>,FALSE) imminentPlan == [plan EXCEPT !.announced=TRUE,!.phase="Imminent"] resolvingPlan == [imminentPlan EXCEPT !.phase="Resolving"] resolvingP == [imminentP EXCEPT !.phase="Resolve",!.ability.phase="Resolving"] effects == [id \in {1} |-> ReplacementOverlay99(ReplacementAtomFixture99(id,id,"StructuralDelayedEffect",FALSE,0), [value |-> 0,baseOrigin |-> f.source,actor |-> "SideB",baseController |-> "SideB",targetSite |-> "NoValue"])] expected == [tag |-> "ConditionalExpectedEffects",point |-> "ExpectedEffectsBeforeInterrupt",instruction |-> InstructionWindowRef93(imminentPlan),effects |-> ExpectedObservationSet99(effects)] ledger == [selected EXCEPT !.instances[12940].status="Resolving",!.instances[12940].expected=[i \in {1} |-> [instruction |-> InstructionWindowRef93(imminentPlan),effects |-> ExpectedObservationSet99(effects)]]] technique == LifetimeTechniqueFixture911(f.d,IF repeated THEN [id \in {700,701,702,703} |-> CASE id=700 -> InstructionNode911(id,"Choice",<<"ChooseGainOrDraw">>,FALSE,703,[i \in 1..2 |-> IF i=1 THEN 701 ELSE 702],3,{1}) [] id=701 -> InstructionNode911(id,"Plain",<<"Gain">>,FALSE,703,Empty9,2,{1}) [] id=702 -> InstructionNode911(id,"Plain",<<"Draw">>,FALSE,703,Empty9,2,{1}) [] OTHER -> InstructionNode911(id,"Plain",<<"Repeat">>,FALSE,0,Empty9,1,{1})] ELSE [id \in {700} |-> InstructionNode911(700,"Plain",resolvingPlan.steps,FALSE,0,Empty9,1,{1})],700) base == OpenConditionalRuntime911(12940,technique,ready,option,p.transaction,"Rule") r == [base EXCEPT !.phase="Resolve",!.ability=[resolvingP.ability EXCEPT !.instructions= <<700>>]] world0 == [f.world EXCEPT !.id=21,!.activity.instances=ReplacementOverlay99(ConditionalActivityRows96(ledger.instances), [id \in {12940} |-> [ability |-> f.d.syntax.id,sourceObject |-> 0,status |-> "Resolving",owner |-> RuntimeLookOwner911(r)]])] authority == NewLifetimeAuthority910(world0) registry == ReplacementOverlay99(f.registry,[frontier |-> LifetimeFrontier910(authority,1)]) snapshot == LingeringConditionalSnapshot910(SnapshotWithConditionalRegistry96(current2,ledger),registry,ledger,world0) context == [id |-> 12960,imminenceId |-> 12961,phase |-> "Resolving",initialRef |-> InstructionWindowRef93(imminentPlan), currentRef |-> InstructionWindowRef93(resolvingPlan),currentWorld |-> world0.id,initialEffects |-> effects,actualEffects |-> effects] origin == [kind |-> "Instruction",plan |-> resolvingPlan,parent |-> r.ability,ruleStep |-> "NoValue"] world99 == ReplacementOverlay99(world0,[tag |-> "CurrentInterruptWorld",traversalControl |-> world0.control, controllers |-> Empty9,activePeriods |-> Empty9,conditional |-> snapshot]) IN [f |-> f,events |-> events,cp1 |-> cp1,allocation |-> allocation,bindings |-> bindings,pending |-> pending,site |-> site,open |-> open, current2 |-> current2,cp2 |-> cp2,received |-> received,ready |-> ready,option |-> option,busy |-> busy,p |-> p,imminentP |-> imminentP, selected |-> selected,plan |-> plan,imminentPlan |-> imminentPlan,resolvingPlan |-> resolvingPlan,resolvingP |-> resolvingP, effects |-> effects,expected |-> expected,ledger |-> ledger,r |-> r,world |-> world0,authority |-> authority,registry |-> registry, snapshot |-> snapshot,context |-> context,origin |-> origin,world99 |-> world99] OccurrenceDelayedResolvingValid912(s) == /\ LifetimeDelayedCreationValid911(s.f) /\ ProcessConditionalCheckpoint96(s.f.published,s.pending,<<>>,<<>>,s.f.definitions,s.cp1, ConditionalConditionsFixture96(s.f.definitions,s.events),s.allocation,s.bindings,Empty9,Empty9,{}) /\ OpenConditionalReaction96(<<>>,<>,s.pending,12950,s.site,OpeningFixture92(12950,"Reaction",s.site,s.open.members,129,NoTimingRef9),{}) /\ ProcessConditionalCheckpoint96(s.pending,s.received,<>,<>,s.f.definitions,s.cp2, ConditionalConditionsFixture96(s.f.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12950}) /\ CheckpointPriorityWithConditionals96(s.received,<>,<>,[CheckpointFixture92(s.open) EXCEPT !.id=2]) /\ BeginConditionalResolution96(s.received,s.selected,<>,<>,s.p,s.imminentP,s.f.d, SnapshotWithConditionalRegistry96(s.current2,s.received),12940,s.option,LegalityFixture92(s.ready,s.option),Empty9,s.plan,s.imminentPlan, [InstructionTargetsFixture93(s.plan) EXCEPT !.targets={}],InstructionEntryFixture93(s.plan),Empty9, [tag |-> "AbilityRestrictions",ability |-> s.f.d.syntax.id,source |-> s.f.source,results |-> Empty9]) /\ ResolveConditionalWithoutInterrupt96(s.selected,s.ledger,<>,s.imminentP,s.resolvingP,s.imminentPlan,s.resolvingPlan, NoModifiersFixture95(s.imminentPlan),InstructionClearanceFixture93(s.imminentPlan,0,0),s.expected) /\ ConditionalRuntimeBound911(s.ledger,s.r) /\ RuntimeOwnerCurrent911(s.r,s.authority) OccurrenceDelayedHistoricalControl912(s,id,node,index,option) == LET plan == [OpenInstruction93(id,"Ability",12940,s.f.source,"Rule",index,"NoValue",s.r.technique.nodes[node].steps,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] effects == [op \in {1} |-> ReplacementOverlay99(s.effects[1],[kind |-> IF node=703 THEN "AbilityRepeat" ELSE "InstructionChoice", controlNode |-> node,options |-> {1,2},chooser |-> "SideB",requested |-> node=703])] context == [id |-> 13000+id,phase |-> "Resolving",currentRef |-> InstructionWindowRef93(plan),actualEffects |-> effects] returned == [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> context.id,instruction |-> context.currentRef, snapshotId |-> 21,effects |-> effects,complete |-> TRUE,childrenReturned |-> TRUE] control == [tag |-> "ResolvedInstructionControl",instance |-> 12940,node |-> node,instruction |-> context.currentRef, contextId |-> context.id,actualEffects |-> effects,completion |-> returned,mode |-> "Selected",operation |-> 1, option |-> option,chooser |-> "SideB",requested |-> node=703] IN [context |-> context,returned |-> returned,control |-> control] OccurrenceDelayedStateFixture912(mode) == LET repeated == mode#"NoValue" s == OccurrenceDelayedResolvingFixture912(repeated) spec == [tag |-> "OccurrenceTechniqueSpecification",definition |-> s.f.d,source |-> s.f.source, repeat |-> [kind |-> IF repeated THEN "Fixed" ELSE "NoValue",node |-> IF repeated THEN 703 ELSE 0],modal |-> Empty9] initial == NewOccurrenceRuntime912(s.r,spec) firstChoice == IF repeated THEN OccurrenceDelayedHistoricalControl912(s,700,700,1,1) ELSE Empty9 repeatChoice == IF repeated THEN OccurrenceDelayedHistoricalControl912(s,703,703,3,"NoValue") ELSE Empty9 secondChoice == IF repeated THEN OccurrenceDelayedHistoricalControl912(s,13100,700,4,1) ELSE Empty9 trace == CASE mode="Middle" -> <<700,701>> [] mode="Final" -> <<700,701,703,13100>> [] OTHER -> <<>> current == CASE mode="Middle" -> 703 [] mode="Final" -> 13102 [] OTHER -> 700 node == IF mode="Middle" THEN 703 ELSE IF mode="Final" THEN 701 ELSE 700 occurrenceIds == SubIds6(Append(trace,current)) occurrences == [id \in occurrenceIds |-> [id |-> id, sourceNode |-> IF id=13100 THEN 700 ELSE IF id=13102 THEN 701 ELSE id, pass |-> IF id>=13100 THEN 1 ELSE 0]] r == [initial EXCEPT !.pc=node,!.current=current,!.trace=trace,!.occurrences=occurrences,!.usedOccurrences=occurrenceIds, !.ability.instructions=Append(trace,current),!.ability.cursor=Len(trace)+1, !.choices=IF mode="NoValue" THEN Empty9 ELSE IF mode="Middle" THEN [id \in {700} |-> firstChoice.control] ELSE [id \in {700,703,13100} |-> CASE id=700 -> firstChoice.control [] id=703 -> repeatChoice.control [] OTHER -> secondChoice.control], !.repeat=IF mode="Final" THEN [pass |-> 1,requested |-> FALSE,captured |-> TRUE,total |-> 1,remaining |-> 0] ELSE @] plan == [OpenInstruction93(current,"Ability",12940,s.f.source,"Rule",Len(trace)+1,"NoValue",r.technique.nodes[node].steps,FALSE) EXCEPT !.phase="Resolving",!.announced=TRUE] effects == IF mode="Middle" THEN repeatChoice.context.actualEffects ELSE s.effects context == [s.context EXCEPT !.currentRef=InstructionWindowRef93(plan),!.initialRef=InstructionWindowRef93(plan), !.initialEffects=effects,!.actualEffects=effects] expected == [i \in 1..(Len(trace)+1) |-> [instruction |-> InstructionWindowRef93( [OpenInstruction93(Append(trace,current)[i],"Ability",12940,s.f.source,"Rule",i,"NoValue",<<"PriorActualInstruction">>,FALSE) EXCEPT !.phase="Imminent",!.announced=TRUE]),effects |-> ExpectedObservationSet99(IF mode="NoValue" THEN effects ELSE CASE i=1 -> firstChoice.context.actualEffects [] i=3 -> repeatChoice.context.actualEffects [] i=4 -> secondChoice.context.actualEffects [] OTHER -> s.effects)]] ledger == [s.ledger EXCEPT !.instances[12940].expected=expected] world == [s.world EXCEPT !.activity.instances[12940].owner=OccurrenceLookOwner912(r)] authority == NewLifetimeAuthority910(world) registry == [s.registry EXCEPT !.frontier=LifetimeFrontier910(authority,1)] snapshot == LingeringConditionalSnapshot910(SnapshotWithConditionalRegistry96(s.snapshot,ledger),registry,ledger,world) origin == [kind |-> "Instruction",plan |-> plan,parent |-> r.ability,ruleStep |-> "NoValue"] world99 == [s.world99 EXCEPT !.activity=world.activity,!.conditional=snapshot] IN [s |-> s,spec |-> spec,r |-> r,plan |-> plan,effects |-> effects,context |-> context,ledger |-> ledger,world |-> world, authority |-> authority,registry |-> registry,snapshot |-> snapshot,origin |-> origin,world99 |-> world99, firstChoice |-> firstChoice,repeatChoice |-> repeatChoice,secondChoice |-> secondChoice] OccurrenceDelayedStateValid912(f) == /\ OccurrenceDelayedResolvingValid912(f.s) /\ ConditionalDefinitionValid96(f.s.f.d) /\ InstructionTechniqueValid911(f.r.technique) /\ ConditionalOccurrenceBound912(f.ledger,f.r) /\ OccurrenceOwnerCurrent912(f.r,f.authority) /\ f.r.technique.definition=f.ledger.instances[12940].definitionCopy /\ f.r.technique.definition=f.ledger.instances[12941].definitionCopy /\ f.r.technique.definition=f.ledger.effects[12910].definition /\ f.r.specification.definition=f.r.technique.definition /\ LifetimeReady910(f.registry,f.authority) /\ DelayedLifetimeBound910(f.registry,f.ledger) /\ f.ledger.instances[12940].status="Resolving" /\ f.ledger.instances[12941].status="Pending" OccurrenceDelayedFinishFixture912(mode,returned) == LET f == OccurrenceDelayedStateFixture912(mode) middle == mode="Middle" nextId == IF middle THEN 13100 ELSE 0 control == IF middle THEN OccurrenceDelayedHistoricalControl912(f.s,703,703,3,"NoValue").control ELSE NoInstructionControl911 capture == IF middle THEN [tag |-> "ResolvedRepetitionCount",instance |-> 12940,source |-> f.s.f.source, definition |-> f.r.technique.definition,directive |-> 703,pass |-> 0,contextId |-> f.context.id, instruction |-> f.context.currentRef,snapshotId |-> returned.snapshotId,completion |-> returned,count |-> 1] ELSE [tag |-> "NoRepetitionCount"] actualControl == IF middle THEN [control EXCEPT !.contextId=f.context.id,!.instruction=f.context.currentRef, !.actualEffects=f.context.actualEffects,!.completion=returned] ELSE control afterPlan == [f.plan EXCEPT !.phase="Complete",!.cursor=2,!.completedSteps=f.plan.steps] step == [tag |-> "InstructionStepReturn",instruction |-> f.r.current,index |-> 1,step |-> Head(f.plan.steps),complete |-> TRUE,expectedReturn |-> returned] boundary == OccurrenceBoundary912(f.r,f.context,{"InstructionEnd"},0) nextTrace == Append(f.r.trace,f.r.current) afterR == [f.r EXCEPT !.phase="Checkpoint",!.pc=IF middle THEN 700 ELSE 0,!.current=nextId,!.trace=nextTrace,!.boundary=boundary, !.occurrences=IF middle THEN ReplacementOverlay99(@,[id \in {13100} |-> [id |-> id,sourceNode |-> 700,pass |-> 1]]) ELSE @, !.usedOccurrences=IF middle THEN @ \cup {13100} ELSE @, !.choices=IF middle THEN ReplacementOverlay99(@,[id \in {703} |-> actualControl]) ELSE @, !.repeat=IF middle THEN [pass |-> 1,requested |-> FALSE,captured |-> TRUE,total |-> 1,remaining |-> 0] ELSE @, !.ability.instructions=IF middle THEN Append(nextTrace,13100) ELSE nextTrace, !.ability.phase=IF middle THEN "Between" ELSE "Complete",!.ability.lastFinished=~middle,!.ability.complete=~middle] candidate == [f.ledger EXCEPT !.instances[12940].status=IF middle THEN "Resolving" ELSE "Complete"] midWorld == [f.world EXCEPT !.id=30,!.finishedInstances=IF middle THEN {} ELSE {12940}, !.activity.instances[12940]=[ability |-> f.s.f.d.syntax.id,sourceObject |-> 0,status |-> IF middle THEN "Resolving" ELSE "Complete", owner |-> OccurrenceLookOwner912(afterR)]] midExecution == [tag |-> "ActualObjectTransition",id |-> f.context.id,snapshotId |-> 30, source |-> f.s.f.source,instruction |-> f.context.currentRef,return |-> returned] midAuthority == LifetimeAuthorityAfter910(f.authority,LifetimeKernelTransition910(f.world,midWorld,midExecution)) midRegistry == [f.registry EXCEPT !.effects=ObserveLingeringEffects910(@,midWorld),!.frontier=LifetimeFrontier910(midAuthority,2)] midSnapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(f.snapshot,candidate) EXCEPT !.id=30],midRegistry,candidate,midWorld) afterWorld == [midWorld EXCEPT !.id=31,!.finishedDelayedEffects={12910}] acknowledgement == DelayedRuntimePublicationAck911(returned,midWorld) execution == [tag |-> "ActualDelayedReturn",id |-> f.context.id,snapshotId |-> 31,source |-> f.s.f.source, instruction |-> f.context.currentRef,return |-> acknowledgement] authority == LifetimeAuthorityAfter910(midAuthority,LifetimeKernelTransition910(midWorld,afterWorld,execution)) registry == [midRegistry EXCEPT !.effects=ObserveLingeringEffects910(@,afterWorld),!.frontier=LifetimeFrontier910(authority,3)] key == ConditionalKey96(f.s.f.d) afterLedger == [candidate EXCEPT !.instances[12941].status="Lost",!.activationEpoch[key]=1,!.activationSerial=1] afterStack == <<[f.s.busy EXCEPT !.pending={},!.lostPending={12941}]>> snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(midSnapshot,candidate) EXCEPT !.id=31, !.activationEpoch=afterLedger.activationEpoch,!.activationSerial=afterLedger.activationSerial],registry,candidate,afterWorld) before == [registry |-> f.registry,ledger |-> f.ledger,stack |-> <>,snapshot |-> f.snapshot,authority |-> f.authority] mid == [registry |-> midRegistry,ledger |-> candidate,stack |-> <>,snapshot |-> midSnapshot,authority |-> midAuthority] after == [registry |-> registry,ledger |-> afterLedger,stack |-> afterStack,snapshot |-> snapshot,authority |-> authority] call == [before |-> f.r,after |-> afterR,plan |-> f.plan,afterPlan |-> afterPlan,context |-> f.context, afterContext |-> [f.context EXCEPT !.phase="Returned"],origin |-> f.origin, afterOrigin |-> [f.origin EXCEPT !.plan=afterPlan,!.parent=afterR.ability],world |-> f.world99, actualReturn |-> returned,step |-> step,control |-> actualControl,payment |-> [tag |-> "NoInstructionPayment"], boundary |-> boundary,candidateLedger |-> candidate,nextId |-> nextId,capture |-> capture] IN [f |-> f,before |-> before,mid |-> mid,after |-> after,call |-> call,acknowledgement |-> acknowledgement] OccurrenceDelayedReturnFixture912(mode) == LET f == OccurrenceDelayedStateFixture912(mode) IN [tag |-> "ExpectedEffectsProcedureReturn",contextId |-> f.context.id,instruction |-> f.context.currentRef, snapshotId |-> f.world.id,effects |-> f.effects,complete |-> TRUE,childrenReturned |-> TRUE] OccurrenceOrdinaryDelayedValid912(f) == FinishObservedConditionalOccurrence912(f.before.registry,f.mid.registry,f.before.ledger,f.call.candidateLedger,f.mid.ledger,f.before.stack,f.mid.stack, f.call.before,f.call.after,f.call.plan,f.call.afterPlan,f.call.context,f.call.afterContext,f.call.origin,f.call.afterOrigin,f.call.world, f.call.actualReturn,f.call.step,f.call.control,f.call.payment,f.call.boundary,f.call.nextId,f.call.capture, f.before.snapshot,f.mid.snapshot,f.before.authority,f.mid.authority) OccurrenceDelayedMiddleRetentionChecks912 == LET f == OccurrenceDelayedFinishFixture912("Middle",OccurrenceDelayedReturnFixture912("Middle")) IN /\ OccurrenceDelayedStateValid912(f.f) /\ OccurrenceOrdinaryDelayedValid912(f) /\ f.call.after.repeat.pass=1 /\ f.call.after.current=13100 /\ f.call.after.pc=700 /\ f.call.after.technique=f.call.before.technique /\ f.call.after.metadata=f.call.before.metadata /\ ~f.call.after.ability.lastFinished /\ ~f.call.after.ability.complete /\ f.mid.registry.effects[12910].status="Active" /\ f.mid.ledger.instances[12941].status="Pending" /\ f.mid.ledger.instances[12940].status="Resolving" /\ f.mid.ledger.activationEpoch=f.before.ledger.activationEpoch /\ f.mid.stack[1].pending={12941} /\ f.mid.stack[1].busy.instance=12940 /\ OccurrenceFinishedDelayed912(f.call.after,f.call.candidateLedger)={} /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,f.call) OccurrenceDelayedTerminalChecks912 == \A mode \in {"NoValue","Final"} : LET f == OccurrenceDelayedFinishFixture912(mode,OccurrenceDelayedReturnFixture912(mode)) IN /\ OccurrenceDelayedStateValid912(f.f) /\ FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,f.call) /\ ~OccurrenceOrdinaryDelayedValid912(f) /\ f.call.after.current=0 /\ f.call.after.ability.lastFinished /\ ~f.call.after.ability.returned /\ f.mid.registry.effects[12910].status="Active" /\ f.after.registry.effects[12910].status="Expired" /\ DOMAIN f.after.registry.effects={12910} /\ DOMAIN f.after.ledger.effects={12910} /\ f.after.ledger.instances[12940].status="Complete" /\ f.after.ledger.instances[12941].status="Lost" /\ f.after.ledger.activationEpoch[ConditionalKey96(f.f.s.f.d)]=1 /\ f.after.stack[1].pending={} /\ f.after.stack[1].busy.instance=12940 /\ f.call.actualReturn.snapshotId=21 /\ f.call.step.expectedReturn=f.call.actualReturn /\ f.acknowledgement.snapshotId=30 /\ f.acknowledgement.originatingReturn=f.call.actualReturn /\ f.after.authority.order= <<21,30,31>> /\ LifetimeReady910(f.after.registry,f.after.authority) OccurrenceDelayedCleanupFixture912(mode) == LET f == OccurrenceDelayedFinishFixture912(mode,OccurrenceDelayedReturnFixture912(mode)) beforeSnapshot == SnapshotWithConditionalRegistry96(f.after.snapshot,f.after.ledger) world == [f.after.authority.current EXCEPT !.id=41] evaluation == [tag |-> "CurrentCharacteristicsEvaluation",id |-> 12980,snapshotId |-> 41,source |-> RuleAbilitySource9("ProcedureCodee605a78f5d5e")] authority == LifetimeAuthorityAfter910(f.after.authority,LifetimeKernelTransition910(f.after.authority.current,world,evaluation)) registry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(authority,4)] current == [SnapshotWithConditionalRegistry96(f.after.snapshot,f.after.ledger) EXCEPT !.id=41,!.checkpointId=3,!.point="ProcedureCodee605a78f5d5e"] begin == [current EXCEPT !.id=40,!.point="CheckpointBeginning"] cp == [ConditionalCheckpointFixture96(f.after.ledger,3,begin,current,Empty9) EXCEPT !.caller=OccurrenceBoundaryCaller912(f.call.boundary)] received == ConditionalCommittedFixture96(f.after.ledger,f.f.s.f.definitions,cp,Empty9,Empty9,Empty9) frame == LingeringCheckpointFrame910(received,cp,world) cleanup == [tag |-> "LingeringCheckpointCleanup",frame |-> frame,expired |-> {12910},complete |-> TRUE] cleanedRegistry == [registry EXCEPT !.effects=Empty9,!.cleanupIds={3}] candidate == [received EXCEPT !.effects=Empty9] snapshot == LingeringConditionalSnapshot910(SnapshotWithConditionalRegistry96(current,candidate),cleanedRegistry,candidate,world) afterFrame == [frame EXCEPT !.returned=TRUE,!.point="ProcedureCodeb681cc249a04"] IN [f |-> f,beforeSnapshot |-> beforeSnapshot,world |-> world,evaluation |-> evaluation,authority |-> authority,registry |-> registry, current |-> current,cp |-> cp,received |-> received,frame |-> frame,cleanup |-> cleanup,cleanedRegistry |-> cleanedRegistry, candidate |-> candidate,snapshot |-> snapshot,afterFrame |-> afterFrame] OccurrenceDelayedCleanupValid912(g) == /\ FinishObservedDelayedOccurrence912(g.f.before,g.f.mid,g.f.after,g.f.call) /\ CommitLifetimeKernelCore910(g.f.after.authority,g.authority,g.world,g.evaluation) /\ PublishNextLingeringActivity910(g.f.after.registry,g.registry,g.f.after.ledger,g.f.after.ledger,g.f.after.stack,g.f.after.stack, g.beforeSnapshot,g.current,g.authority) /\ ProcessConditionalCheckpoint96(g.f.after.ledger,g.received,g.f.after.stack,g.f.after.stack,g.f.f.s.f.definitions,g.cp, ConditionalConditionsFixture96(g.f.f.s.f.definitions,Empty9),Empty9,Empty9,Empty9,Empty9,{12950}) /\ CleanupObservedLingeringConditionals910(g.registry,g.cleanedRegistry,g.received,g.candidate,g.candidate,g.f.after.stack,g.f.after.stack, SnapshotWithConditionalRegistry96(g.current,g.received),g.snapshot,g.authority,g.frame,g.afterFrame,g.cleanup) OccurrenceDelayedCheckpointCleanupChecks912 == \A mode \in {"NoValue","Final"} : LET g == OccurrenceDelayedCleanupFixture912(mode) IN /\ OccurrenceDelayedCleanupValid912(g) /\ g.f.after.registry.effects[12910].status="Expired" /\ DOMAIN g.f.after.ledger.effects={12910} /\ g.cleanedRegistry.effects=Empty9 /\ g.candidate.effects=Empty9 /\ g.cleanedRegistry.usedEffects={12910} /\ g.candidate.usedDelayedEffects={12910} /\ g.candidate.usedDelayedDefinitions={12920} /\ ~CleanupObservedLingeringConditionals910(g.registry,g.cleanedRegistry,g.received,g.candidate,g.candidate,g.f.after.stack,g.f.after.stack, SnapshotWithConditionalRegistry96(g.current,g.received),g.snapshot,g.authority,[g.frame EXCEPT !.point="ProcedureCodee605a78f5d5e"], g.afterFrame,[g.cleanup EXCEPT !.frame.point="ProcedureCodee605a78f5d5e"]) OccurrenceDelayedCapturedHistoryChecks912 == LET f == OccurrenceDelayedStateFixture912("Final") IN /\ OccurrenceDelayedStateValid912(f) /\ f.r.current=13102 /\ f.r.pc=701 /\ f.r.trace= <<700,701,703,13100>> /\ DOMAIN f.ledger.instances[12940].expected=1..5 /\ f.r.occurrences[13100].sourceNode=700 /\ f.r.occurrences[13102].sourceNode=701 /\ f.r.ability.instructions= <<700,701,703,13100,13102>> /\ OccurrenceControlBound912([f.r EXCEPT !.pc=700],f.firstChoice.context,f.firstChoice.returned,f.firstChoice.control) /\ OccurrenceControlBound912([f.r EXCEPT !.pc=703],f.repeatChoice.context,f.repeatChoice.returned,f.repeatChoice.control) /\ OccurrenceControlBound912([f.r EXCEPT !.pc=700],f.secondChoice.context,f.secondChoice.returned,f.secondChoice.control) /\ f.r.ability.source=f.s.f.source /\ f.r.ability.source.kind="Rule" /\ f.r.metadata.windowId=12950 /\ f.r.metadata.option.instance=12940 /\ f.r.metadata.transaction=f.s.p.transaction OccurrenceDelayedReceiptChecks912 == \A mode \in {"NoValue","Middle","Final"} : LET original == OccurrenceDelayedReturnFixture912(mode) IN \A returned \in {[original EXCEPT !.tag="UnboundReturn"],[original EXCEPT !.contextId=999], [original EXCEPT !.instruction.id=999],[original EXCEPT !.snapshotId=999], [original EXCEPT !.effects=Empty9],[original EXCEPT !.complete=FALSE],[original EXCEPT !.childrenReturned=FALSE]} : LET f == OccurrenceDelayedFinishFixture912(mode,returned) IN /\ f.call.step.expectedReturn=returned /\ f.mid.authority.transitions[30].receipt.execution.return=returned /\ f.after.authority.transitions[31].receipt.execution.return.originatingReturn=returned /\ IF mode="Middle" THEN ~OccurrenceOrdinaryDelayedValid912(f) ELSE ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,f.call) OccurrenceDelayedNoExpiryPublicationFixture912(f) == LET world == [f.mid.authority.current EXCEPT !.id=31] acknowledgement == DelayedRuntimePublicationAck911(f.call.actualReturn,f.mid.authority.current) execution == [tag |-> "ActualDelayedReturn",id |-> f.call.context.id,snapshotId |-> 31,source |-> f.f.s.f.source, instruction |-> f.call.context.currentRef,return |-> acknowledgement] authority == LifetimeAuthorityAfter910(f.mid.authority,LifetimeKernelTransition910(f.mid.authority.current,world,execution)) registry == [f.mid.registry EXCEPT !.frontier=LifetimeFrontier910(authority,3)] snapshot == [f.mid.snapshot EXCEPT !.id=31] IN [registry |-> registry,ledger |-> f.mid.ledger,stack |-> f.mid.stack,snapshot |-> snapshot,authority |-> authority] OccurrenceDelayedRequiredExpiryChecks912 == LET f == OccurrenceDelayedFinishFixture912("Final",OccurrenceDelayedReturnFixture912("Final")) omitted == OccurrenceDelayedNoExpiryPublicationFixture912(f) middle == OccurrenceDelayedFinishFixture912("Middle",OccurrenceDelayedReturnFixture912("Middle")) intermediate == OccurrenceDelayedNoExpiryPublicationFixture912(middle) IN /\ LifetimeReady910(omitted.registry,omitted.authority) /\ DelayedLifetimeBound910(omitted.registry,omitted.ledger) /\ omitted.registry.effects[12910].status="Active" /\ omitted.ledger.instances[12941].status="Pending" /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,omitted,f.call) /\ LifetimeReady910(intermediate.registry,intermediate.authority) /\ ~FinishObservedDelayedOccurrence912(middle.before,middle.mid,intermediate,middle.call) OccurrenceDelayedNoPendingLossFixture912(f) == LET ledger == f.call.candidateLedger snapshot == LingeringConditionalSnapshot910([SnapshotWithConditionalRegistry96(f.mid.snapshot,ledger) EXCEPT !.id=31], f.after.registry,ledger,f.after.authority.current) IN [f.after EXCEPT !.ledger=ledger,!.stack=f.mid.stack,!.snapshot=snapshot] OccurrenceDelayedRequiredPendingLossChecks912 == LET f == OccurrenceDelayedFinishFixture912("Final",OccurrenceDelayedReturnFixture912("Final")) omitted == OccurrenceDelayedNoPendingLossFixture912(f) IN /\ LifetimeReady910(omitted.registry,omitted.authority) /\ DelayedLifetimeBound910(omitted.registry,omitted.ledger) /\ omitted.registry.effects[12910].status="Expired" /\ omitted.ledger.instances[12941].status="Pending" /\ omitted.stack[1].pending={12941} /\ omitted.ledger.activationEpoch[ConditionalKey96(f.f.s.f.d)]=0 /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,omitted,f.call) OccurrenceDelayedJournalBindingChecks912 == LET f == OccurrenceDelayedFinishFixture912("Final",OccurrenceDelayedReturnFixture912("Final")) badMidAuthority == [f.mid.authority EXCEPT !.transitions[30].receipt.execution.return.effects=Empty9] badMidRegistry == [f.mid.registry EXCEPT !.frontier=LifetimeFrontier910(badMidAuthority,2)] badMid == [f.mid EXCEPT !.authority=badMidAuthority,!.registry=badMidRegistry] inheritedAuthority == [f.after.authority EXCEPT !.transitions[30]=badMidAuthority.transitions[30]] inheritedRegistry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(inheritedAuthority,3)] inheritedAfter == [f.after EXCEPT !.authority=inheritedAuthority,!.registry=inheritedRegistry] badAfterAuthority == [f.after.authority EXCEPT !.transitions[31].receipt.execution.return.originatingReturn.snapshotId=30] badAfterRegistry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(badAfterAuthority,3)] badAfter == [f.after EXCEPT !.authority=badAfterAuthority,!.registry=badAfterRegistry] IN /\ LifetimeAuthorityValid910(badMidAuthority) /\ LifetimeAuthorityValid910(inheritedAuthority) /\ LifetimeReady910(badMidRegistry,badMidAuthority) /\ LifetimeReady910(inheritedRegistry,inheritedAuthority) /\ ~FinishObservedDelayedOccurrence912(f.before,badMid,inheritedAfter,f.call) /\ LifetimeAuthorityValid910(badAfterAuthority) /\ LifetimeReady910(badAfterRegistry,badAfterAuthority) /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,badAfter,f.call) OccurrenceDelayedFrontierBindingChecks912 == LET f == OccurrenceDelayedFinishFixture912("Final",OccurrenceDelayedReturnFixture912("Final")) stale == [f.after EXCEPT !.registry.frontier=f.mid.registry.frontier] malformedBefore == [f.before EXCEPT !.registry.frontier.world.id=999] IN /\ ~LifetimeReady910(stale.registry,stale.authority) /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,stale,f.call) /\ ~LifetimeReady910(malformedBefore.registry,malformedBefore.authority) /\ ~FinishObservedDelayedOccurrence912(malformedBefore,f.mid,f.after,f.call) OccurrenceDelayedCallBindingsChecks912 == LET f == OccurrenceDelayedFinishFixture912("Final",OccurrenceDelayedReturnFixture912("Final")) badCurrentWorld == [f.call EXCEPT !.context.currentWorld=999,!.afterContext.currentWorld=999] badPlan == [f.call EXCEPT !.origin.plan.id=999,!.afterOrigin.plan=f.call.afterPlan] badParent == [f.call EXCEPT !.origin.parent.id=999] IN /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,badCurrentWorld) /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,badPlan) /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,badParent) /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,[f.call EXCEPT !.step.expectedReturn=f.acknowledgement]) /\ ~FinishObservedDelayedOccurrence912(f.before,f.mid,f.after,[f.call EXCEPT !.afterContext.phase="Resolving"]) /\ ~FinishObservedDelayedOccurrence912([f.before EXCEPT !.snapshot.id=999],f.mid,f.after,f.call) OccurrenceDelayedWrongOwnerFixture912(f) == LET world == [f.before.authority.current EXCEPT !.activity.instances[12940].owner.metadata.transaction=999] authority == NewLifetimeAuthority910(world) registry == [f.before.registry EXCEPT !.frontier=LifetimeFrontier910(authority,1)] before == [f.before EXCEPT !.authority=authority,!.registry=registry] midAuthority == LifetimeAuthorityAfter910(authority,LifetimeKernelTransition910(world,f.mid.authority.current, f.mid.authority.transitions[30].receipt.execution)) midRegistry == [f.mid.registry EXCEPT !.frontier=LifetimeFrontier910(midAuthority,2)] mid == [f.mid EXCEPT !.authority=midAuthority,!.registry=midRegistry] afterAuthority == LifetimeAuthorityAfter910(midAuthority,LifetimeKernelTransition910(midAuthority.current,f.after.authority.current, f.after.authority.transitions[31].receipt.execution)) afterRegistry == [f.after.registry EXCEPT !.frontier=LifetimeFrontier910(afterAuthority,3)] after == [f.after EXCEPT !.authority=afterAuthority,!.registry=afterRegistry] IN [before |-> before,mid |-> mid,after |-> after] OccurrenceDelayedOwnerBindingChecks912 == LET f == OccurrenceDelayedFinishFixture912("Final",OccurrenceDelayedReturnFixture912("Final")) wrong == OccurrenceDelayedWrongOwnerFixture912(f) IN /\ LifetimeReady910(wrong.before.registry,wrong.before.authority) /\ LifetimeReady910(wrong.mid.registry,wrong.mid.authority) /\ LifetimeReady910(wrong.after.registry,wrong.after.authority) /\ ~OccurrenceOwnerCurrent912(f.call.before,wrong.before.authority) /\ ~FinishObservedDelayedOccurrence912(wrong.before,wrong.mid,wrong.after,f.call) OccurrenceEntryCaptureFixture912(empty) == LET f == OccurrenceFullModalFixture912.f2 initial == IF empty THEN Empty9 ELSE f.effects projection == IF empty THEN [f.projection EXCEPT !.forbiddenIds=DOMAIN f.description.effects] ELSE f.projection context == NewExpectedContext99(f.context.id,f.s.entry.id,f.origin,f.world,f.description,initial,f.s.entry.owner) observation == InitialWouldObservation99(context,f.observation.id) history == InitialCaptureAfterFixture99(f.beforeHistory,context,observation) after == [f.beforeExpectedRegistry EXCEPT !.entryIds=@ \cup {f.s.entry.id},!.usedContextIds=@ \cup {context.id}, !.contexts=ReplacementOverlay99(@,[id \in {context.id} |-> context])] IN [base |-> f,initial |-> initial,projection |-> projection,context |-> context, observation |-> observation,history |-> history,after |-> after] OccurrenceCaptureEntryAdmitted912(f,afterHistory) == LET b == f.base s == b.s IN BeginChapterExpected912(b.beforeExpectedRegistry,f.after,f.context.id,b.origin,b.world,s.entry,b.description,f.projection,f.initial, s.entry.owner,s.lifeWorld.cardFacts,b.beforeHistory,afterHistory,f.observation,s.selected,s.registry,s.authority) OccurrenceFullEntryCaptureChecks912 == LET f == OccurrenceEntryCaptureFixture912(FALSE) IN /\ f.initial#Empty9 /\ f.after=f.base.expectedRegistry /\ f.history=f.base.history /\ InitialWouldCaptured99(f.context,f.history) /\ ~InitialWouldCaptured99(f.context,f.base.beforeHistory) /\ OccurrenceCaptureEntryAdmitted912(f,f.history) /\ ~OccurrenceCaptureEntryAdmitted912(f,f.base.beforeHistory) OccurrenceEmptyEntryCaptureChecks912 == LET f == OccurrenceEntryCaptureFixture912(TRUE) IN /\ f.initial=Empty9 /\ f.context.initialEffects=Empty9 /\ f.base.description.effects#Empty9 /\ InitialWouldOrder99(f.context)= <<>> /\ f.history.evidence=f.base.beforeHistory.evidence /\ f.history.serial=f.base.beforeHistory.serial /\ f.history.observationIds=f.base.beforeHistory.observationIds \cup {f.observation.id} /\ f.history.observations[f.observation.id]=f.observation /\ InitialWouldCaptured99(f.context,f.history) /\ ~InitialWouldCaptured99(f.context,f.base.beforeHistory) /\ OccurrenceCaptureEntryAdmitted912(f,f.history) /\ ~OccurrenceCaptureEntryAdmitted912(f,f.base.beforeHistory) OtherRulesChecks912 == /\ OccurrenceFullEntryCaptureChecks912 /\ OccurrenceEmptyEntryCaptureChecks912 /\ SimultaneousNumericChecks912 /\ SimultaneousSubtypeChecks912 /\ SimultaneousExampleFamily030DependenciesChecks912 /\ SimultaneousExampleFamily030Specimen0112Checks912 /\ SimultaneousSpecimen0135CycleChecks912 /\ SimultaneousNumericOrderChecks912 /\ SimultaneousDynamicValueChecks912 /\ SimultaneousHostedOnlyInCycleChecks912 /\ SimultaneousSetterBoundaryChecks912 /\ SimultaneousResidualCycleChecks912 /\ SimultaneousExampleFamily009ExampleFamily067Checks912 /\ SimultaneousChoiceBindingChecks912 /\ SimultaneousSourceAndReceiptChecks912 /\ SimultaneousInactiveStaticChecks912 /\ SimultaneousSubtypeProvenanceChecks912 /\ SimultaneousLingeringProviderChecks912 /\ SimultaneousTextOriginChecks912 /\ SimultaneousCannotGainChecks912 /\ SimultaneousCompletionChecks912 /\ SimultaneousUnresolvedCompletionChecks912 /\ QuantitySpecimen0202Checks912 /\ QuantitySuppressionChecks912 /\ QuantityIndependentPartsChecks912 /\ QuantityWhitelistChecks912 /\ QuantityMixedSpecimen0195Checks912 /\ QuantityNonaggregatedZeroChecks912 /\ QuantityVacuousAllChecks912 /\ QuantitySpecimen0232ActiveChecks912 /\ QuantitySpecimen0232InactiveChecks912 /\ QuantitySpecimen0232LostAndUnavailableChecks912 /\ QuantityRealSourceQueriesChecks912 /\ QuantitySpecimen0219SimultaneousChecks912 /\ QuantitySpecifiedLocationChecks912 /\ QuantitySpecimen0219BoundaryChecks912 /\ QuantityExampleFamily075TargetSiteAndHoldChecks912 /\ QuantityExampleFamily092OneDrawChecks912 /\ QuantityExampleFamily043OneDamageChecks912 /\ QuantityProfileAndCompletenessChecks912 /\ QuantityExampleFamily033TwoGainsChecks912 /\ QuantitySpecimen0094Specimen0251Checks912 /\ QuantityRetireEventAllocationChecks912 /\ QuantityMoreCurrentBoundaryChecks912 /\ QuantityRetireSnapshotBindingChecks912 /\ QuantityConditionalXChecks912 /\ QuantityForcedAllPointAndRuleGainChecks912 /\ MustExampleFamily031MethodsChecks912 /\ MustExampleFamily031LegalityMatrixChecks912 /\ MustExampleFamily034MeansChecks912 /\ MustExampleFamily016SuccessiveChecks912 /\ MustExampleFamily016MatrixChecks912 /\ MustSpecimen0086OptionsChecks912 /\ MustSpecimen0086ActualActivationChecks912 /\ MustSpecimen0216DeclineChecks912 /\ MustABRCurrentTraversalEventChecks912 /\ MustExampleFamily046ChoiceBoundaryChecks912 /\ MustExampleFamily046Specimen0070Checks912 /\ MustSpecimen0211PermissionUseChecks912 /\ MustImpUnavailableChecks912 /\ MustAdditionalChoiceReturnChecks912 /\ MustBindingAndReplayChecks912 /\ MustABRScopeChecks912 /\ MustChosenEntryBindingsChecks912 /\ MustChosenReturnBindingsChecks912 /\ PersistentBirthChecks912 /\ PersistentNoTraversalBirthChecks912 /\ PersistentStaticSourceChecks912 /\ PersistentSourceAliasChecks912 /\ PersistentNoTraversalCleanupChecks912 /\ PersistentBirthAuthorityChecks912 /\ PersistentCompleteCohortChecks912 /\ PersistentStaticDuringCheckpointChecks912 /\ PersistentInventoryRoleChecks912 /\ PersistentTraversalCutoffChecks912 /\ PersistentOriginalReactionExpiryChecks912 /\ PersistentNoReactionExpiryChecks912 /\ PersistentNestedSecondTraversalChecks912 /\ PersistentGateBirthSchemasChecks912 /\ PersistentGateGenerationMatrixChecks912 /\ PersistentGatePendingAfterCutoffChecks912 /\ PersistentGatePaidCurrentMatrixChecks912 /\ PersistentGatePaidOrdinaryLegalityChecks912 /\ PersistentGateProtectedProjectionChecks912 /\ PersistentGateInitialCaptureChecks912 /\ PersistentGatePaidValueRelevanceChecks912 /\ PersistentGateCoherentBlockedOpeningChecks912 /\ PersistentGatePaidBoundReceiptsChecks912 /\ PersistentGateOrdinaryLowerReserveChecks912 /\ PersistentPresentInactiveThreatBirthChecks912 /\ PersistentLostThreatAbilityChecks912 /\ PersistentThreatActivationRecognitionChecks912 /\ PersistentThreatDeactivationEpochChecks912 /\ PersistentThreatWrongPublicationChecks912 /\ PersistentPaidThreatAuthorityChecks912 /\ PersistentLowerPaidFrozenViewChecks912 /\ PersistentRetentionKernelDefinitionsChecks912 /\ PersistentRetentionCheckpointDefinitionsChecks912 /\ PersistentRetentionWorldDefinitionsChecks912 /\ PersistentRetentionCheckpointLexemesChecks912 /\ PersistentRetentionWorldLexemesChecks912 /\ PersistentRetentionFrozenLexemeOriginChecks912 /\ OccurrenceAdoptionChecks912 /\ OccurrenceSourceSpecificationGuardChecks912 /\ OccurrenceTopologyScopeChecks912 /\ OccurrenceWholeModeGuardChecks912 /\ OccurrenceFullModalProtocolChecks912 /\ OccurrenceReplayedSourceNodeChecks912 /\ OccurrenceModalChoiceGuardChecks912 /\ OccurrenceFreshExecutionGuardChecks912 /\ OccurrenceNextTargetGuardChecks912 /\ OccurrenceConsumedEntryGuardChecks912 /\ OccurrenceCapturedDefinitionGuardChecks912 /\ OccurrencePendingChildGuardChecks912 /\ OccurrenceUpToAndSpecificRepeatChecks912 /\ OccurrenceRemovedModalControlChecks912 /\ OccurrenceActualChooserModificationChecks912 /\ OccurrenceControlProvenanceGuardChecks912 /\ OccurrenceActualReturnGuardChecks912 /\ OccurrenceCheckpointReceiptGuardChecks912 /\ OccurrenceOwnedChoiceHistoryGuardChecks912 /\ OccurrenceDynamicQuotaSupportChecks912 /\ OccurrenceQuotaReadBindingChecks912 /\ OccurrenceQuotaReadReturnChecks912 /\ OccurrenceFullRepeatProtocolChecks912 /\ OccurrenceFixedCountBindingChecks912 /\ OccurrenceNoRecaptureChecks912 /\ OccurrenceIntermediateLifetimeChecks912 /\ OccurrenceUseAcrossPassesChecks912 /\ OccurrenceUsePointLimitChecks912 /\ OccurrenceSuppressedFixedArmingGuardChecks912 /\ OccurrenceUnboundedRepeatChecks912 /\ OccurrenceZeroFixedCountChecks912 /\ OccurrenceStaticOuterTerminalChecks912 /\ OccurrenceStaticCompleteHistoryGuardChecks912 /\ OccurrenceOwnedRepeatHistoryGuardChecks912 /\ OccurrenceSuppressedFixedChecks912 /\ OccurrenceFixedEmptyBodyScopeChecks912 /\ OccurrenceCommittedQuotaChecks912 /\ OccurrencePaidCallerChecks912 /\ OccurrencePlayCallerChecks912 /\ OccurrenceMidItemInspectionCallerChecks912 /\ OccurrenceDonorCallerChecks912 /\ OccurrencePinnedKPIModeChecks912 /\ OccurrencePinnedModalChoosersChecks912 /\ OccurrencePinnedSpecimen0261StableQuotaChecks912 /\ OccurrenceDelayedMiddleRetentionChecks912 /\ OccurrenceDelayedTerminalChecks912 /\ OccurrenceDelayedCheckpointCleanupChecks912 /\ OccurrenceDelayedCapturedHistoryChecks912 /\ OccurrenceDelayedReceiptChecks912 /\ OccurrenceDelayedRequiredExpiryChecks912 /\ OccurrenceDelayedRequiredPendingLossChecks912 /\ OccurrenceDelayedJournalBindingChecks912 /\ OccurrenceDelayedFrontierBindingChecks912 /\ OccurrenceDelayedCallBindingsChecks912 /\ OccurrenceDelayedOwnerBindingChecks912 Block9Assertions == CASE block9 = 0 -> TRUE [] block9 = 1 -> GeneralAbilityChecks9 [] block9 = 2 -> TimingPriorityChecks9 [] block9 = 3 -> TextInterpretationChecks9 [] block9 = 4 -> StaticAbilityChecks9 [] block9 = 5 -> PaidAbilityChecks9 [] block9 = 6 -> ConditionalAbilityChecks9 [] block9 = 7 -> PlayAbilityChecks9 [] block9 = 8 -> BarrierInstructionChecks9 [] block9 = 9 -> InterruptReplacementChecks9 [] block9 = 10 -> LingeringChecks9 [] block9 = 11 -> IdentifyingInstructionsChecks911 [] block9 = 12 -> OtherRulesChecks912 =============================================================================