pith. machine review for the scientific record. sign in

IndisputableMonolith.Aesthetics.NarrativeStructureFromF2Cube

IndisputableMonolith/Aesthetics/NarrativeStructureFromF2Cube.lean · 69 lines · 11 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2
   3/-!
   4# Narrative Structure from F₂³ — D6 Aesthetics
   5
   6Booker (2004) catalogued 7 universal story patterns. In RS terms,
   7these are the 7 = |F₂³\{0}| non-trivial elements of the D=3 lattice.
   8
   9RS derivation: each story is a sequence of recognition events.
  10The 7 universal structures correspond to the 7 weight-1, 2, and 3
  11combinations of 3 binary narrative axes:
  12- Axis 1: protagonist agency (reactive vs proactive)
  13- Axis 2: conflict origin (internal vs external)
  14- Axis 3: resolution type (restoration vs transformation)
  15
  16Booker's 7: Overcoming the Monster, Rags to Riches, The Quest,
  17Voyage and Return, Comedy, Tragedy, Rebirth.
  18
  19Lean status: 0 sorry, 0 axiom.
  20-/
  21
  22namespace IndisputableMonolith.Aesthetics.NarrativeStructureFromF2Cube
  23
  24inductive NarrativeAxis where
  25  | protagonistAgency | conflictOrigin | resolutionType
  26  deriving DecidableEq, Repr, BEq, Fintype
  27
  28theorem narrativeAxisCount : Fintype.card NarrativeAxis = 3 := by decide
  29
  30structure NarrativeAssignment where
  31  protagonistAgency : Bool
  32  conflictOrigin : Bool
  33  resolutionType : Bool
  34  deriving DecidableEq, BEq, Repr, Fintype
  35
  36def neutralNarrative : NarrativeAssignment := ⟨false, false, false⟩
  37
  38def IsBookerStory (n : NarrativeAssignment) : Prop := n ≠ neutralNarrative
  39
  40instance (n : NarrativeAssignment) : Decidable (IsBookerStory n) := instDecidableNot
  41
  42/-- The 7 Booker stories = |F₂³\{0}|. -/
  43theorem booker_count :
  44    (Finset.univ.filter IsBookerStory).card = 7 := by decide
  45
  46inductive BookerStory where
  47  | overcomingMonster | ragsToRiches | theQuest | voyageAndReturn
  48  | comedy | tragedy | rebirth
  49  deriving DecidableEq, Repr, BEq, Fintype
  50
  51theorem bookerStoryCount : Fintype.card BookerStory = 7 := by decide
  52
  53theorem bookerCount_eq_F2cube_minus_one :
  54    Fintype.card BookerStory = 2^3 - 1 := by decide
  55
  56structure NarrativeStructureCert where
  57  three_axes : Fintype.card NarrativeAxis = 3
  58  seven_stories_via_decide : (Finset.univ.filter IsBookerStory).card = 7
  59  seven_booker_stories : Fintype.card BookerStory = 7
  60  count_eq_flip : Fintype.card BookerStory = 2^3 - 1
  61
  62def narrativeStructureCert : NarrativeStructureCert where
  63  three_axes := narrativeAxisCount
  64  seven_stories_via_decide := booker_count
  65  seven_booker_stories := bookerStoryCount
  66  count_eq_flip := bookerCount_eq_F2cube_minus_one
  67
  68end IndisputableMonolith.Aesthetics.NarrativeStructureFromF2Cube
  69

source mirrored from github.com/jonwashburn/shape-of-logic