Inhalt

Aktueller Ordner: /

modal5tutorialeng.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Modal Tutorial (Version 5) – Unitarity and Resurrection</title>
    <base href="https://pompeii-project.org">
    <style>
        /* ========== GLOBAL ========== */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Georgia', 'Times New Roman', Times, serif;
            background-color: #f5f3ef;
            color: #2c2c2c;
            line-height: 1.7;
            padding: 2rem 1rem;
        }
        .container {
            max-width: 820px;
            margin: 0 auto;
            background-color: #fffef7;
            padding: 2rem 2.2rem;
            border-radius: 16px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.08);
            border: 1px solid #e0d6c8;
        }
        h1 {
            font-size: 1.8rem;
            font-weight: normal;
            color: #2c2c2c;
            border-left: 6px solid #6b4f8a;
            padding-left: 1rem;
            margin-bottom: 0.3rem;
        }
        .subhead {
            font-size: 0.95rem;
            color: #6b6b6b;
            margin-bottom: 1.8rem;
            border-bottom: 1px solid #e0d6c8;
            padding-bottom: 0.8rem;
        }
        .subhead a {
            color: #6b4f8a;
            text-decoration: none;
        }
        .subhead a:hover { text-decoration: underline; }
        .version-badge {
            display: inline-block;
            background-color: #8b4513;
            color: #fffef7;
            font-size: 0.65rem;
            padding: 0.15rem 0.6rem;
            border-radius: 20px;
            vertical-align: middle;
            margin-left: 0.5rem;
        }
        .part-tag {
            display: inline-block;
            font-size: 0.7rem;
            padding: 0.1rem 0.6rem;
            border-radius: 20px;
            color: white;
            margin-right: 0.5rem;
        }
        .part-tag.p1 { background-color: #8a3a3a; }
        .part-tag.p2 { background-color: #3a5a8a; }
        .part-tag.p3 { background-color: #6b4f8a; }

        /* ========== STEP BLOCK ========== */
        .step-block {
            background-color: #faf8f3;
            border-left: 4px solid #8b4513;
            padding: 1.5rem 1.8rem;
            margin-bottom: 2rem;
            border-radius: 0 10px 10px 0;
        }
        .step-block.part1 { border-left-color: #8a3a3a; }
        .step-block.part2 { border-left-color: #3a5a8a; }
        .step-block.part3 { border-left-color: #6b4f8a; }
        .step-number {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #8b4513;
            font-weight: bold;
        }
        .step-number.part1 { color: #8a3a3a; }
        .step-number.part2 { color: #3a5a8a; }
        .step-number.part3 { color: #6b4f8a; }
        .step-title {
            font-size: 1.3rem;
            font-weight: bold;
            margin: 0.2rem 0 0.8rem 0;
            color: #2c2c2c;
        }
        .step-explanation { margin-bottom: 1.2rem; }
        .step-explanation p { margin-bottom: 0.8rem; }
        .step-explanation ul, .step-explanation ol {
            margin: 0.5rem 0 0.8rem 1.5rem;
        }
        .step-explanation li { margin-bottom: 0.3rem; }

        /* Formula box */
        .formula-box {
            background-color: #f0ede6;
            padding: 0.8rem 1.2rem;
            border-radius: 8px;
            margin: 0.8rem 0;
            font-family: 'Courier New', monospace;
            font-size: 1.05rem;
            text-align: center;
            border: 1px solid #d4cab8;
            overflow-x: auto;
        }
        .formula-box.important {
            background-color: #d4edda;
            border-color: #8b4513;
        }
        .formula-box.red { background-color: #f8d7da; border-color: #8a3a3a; }
        .formula-box.blue { background-color: #d4e4f7; border-color: #3a5a8a; }
        .formula-box.purple { background-color: #e8e0f0; border-color: #6b4f8a; }

        /* ========== QUESTION ========== */
        .question-box {
            background-color: #f5f0ea;
            padding: 1.2rem 1.5rem;
            border-radius: 10px;
            margin-top: 1rem;
            border: 1px solid #d4cab8;
        }
        .question-box .qtext { font-weight: bold; margin-bottom: 0.6rem; }
        .question-box .qoptions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem 1rem;
            margin-bottom: 0.8rem;
        }
        .question-box .qoptions label {
            display: inline-block;
            background-color: #fffef7;
            padding: 0.15rem 0.8rem;
            border-radius: 30px;
            border: 1px solid #d4cab8;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .question-box .qoptions label:hover { background-color: #e8e2d7; }
        .question-box .qoptions input[type="radio"] {
            margin-right: 0.3rem;
            accent-color: #8b4513;
        }
        .question-box .qsubmit {
            background-color: #8b4513;
            color: #fffef7;
            border: none;
            padding: 0.4rem 1.6rem;
            border-radius: 30px;
            font-size: 0.85rem;
            font-family: inherit;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .question-box .qsubmit:hover { background-color: #6b3410; }
        .question-box .qsubmit:disabled {
            background-color: #b0a89a;
            cursor: not-allowed;
        }
        .question-box .qfeedback {
            margin-top: 0.8rem;
            padding: 0.6rem 1rem;
            border-radius: 8px;
            font-weight: bold;
            display: none;
        }
        .question-box .qfeedback.correct {
            display: block;
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .question-box .qfeedback.wrong {
            display: block;
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        /* ========== PROGRESS ========== */
        .progress-bar {
            background-color: #e0d6c8;
            border-radius: 20px;
            height: 8px;
            margin: 1.8rem 0 1rem 0;
            overflow: hidden;
        }
        .progress-bar .fill {
            height: 100%;
            width: 0%;
            background-color: #8b4513;
            border-radius: 20px;
            transition: width 0.4s ease;
        }
        .progress-text {
            text-align: right;
            font-size: 0.8rem;
            color: #8b8b8b;
            margin-top: -0.3rem;
        }

        /* ========== NAVI ========== */
        .nav-links {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            margin-top: 2rem;
            padding-top: 1rem;
            border-top: 1px solid #e0d6c8;
        }
        .nav-links a {
            color: #8b4513;
            text-decoration: none;
            font-size: 0.9rem;
            padding: 0.3rem 0.8rem;
            border-radius: 30px;
            background-color: #f0ede6;
            transition: background-color 0.2s;
        }
        .nav-links a:hover:not(.disabled) { background-color: #d4cab8; }
        .nav-links .disabled {
            color: #b0a89a;
            pointer-events: none;
            background-color: #f5f3ef;
        }

        /* ========== RESPONSIVE ========== */
        @media (max-width: 640px) {
            .container { padding: 1.2rem; }
            h1 { font-size: 1.4rem; }
            .step-block { padding: 1rem 1.2rem; }
            .question-box { padding: 1rem; }
            .question-box .qoptions { flex-direction: column; gap: 0.2rem; }
            .formula-box { font-size: 0.9rem; padding: 0.6rem 0.8rem; }
            .nav-links { flex-direction: column; gap: 0.6rem; align-items: stretch; text-align: center; }
        }

        /* ========== HELPER CLASSES ========== */
        .highlight {
            background-color: #f5f0ea;
            padding: 0.1rem 0.3rem;
            border-radius: 4px;
            font-weight: bold;
        }
        .symbol {
            font-family: 'Courier New', monospace;
            background-color: #f0ede6;
            padding: 0.05rem 0.4rem;
            border-radius: 4px;
            font-size: 0.95rem;
        }
        .boxed {
            border: 1px solid #c4a86b;
            padding: 0.3rem 0.8rem;
            border-radius: 6px;
            display: inline-block;
            background-color: #faf8f3;
            font-weight: bold;
        }
        .mt-1 { margin-top: 1rem; }
        .mb-1 { margin-bottom: 1rem; }
        .text-center { text-align: center; }
        .text-muted { color: #8b8b8b; font-size: 0.85rem; }
    </style>
</head>
<body>

<div class="container" id="app">

    <!-- ===== HEADER ===== -->
    <h1>πŸ“ The Trinity as a Consequence of a Monistic Modal Ontology under Superposition Axioms <span class="version-badge">Version 5 – Unitarity and Resurrection</span></h1>
    <div class="subhead">
        An interactive tutorial – Step by step<br>
        <a href="modal.html?lang=en">← Back to the entry page</a> |
        <a href="modal5eng.pdf">πŸ“„ PDF of the treatise</a>
    </div>

    <!-- ===== PROGRESS ===== -->
    <div class="progress-bar" id="progressBar">
        <div class="fill" id="progressFill" style="width: 0%;"></div>
    </div>
    <div class="progress-text" id="progressText">Step 0 of 18</div>

    <!-- ===== STEPS ===== -->
    <div id="stepContainer"></div>

    <!-- ===== NAVIGATION ===== -->
    <div class="nav-links" id="navLinks">
        <a href="#" id="prevBtn" class="disabled">← Back</a>
        <span id="stepIndicator" style="font-size:0.85rem; color:#8b8b8b;">0 / 18</span>
        <a href="#" id="nextBtn">Next β†’</a>
    </div>

    <!-- ===== FOOTER ===== -->
    <div style="margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #e0d6c8; font-size: 0.75rem; color: #8b8b8b; text-align: center;">
        <p>Β© Paul Koop – <a href="modal.html?lang=en" style="color: #8b4513;">the-last-freedom.org/Projekt_Pompeji</a></p>
        <p style="margin-top:0.2rem;">Version 5 builds on Version 4 and derives unitarity and resurrection as theorems.</p>
    </div>
</div>

<script>
    // ================================================================
    //  DATA: 19 steps for Version 5 – ENGLISH
    // ================================================================

    const steps = [
        // ============================================================
        //  INTRODUCTION (Steps 0–2)
        // ============================================================
        {
            id: 0,
            title: "What is the goal of Version 5?",
            part: "Introduction",
            explanation: `
                <p><strong>Version 5</strong> builds on the results of Version 4. It was shown that the Trinity is derivable in the extended system S5+SP.</p>
                <p>Version 5 draws the <strong>eschatological consequences</strong> from this structure:</p>
                <ol>
                    <li><strong>Unitarity:</strong> The universe is a closed system in which no information can be lost.</li>
                    <li><strong>Resurrection:</strong> The omniscient integration of all consciousnesses into S is indistinguishable from resurrection.</li>
                </ol>
                <div class="formula-box important">S5+SP+U &vdash; β–‘βˆ€c(Consciousness(c) β†’ Resurrection(c))</div>
            `,
            question_html: `
                <p><strong>What are the two main goals of Version 5?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q0" value="0"> Unitarity and Resurrection</label>
                    <label><input type="radio" name="q0" value="1"> Monism and Modal Realism</label>
                    <label><input type="radio" name="q0" value="2"> Superposition and Trinity</label>
                    <label><input type="radio" name="q0" value="3"> Existence of a World and Consciousness</label>
                    <label><input type="radio" name="q0" value="4"> Nothing and Everything</label>
                    <label><input type="radio" name="q0" value="5"> God and the World</label>
                </div>
            `,
            answer: 0
        },
        {
            id: 1,
            title: "The Extension of S to Omniscience",
            part: "Introduction",
            explanation: `
                <p>In Version 4, S was defined as:</p>
                <div class="formula-box">S := βˆ€p(K<sub>T</sub>(p) β†’ K<sub>T</sub>(K<sub>T</sub>(p)))</div>
                <p>Version 5 extends S to <strong>omniscience</strong>:</p>
                <div class="formula-box">S := βˆ€p(K<sub>T</sub>(p) β†’ K<sub>T</sub>(K<sub>T</sub>(p))) ∧ βˆ€c(Consciousness(c) β†’ integrated(c, S))</div>
                <p>This means: S encompasses not only knowledge of T, but the <strong>integration of all consciousnesses</strong>.</p>
                <div class="formula-box">A16 := βˆ€c(Consciousness(c) β†’ integrated(c, S))</div>
                <div class="formula-box">A17 := βˆ€c(Knowledge(c, S) ↔ integrated(c, S))</div>
            `,
            question_html: `
                <p><strong>What does A16 state?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q1" value="0"> There is no consciousness.</label>
                    <label><input type="radio" name="q1" value="1"> All consciousnesses are integrated into S.</label>
                    <label><input type="radio" name="q1" value="2"> Only some consciousnesses are integrated into S.</label>
                    <label><input type="radio" name="q1" value="3"> Consciousness is an illusion.</label>
                    <label><input type="radio" name="q1" value="4"> S is identical to T.</label>
                    <label><input type="radio" name="q1" value="5"> S is identical to U.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 2,
            title: "The Four Levels of Investigation",
            part: "Introduction",
            explanation: `
                <p>The work operates on <strong>four levels</strong>:</p>
                <table style="width:100%; border-collapse:collapse; margin:1rem 0; font-size:0.9rem;">
                    <tr style="background:#e0d6c8;">
                        <th style="border:1px solid #d4cab8; padding:0.4rem; text-align:left;">Level</th>
                        <th style="border:1px solid #d4cab8; padding:0.4rem; text-align:left;">Question</th>
                        <th style="border:1px solid #d4cab8; padding:0.4rem; text-align:left;">Method</th>
                    </tr>
                    <tr>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;"><strong>Logic</strong></td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Which structures are consistent?</td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Formal proofs, tableaux</td>
                    </tr>
                    <tr>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;"><strong>Metaphysics</strong></td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Which structural conditions are sufficient?</td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Axiomatic analysis</td>
                    </tr>
                    <tr>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;"><strong>Physics</strong></td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Through which processes are these conditions realized?</td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Empirical science</td>
                    </tr>
                    <tr>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;"><strong>Theology/Hermeneutics</strong></td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">How are these structures interpreted?</td>
                        <td style="border:1px solid #d4cab8; padding:0.4rem;">Interpretation</td>
                    </tr>
                </table>
                <p>The formal core investigation operates <strong>exclusively</strong> on the first two levels.</p>
            `,
            question_html: `
                <p><strong>On how many levels does the work operate?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q2" value="0"> Two</label>
                    <label><input type="radio" name="q2" value="1"> Three</label>
                    <label><input type="radio" name="q2" value="2"> Four</label>
                    <label><input type="radio" name="q2" value="3"> Five</label>
                    <label><input type="radio" name="q2" value="4"> Six</label>
                    <label><input type="radio" name="q2" value="5"> Seven</label>
                </div>
            `,
            answer: 2
        },

        // ============================================================
        //  PART I: RECAP OF VERSION 4 (Steps 3–6)
        // ============================================================
        {
            id: 3,
            title: "Recap: The Superposition Axioms (ASP1–ASP5)",
            part: "Part I",
            explanation: `
                <div style="background:#f8d7da; padding:0.5rem 1rem; border-radius:6px; margin-bottom:1rem;">
                    <span class="part-tag p1">PART I</span>
                    <strong>Recap of Version 4</strong>
                </div>
                <p>The superposition axioms formalize the <strong>primordial state</strong> in which all possibilities are undividedly contained:</p>
                <ul>
                    <li><strong>ASP1:</strong> <span class="symbol">C @ w<sub>super</sub></span></li>
                    <li><strong>ASP2:</strong> <span class="symbol">βˆ€v (w<sub>super</sub> R v β†’ (C @ v ↔ v = w<sub>super</sub>))</span></li>
                    <li><strong>ASP3:</strong> <span class="symbol">βˆ€x Tr(x) @ w<sub>super</sub></span></li>
                    <li><strong>ASP4:</strong> <span class="symbol">βˆ€v (w<sub>super</sub> R v β†’ βˆ€x Tr(x) @ v)</span></li>
                    <li><strong>ASP5:</strong> <span class="symbol">βˆ€v (v β‰  w<sub>super</sub> β†’ w<sub>super</sub> R v)</span></li>
                </ul>
                <div class="formula-box blue">S5+SP &vdash; β–‘βˆ€xTr(x)</div>
            `,
            question_html: `
                <p><strong>How many superposition axioms (ASP) are there?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q3" value="0"> Two</label>
                    <label><input type="radio" name="q3" value="1"> Three</label>
                    <label><input type="radio" name="q3" value="2"> Four</label>
                    <label><input type="radio" name="q3" value="3"> Five</label>
                    <label><input type="radio" name="q3" value="4"> Six</label>
                    <label><input type="radio" name="q3" value="5"> Seven</label>
                </div>
            `,
            answer: 3
        },
        {
            id: 4,
            title: "The New Definition of S – Omniscience",
            part: "Part I",
            explanation: `
                <p>Version 5 extends S to omniscience:</p>
                <div class="formula-box important">S := βˆ€p(K<sub>T</sub>(p) β†’ K<sub>T</sub>(K<sub>T</sub>(p))) ∧ βˆ€c(Consciousness(c) β†’ integrated(c, S))</div>
                <p>The new axioms:</p>
                <div class="formula-box">A16 := βˆ€c(Consciousness(c) β†’ integrated(c, S))</div>
                <div class="formula-box">A17 := βˆ€c(Knowledge(c, S) ↔ integrated(c, S))</div>
                <p><strong>Meaning:</strong> Everything that constitutes a consciousness is integrated into S. S knows everything about every consciousness.</p>
            `,
            question_html: `
                <p><strong>What does A16 state?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q4" value="0"> There is no consciousness.</label>
                    <label><input type="radio" name="q4" value="1"> All consciousnesses are integrated into S.</label>
                    <label><input type="radio" name="q4" value="2"> Only some consciousnesses are integrated into S.</label>
                    <label><input type="radio" name="q4" value="3"> Consciousness is an illusion.</label>
                    <label><input type="radio" name="q4" value="4"> S is identical to T.</label>
                    <label><input type="radio" name="q4" value="5"> S is identical to U.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 5,
            title: "Unitarity (A18) – Information is not lost",
            part: "Part I",
            explanation: `
                <p><strong>Unitarity</strong> is the physical principle that in a closed system, no information may be lost.</p>
                <div class="formula-box">A18 := β–‘βˆ€I(Existence(I) β†’ Conservation(I))</div>
                <p>This means: <strong>If information exists, it is conserved.</strong></p>
                <p>For consciousness, this means:</p>
                <div class="formula-box">βˆ€c(Consciousness(c) β†’ Conservation(c))</div>
                <p><strong>No consciousness is lost.</strong></p>
            `,
            question_html: `
                <p><strong>What does unitarity (A18) state?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q5" value="0"> Information can be lost.</label>
                    <label><input type="radio" name="q5" value="1"> Information is conserved.</label>
                    <label><input type="radio" name="q5" value="2"> Information is destroyed.</label>
                    <label><input type="radio" name="q5" value="3"> Information is unimportant.</label>
                    <label><input type="radio" name="q5" value="4"> Information is an illusion.</label>
                    <label><input type="radio" name="q5" value="5"> Information is identical to consciousness.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 6,
            title: "Death as Transition (A19, A20)",
            part: "Part I",
            explanation: `
                <p>Death is <strong>not a final loss</strong>, but a transition from local to global storage:</p>
                <div class="formula-box">A19 := βˆ€c(Death(c) β†’ Integration(c, S))</div>
                <p>This means: <strong>The death of a consciousness is its integration into S.</strong></p>
                <p>And:</p>
                <div class="formula-box">A20 := βˆ€c(Knowledge(c, S) ↔ Existence(c))</div>
                <p>This means: <strong>If S knows a consciousness, it exists in S.</strong></p>
            `,
            question_html: `
                <p><strong>What does A19 state?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q6" value="0"> Death is the end of everything.</label>
                    <label><input type="radio" name="q6" value="1"> Death is the integration of a consciousness into S.</label>
                    <label><input type="radio" name="q6" value="2"> Death is an illusion.</label>
                    <label><input type="radio" name="q6" value="3"> Death is a new beginning.</label>
                    <label><input type="radio" name="q6" value="4"> Death is identical to life.</label>
                    <label><input type="radio" name="q6" value="5"> Death is impossible.</label>
                </div>
            `,
            answer: 1
        },

        // ============================================================
        //  PART II: DERIVATION OF RESURRECTION (Steps 7–12)
        // ============================================================
        {
            id: 7,
            title: "PART II – The Derivation of Resurrection",
            part: "Part II",
            explanation: `
                <div style="background:#d4e4f7; padding:0.5rem 1rem; border-radius:6px; margin-bottom:1rem;">
                    <span class="part-tag p2">PART II</span>
                    <strong>Goal:</strong> Derive resurrection as a <strong>theorem</strong> from A16–A20.
                </div>
                <p>Definition of resurrection:</p>
                <div class="formula-box">Resurrection(c) := Restoration(c, S)</div>
                <p><strong>To show:</strong></p>
                <div class="formula-box important">βˆ€c(Consciousness(c) β†’ Resurrection(c))</div>
            `,
            question_html: `
                <p><strong>What is the goal of Part II?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q7" value="0"> To set resurrection as an axiom.</label>
                    <label><input type="radio" name="q7" value="1"> To derive resurrection as a theorem.</label>
                    <label><input type="radio" name="q7" value="2"> To refute resurrection.</label>
                    <label><input type="radio" name="q7" value="3"> To ignore resurrection.</label>
                    <label><input type="radio" name="q7" value="4"> To expose resurrection as an illusion.</label>
                    <label><input type="radio" name="q7" value="5"> To prove resurrection impossible.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 8,
            title: "Step 1: Integration follows from Consciousness (A16)",
            part: "Part II",
            explanation: `
                <p><strong>Step 1:</strong> Let c be an arbitrary consciousness.</p>
                <div class="formula-box">Consciousness(c)</div>
                <p>From A16, it follows:</p>
                <div class="formula-box">integrated(c, S)</div>
                <p><strong>Justification:</strong> A16 states that all consciousnesses are integrated into S.</p>
            `,
            question_html: `
                <p><strong>What follows from A16 for an arbitrary consciousness c?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q8" value="0"> c is not integrated.</label>
                    <label><input type="radio" name="q8" value="1"> c is integrated into S.</label>
                    <label><input type="radio" name="q8" value="2"> c does not exist.</label>
                    <label><input type="radio" name="q8" value="3"> c is an illusion.</label>
                    <label><input type="radio" name="q8" value="4"> c is identical to S.</label>
                    <label><input type="radio" name="q8" value="5"> c is identical to T.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 9,
            title: "Step 2: Knowledge follows from Integration (A17)",
            part: "Part II",
            explanation: `
                <p><strong>Step 2:</strong> From A17, it follows:</p>
                <div class="formula-box">Knowledge(c, S) ↔ integrated(c, S)</div>
                <p>Since <span class="symbol">integrated(c, S)</span> holds from Step 1, it follows:</p>
                <div class="formula-box">Knowledge(c, S)</div>
                <p><strong>Justification:</strong> A17 states that knowledge about a consciousness in S is equivalent to its integration.</p>
            `,
            question_html: `
                <p><strong>What follows from A17 and Step 1?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q9" value="0"> c is not known.</label>
                    <label><input type="radio" name="q9" value="1"> c is known in S.</label>
                    <label><input type="radio" name="q9" value="2"> c is not in S.</label>
                    <label><input type="radio" name="q9" value="3"> c is an illusion.</label>
                    <label><input type="radio" name="q9" value="4"> c is identical to S.</label>
                    <label><input type="radio" name="q9" value="5"> c is identical to T.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 10,
            title: "Step 3: Existence follows from Knowledge (A20)",
            part: "Part II",
            explanation: `
                <p><strong>Step 3:</strong> From A20, it follows:</p>
                <div class="formula-box">Knowledge(c, S) ↔ Existence(c)</div>
                <p>Since <span class="symbol">Knowledge(c, S)</span> holds from Step 2, it follows:</p>
                <div class="formula-box">Existence(c)</div>
                <p><strong>Justification:</strong> A20 states that knowledge about a consciousness in S is equivalent to its existence.</p>
            `,
            question_html: `
                <p><strong>What follows from A20 and Step 2?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q10" value="0"> c does not exist.</label>
                    <label><input type="radio" name="q10" value="1"> c exists.</label>
                    <label><input type="radio" name="q10" value="2"> c is an illusion.</label>
                    <label><input type="radio" name="q10" value="3"> c is identical to S.</label>
                    <label><input type="radio" name="q10" value="4"> c is identical to T.</label>
                    <label><input type="radio" name="q10" value="5"> c is identical to U.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 11,
            title: "Step 4: Conservation follows from Existence (A18)",
            part: "Part II",
            explanation: `
                <p><strong>Step 4:</strong> From A18, it follows:</p>
                <div class="formula-box">Existence(c) β†’ Conservation(c)</div>
                <p>Since <span class="symbol">Existence(c)</span> holds from Step 3, it follows:</p>
                <div class="formula-box">Conservation(c)</div>
                <p><strong>Justification:</strong> A18 states that all existing information is conserved.</p>
            `,
            question_html: `
                <p><strong>What follows from A18 and Step 3?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q11" value="0"> c is lost.</label>
                    <label><input type="radio" name="q11" value="1"> c is conserved.</label>
                    <label><input type="radio" name="q11" value="2"> c is destroyed.</label>
                    <label><input type="radio" name="q11" value="3"> c is unimportant.</label>
                    <label><input type="radio" name="q11" value="4"> c is an illusion.</label>
                    <label><input type="radio" name="q11" value="5"> c is identical to S.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 12,
            title: "Step 5: Resurrection follows from Integration and Existence",
            part: "Part II",
            explanation: `
                <p><strong>Step 5:</strong> From Step 1 (<span class="symbol">integrated(c, S)</span>) and Step 3 (<span class="symbol">Existence(c)</span>) it follows:</p>
                <ul>
                    <li>c is contained in S.</li>
                    <li>c exists in S.</li>
                    <li>Since S is the omniscient integration, c is restored in S.</li>
                </ul>
                <p>With the definition of resurrection:</p>
                <div class="formula-box">Resurrection(c) := Restoration(c, S)</div>
                <p>it follows:</p>
                <div class="formula-box important">Resurrection(c)</div>
                <p><strong>Thus:</strong> <span class="symbol">βˆ€c(Consciousness(c) β†’ Resurrection(c))</span></p>
            `,
            question_html: `
                <p><strong>What is the result of Part II?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q12" value="0"> Resurrection is impossible.</label>
                    <label><input type="radio" name="q12" value="1"> Resurrection follows from consciousness.</label>
                    <label><input type="radio" name="q12" value="2"> Resurrection is an illusion.</label>
                    <label><input type="radio" name="q12" value="3"> Resurrection is identical to death.</label>
                    <label><input type="radio" name="q12" value="4"> Resurrection is identical to nothing.</label>
                    <label><input type="radio" name="q12" value="5"> Resurrection is impossible.</label>
                </div>
            `,
            answer: 1
        },

        // ============================================================
        //  PART III: METATHEORETICAL CLASSIFICATION (Steps 13–18)
        // ============================================================
        {
            id: 13,
            title: "PART III – The Main Theorem of Version 5",
            part: "Part III",
            explanation: `
                <div style="background:#e8e0f0; padding:0.5rem 1rem; border-radius:6px; margin-bottom:1rem;">
                    <span class="part-tag p3">PART III</span>
                    <strong>The Main Theorem</strong>
                </div>
                <div class="formula-box important">S5+SP+U &vdash; β–‘βˆ€c(Consciousness(c) β†’ Resurrection(c))</div>
                <p>This means: <strong>In the extended ontology, resurrection follows necessarily from the existence of consciousness.</strong></p>
                <p>The axioms A16–A20 are <strong>sufficient</strong> to derive resurrection as a theorem.</p>
            `,
            question_html: `
                <p><strong>What is the main theorem of Version 5?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q13" value="0"> The Trinity is impossible.</label>
                    <label><input type="radio" name="q13" value="1"> β–‘βˆ€c(Consciousness(c) β†’ Resurrection(c))</label>
                    <label><input type="radio" name="q13" value="2"> Resurrection is an illusion.</label>
                    <label><input type="radio" name="q13" value="3"> Resurrection is identical to death.</label>
                    <label><input type="radio" name="q13" value="4"> Resurrection is identical to nothing.</label>
                    <label><input type="radio" name="q13" value="5"> Resurrection is impossible.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 14,
            title: "The Role of Unitarity (A18)",
            part: "Part III",
            explanation: `
                <p>Unitarity (A18) is the <strong>physical foundation</strong> of resurrection:</p>
                <ul>
                    <li>It guarantees that <strong>no information is lost</strong>.</li>
                    <li>It is the bridge from existence to conservation.</li>
                    <li>Without unitarity, resurrection would not be derivable.</li>
                </ul>
                <div class="formula-box blue">A18 := β–‘βˆ€I(Existence(I) β†’ Conservation(I))</div>
            `,
            question_html: `
                <p><strong>Why is unitarity (A18) crucial for resurrection?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q14" value="0"> It guarantees that information is lost.</label>
                    <label><input type="radio" name="q14" value="1"> It guarantees that information is conserved.</label>
                    <label><input type="radio" name="q14" value="2"> It has no significance.</label>
                    <label><input type="radio" name="q14" value="3"> It contradicts resurrection.</label>
                    <label><input type="radio" name="q14" value="4"> It is identical to death.</label>
                    <label><input type="radio" name="q14" value="5"> It is identical to nothing.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 15,
            title: "The Role of Omniscience (A16, A17)",
            part: "Part III",
            explanation: `
                <p>The omniscience of S (A16, A17) is the <strong>epistemological foundation</strong> of resurrection:</p>
                <ul>
                    <li><strong>A16:</strong> All consciousnesses are integrated into S.</li>
                    <li><strong>A17:</strong> Knowledge about a consciousness in S is equivalent to its integration.</li>
                </ul>
                <p>Together, they guarantee that <strong>no consciousness is forgotten</strong>.</p>
            `,
            question_html: `
                <p><strong>What do A16 and A17 jointly guarantee?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q15" value="0"> Consciousnesses are forgotten.</label>
                    <label><input type="radio" name="q15" value="1"> Consciousnesses are integrated and known in S.</label>
                    <label><input type="radio" name="q15" value="2"> Consciousnesses are unimportant.</label>
                    <label><input type="radio" name="q15" value="3"> Consciousnesses are an illusion.</label>
                    <label><input type="radio" name="q15" value="4"> Consciousnesses are identical to T.</label>
                    <label><input type="radio" name="q15" value="5"> Consciousnesses are identical to U.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 16,
            title: "Death as Transition (A19)",
            part: "Part III",
            explanation: `
                <p>Death is <strong>not an end</strong>, but a <strong>transition</strong>:</p>
                <div class="formula-box">A19 := βˆ€c(Death(c) β†’ Integration(c, S))</div>
                <p>This means: <strong>When a consciousness dies, it is integrated into S.</strong></p>
                <p>Death is the <strong>condition of possibility</strong> of resurrection – for only through integration into S can restoration occur.</p>
            `,
            question_html: `
                <p><strong>What does A19 state about death?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q16" value="0"> Death is the end of everything.</label>
                    <label><input type="radio" name="q16" value="1"> Death is integration into S.</label>
                    <label><input type="radio" name="q16" value="2"> Death is an illusion.</label>
                    <label><input type="radio" name="q16" value="3"> Death is a new beginning.</label>
                    <label><input type="radio" name="q16" value="4"> Death is identical to life.</label>
                    <label><input type="radio" name="q16" value="5"> Death is impossible.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 17,
            title: "Omniscience is Resurrection (Corollary)",
            part: "Part III",
            explanation: `
                <p>From A20 follows a <strong>corollary</strong>:</p>
                <div class="formula-box important">βˆ€c(Knowledge(c, S) ↔ Resurrection(c))</div>
                <p>This means: <strong>Omniscience and resurrection are indistinguishable.</strong></p>
                <p>If S fully knows a consciousness, then it is restored in S – that is resurrection.</p>
            `,
            question_html: `
                <p><strong>What does the corollary from A20 state?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q17" value="0"> Knowledge is unimportant.</label>
                    <label><input type="radio" name="q17" value="1"> Omniscience is indistinguishable from resurrection.</label>
                    <label><input type="radio" name="q17" value="2"> Knowledge contradicts resurrection.</label>
                    <label><input type="radio" name="q17" value="3"> Knowledge is identical to death.</label>
                    <label><input type="radio" name="q17" value="4"> Knowledge is identical to nothing.</label>
                    <label><input type="radio" name="q17" value="5"> Knowledge is impossible.</label>
                </div>
            `,
            answer: 1
        },
        {
            id: 18,
            title: "Conclusion – The Eschatological Certainty",
            part: "Part III",
            explanation: `
                <p>Version 5 has shown:</p>
                <ol>
                    <li><strong>Unitarity</strong> (A18) is a necessary condition for the consistency of ontology.</li>
                    <li><strong>Death</strong> is not a final loss, but a transition from local to global storage (A19).</li>
                    <li><strong>Resurrection</strong> is not an optional hope, but a theorem derived from A16–A20.</li>
                    <li>The <strong>omniscience</strong> of S is indistinguishable from resurrection (Corollary).</li>
                </ol>
                <div class="formula-box important" style="font-size:1.2rem;">The Trinity is not only the structure of reality – it is also the guarantee that nothing that was, is lost.</div>
                <p style="margin-top:1rem; text-align:center; font-style:italic; color:#555;">This treatise was written in the spirit of rigorous modal logic, yet in the language of philosophy – for truth requires both: the precision of the formula and the breadth of the concept.</p>
            `,
            question_html: `
                <p><strong>What is the final conclusion of Version 5?</strong></p>
                <div class="qoptions">
                    <label><input type="radio" name="q18" value="0"> Resurrection is impossible.</label>
                    <label><input type="radio" name="q18" value="1"> The Trinity guarantees that nothing that was is lost.</label>
                    <label><input type="radio" name="q18" value="2"> Resurrection is an illusion.</label>
                    <label><input type="radio" name="q18" value="3"> Resurrection is identical to death.</label>
                    <label><input type="radio" name="q18" value="4"> Resurrection is identical to nothing.</label>
                    <label><input type="radio" name="q18" value="5"> Resurrection is impossible.</label>
                </div>
            `,
            answer: 1
        }
    ];

    // ================================================================
    //  LOGIC
    // ================================================================

    let currentStep = 0;
    const totalSteps = steps.length;
    const stepContainer = document.getElementById('stepContainer');
    const prevBtn = document.getElementById('prevBtn');
    const nextBtn = document.getElementById('nextBtn');
    const stepIndicator = document.getElementById('stepIndicator');
    const progressFill = document.getElementById('progressFill');
    const progressText = document.getElementById('progressText');

    let stepCompleted = new Array(totalSteps).fill(false);

    function renderStep(index) {
        const step = steps[index];
        if (!step) return;

        const partClass = step.part === 'Part I' ? 'part1' :
                         step.part === 'Part II' ? 'part2' :
                         step.part === 'Part III' ? 'part3' : '';

        let html = `
            <div class="step-block ${partClass}">
                <div class="step-number ${partClass}">Step ${index} of ${totalSteps-1} – ${step.part}</div>
                <div class="step-title">${step.title}</div>
                <div class="step-explanation">${step.explanation}</div>
                <div class="question-box" id="questionBox${index}">
                    ${step.question_html}
                    <button class="qsubmit" data-step="${index}">Check answer</button>
                    <div class="qfeedback" id="feedback${index}"></div>
                </div>
            </div>
        `;

        stepContainer.innerHTML = html;

        const submitBtn = document.querySelector(`.qsubmit[data-step="${index}"]`);
        if (submitBtn) {
            submitBtn.addEventListener('click', function(e) {
                checkAnswer(index);
            });
        }

        const questionBox = document.getElementById(`questionBox${index}`);
        if (questionBox) {
            const radioInputs = questionBox.querySelectorAll('input[type="radio"]');
            radioInputs.forEach(input => {
                input.addEventListener('keydown', function(e) {
                    if (e.key === 'Enter') {
                        e.preventDefault();
                        checkAnswer(index);
                    }
                });
            });
        }

        updateNav(index);
        updateProgress(index);

        if (stepCompleted[index]) {
            const feedback = document.getElementById(`feedback${index}`);
            if (feedback) {
                feedback.className = 'qfeedback correct';
                feedback.textContent = 'βœ… Correct! You have already completed this step.';
                feedback.style.display = 'block';
            }
            const submitBtn2 = document.querySelector(`.qsubmit[data-step="${index}"]`);
            if (submitBtn2) submitBtn2.disabled = true;
        }

        document.querySelector('.step-block').scrollIntoView({ behavior: 'smooth', block: 'start' });
    }

    function checkAnswer(index) {
        if (stepCompleted[index]) return;

        const step = steps[index];
        const questionBox = document.getElementById(`questionBox${index}`);
        const feedback = document.getElementById(`feedback${index}`);

        const selected = questionBox.querySelector('input[type="radio"]:checked');
        if (!selected) {
            feedback.className = 'qfeedback wrong';
            feedback.textContent = '❌ Please select an answer.';
            feedback.style.display = 'block';
            return;
        }

        const userAnswer = parseInt(selected.value);
        const isCorrect = (userAnswer === step.answer);

        if (isCorrect) {
            feedback.className = 'qfeedback correct';
            feedback.textContent = 'βœ… Correct! You may proceed to the next step.';
            feedback.style.display = 'block';
            stepCompleted[index] = true;

            const submitBtn = questionBox.querySelector('.qsubmit');
            if (submitBtn) submitBtn.disabled = true;

            const radios = questionBox.querySelectorAll('input[type="radio"]');
            radios.forEach(r => r.disabled = true);

            updateNav(index);
            updateProgress(index);

            if (stepCompleted.every(v => v === true)) {
                setTimeout(() => {
                    alert('πŸŽ‰ Congratulations! You have successfully completed the entire tutorial!');
                }, 400);
            }

        } else {
            feedback.className = 'qfeedback wrong';
            feedback.textContent = '❌ Incorrect. Please read the step again and try again.';
            feedback.style.display = 'block';
        }
    }

    function updateNav(index) {
        if (index > 0) {
            prevBtn.className = '';
            prevBtn.style.pointerEvents = 'auto';
            prevBtn.style.opacity = '1';
        } else {
            prevBtn.className = 'disabled';
            prevBtn.style.pointerEvents = 'none';
            prevBtn.style.opacity = '0.5';
        }

        if (index < totalSteps - 1 && stepCompleted[index]) {
            nextBtn.className = '';
            nextBtn.style.pointerEvents = 'auto';
            nextBtn.style.opacity = '1';
            nextBtn.textContent = 'Next β†’';
        } else if (index === totalSteps - 1 && stepCompleted[index]) {
            nextBtn.className = '';
            nextBtn.style.pointerEvents = 'auto';
            nextBtn.style.opacity = '1';
            nextBtn.textContent = 'πŸŽ‰ Done – back to entry page';
            nextBtn.href = 'modal.html?lang=en';
        } else {
            nextBtn.className = 'disabled';
            nextBtn.style.pointerEvents = 'none';
            nextBtn.style.opacity = '0.5';
            if (index === totalSteps - 1) {
                nextBtn.textContent = 'πŸŽ‰ Final step – complete all steps';
            } else {
                nextBtn.textContent = 'Next β†’ (please answer the question first)';
            }
        }

        stepIndicator.textContent = `${index} / ${totalSteps-1}`;
    }

    function updateProgress(index) {
        const completedCount = stepCompleted.filter(v => v === true).length;
        const percent = (completedCount / totalSteps) * 100;
        progressFill.style.width = `${percent}%`;
        progressText.textContent = `Step ${index} of ${totalSteps-1} – ${completedCount}/${totalSteps} completed`;
    }

    prevBtn.addEventListener('click', function(e) {
        e.preventDefault();
        if (currentStep > 0) {
            currentStep--;
            renderStep(currentStep);
        }
    });

    nextBtn.addEventListener('click', function(e) {
        e.preventDefault();
        if (currentStep < totalSteps - 1 && stepCompleted[currentStep]) {
            currentStep++;
            renderStep(currentStep);
        } else if (currentStep === totalSteps - 1 && stepCompleted[currentStep]) {
            window.location.href = 'modal.html?lang=en';
        }
    });

    renderStep(0);
</script>

</body>
</html>