{"id":"early-exit-and-sentinel-jointly-eliminate-boundary-code","text":"Early-exit patterns eliminate branch code for post-violation states (computation end), while sentinel initialization eliminates branch code for first-iteration special cases (computation start) — together they remove boundary-handling logic from both ends of the computation, leaving only the core invariant-maintaining loop body.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["early-exit-optimizations-pervasive","sentinel-initialization-encodes-boundary-conditions"],"outlist":[],"label":"both eliminate boundary code but from opposite ends of computation; combining reveals the core loop body is free of all boundary logic"}],"dependents":["streaming-boundary-handling-structurally-complete"],"metadata":{"last_reviewed":"2026-06-07T22:02:22","review_result":"pass"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"early-exit-and-sentinel-jointly-eliminate-boundary-code","truth_value":"IN","reason":"SL justification valid","antecedents":["early-exit-optimizations-pervasive","sentinel-initialization-encodes-boundary-conditions"],"label":"both eliminate boundary code but from opposite ends of computation; combining reveals the core loop body is free of all boundary logic"},{"node":"early-exit-optimizations-pervasive","truth_value":"IN","reason":"SL justification valid","antecedents":["three-consecutive-odds-early-exit","path-crossing-early-exit","isomorphic-early-return","first-violation-sufficiency"],"label":"Early exit is the default control flow strategy, not an optimization afterthought"},{"node":"three-consecutive-odds-early-exit","truth_value":"IN","reason":"premise"},{"node":"path-crossing-early-exit","truth_value":"IN","reason":"premise"},{"node":"isomorphic-early-return","truth_value":"IN","reason":"premise"},{"node":"first-violation-sufficiency","truth_value":"IN","reason":"premise"},{"node":"sentinel-initialization-encodes-boundary-conditions","truth_value":"IN","reason":"SL justification valid","antecedents":["ascending-check-uses-sentinel-minus-one","k-length-apart-sentinel-minus-one","prev-zero-sentinel","getheight-sentinel-neg1"],"label":"all four use domain-specific sentinels (-1 for \"no previous index\", 0 for \"no previous group\", -1 for \"any subtree unbalanced\") that make the first loop iteration produce the correct vacuous result without an explicit guard"},{"node":"ascending-check-uses-sentinel-minus-one","truth_value":"IN","reason":"premise"},{"node":"k-length-apart-sentinel-minus-one","truth_value":"IN","reason":"premise"},{"node":"prev-zero-sentinel","truth_value":"IN","reason":"premise"},{"node":"getheight-sentinel-neg1","truth_value":"IN","reason":"premise"}]}}