@prefix skolem: <https://eyereasoner.github.io/.well-known/genid/8b98b360-9a70-4845-b52c-c675af60ad01#>.
@prefix r: <http://www.w3.org/2000/10/swap/reason#>.
@prefix : <http://eexample.org/#>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.

skolem:proof a r:Proof, r:Conjunction;
    r:component skolem:lemma1;
    r:component skolem:lemma2;
    r:component skolem:lemma3;
    r:gives {
        (3 0) :pow 1 .
        (5 6) :pow 15625 .
        (238 13) :pow 7861409907565911395902147452928 .
    }.

skolem:lemma1 a r:Inference;
    r:gives {
        (3 0) :pow 1 .
    };
    r:evidence (
        skolem:lemma4
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 1];
    r:rule [ a r:Fact; r:gives {@forSome var:x_0. {
        (3 0) :pow var:x_0.
    } => {
        (3 0) :pow var:x_0.
    }}].

skolem:lemma2 a r:Inference;
    r:gives {
        (5 6) :pow 15625 .
    };
    r:evidence (
        skolem:lemma5
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 15625];
    r:rule [ a r:Fact; r:gives {@forSome var:x_0. {
        (5 6) :pow var:x_0.
    } => {
        (5 6) :pow var:x_0.
    }}].

skolem:lemma3 a r:Inference;
    r:gives {
        (238 13) :pow 7861409907565911395902147452928 .
    };
    r:evidence (
        skolem:lemma6
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 7861409907565911395902147452928];
    r:rule [ a r:Fact; r:gives {@forSome var:x_0. {
        (238 13) :pow var:x_0.
    } => {
        (238 13) :pow var:x_0.
    }}].

skolem:lemma4 a r:Inference;
    r:gives {
        (3 0) :pow 1 .
    };
    r:evidence (
        [ a r:Fact; r:gives true]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 3];
    r:rule skolem:lemma7.

skolem:lemma5 a r:Inference;
    r:gives {
        (5 6) :pow 15625 .
    };
    r:evidence (
        [ a r:Fact; r:gives {6 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(6 2) math:remainder 0}]
        [ a r:Fact; r:gives {(5 5) math:product 25}]
        [ a r:Fact; r:gives {(6 2) math:integerQuotient 3}]
        skolem:lemma8
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 6];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 25];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 5];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 3];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 15625];
    r:rule skolem:lemma9.

skolem:lemma6 a r:Inference;
    r:gives {
        (238 13) :pow 7861409907565911395902147452928 .
    };
    r:evidence (
        [ a r:Fact; r:gives {13 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(13 2) math:remainder 1}]
        [ a r:Fact; r:gives {(238 238) math:product 56644}]
        [ a r:Fact; r:gives {(13 2) math:integerQuotient 6}]
        skolem:lemma10
        [ a r:Fact; r:gives {(33031134065402989058412384256 238) math:product 7861409907565911395902147452928}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 13];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 56644];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 238];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 6];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 33031134065402989058412384256];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo 7861409907565911395902147452928];
    r:rule skolem:lemma11.

skolem:lemma7 a r:Extraction;
    r:gives {
        @forSome var:x_0. {
            (var:x_0 0) :pow 1.
        } <= true.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/peasant-power/peasant-power.n3>].

skolem:lemma8 a r:Inference;
    r:gives {
        (25 3) :pow 15625 .
    };
    r:evidence (
        [ a r:Fact; r:gives {3 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(3 2) math:remainder 1}]
        [ a r:Fact; r:gives {(25 25) math:product 625}]
        [ a r:Fact; r:gives {(3 2) math:integerQuotient 1}]
        skolem:lemma12
        [ a r:Fact; r:gives {(625 25) math:product 15625}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 3];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 625];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 25];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 1];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 625];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo 15625];
    r:rule skolem:lemma11.

skolem:lemma9 a r:Extraction;
    r:gives {
        @forAll var:x_0, var:x_1, var:x_2, var:x_3, var:x_4. {
            (var:x_1 var:x_0) :pow var:x_4.
        } <= {
            var:x_0 math:notEqualTo 0 .
            (var:x_0 2) math:remainder 0 .
            (var:x_1 var:x_1) math:product var:x_2.
            (var:x_0 2) math:integerQuotient var:x_3.
            (var:x_2 var:x_3) :pow var:x_4.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/peasant-power/peasant-power.n3>].

skolem:lemma10 a r:Inference;
    r:gives {
        (56644 6) :pow 33031134065402989058412384256 .
    };
    r:evidence (
        [ a r:Fact; r:gives {6 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(6 2) math:remainder 0}]
        [ a r:Fact; r:gives {(56644 56644) math:product 3208542736}]
        [ a r:Fact; r:gives {(6 2) math:integerQuotient 3}]
        skolem:lemma13
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 6];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 3208542736];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 56644];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 3];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 33031134065402989058412384256];
    r:rule skolem:lemma9.

skolem:lemma11 a r:Extraction;
    r:gives {
        @forAll var:x_0, var:x_1, var:x_2, var:x_3, var:x_4, var:x_5. {
            (var:x_1 var:x_0) :pow var:x_5.
        } <= {
            var:x_0 math:notEqualTo 0 .
            (var:x_0 2) math:remainder 1 .
            (var:x_1 var:x_1) math:product var:x_2.
            (var:x_0 2) math:integerQuotient var:x_3.
            (var:x_2 var:x_3) :pow var:x_4.
            (var:x_4 var:x_1) math:product var:x_5.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/peasant-power/peasant-power.n3>].

skolem:lemma12 a r:Inference;
    r:gives {
        (625 1) :pow 625 .
    };
    r:evidence (
        [ a r:Fact; r:gives {1 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(1 2) math:remainder 1}]
        [ a r:Fact; r:gives {(625 625) math:product 390625}]
        [ a r:Fact; r:gives {(1 2) math:integerQuotient 0}]
        skolem:lemma14
        [ a r:Fact; r:gives {(1 625) math:product 625}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 1];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 390625];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 625];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 0];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 1];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo 625];
    r:rule skolem:lemma11.

skolem:lemma13 a r:Inference;
    r:gives {
        (3208542736 3) :pow 33031134065402989058412384256 .
    };
    r:evidence (
        [ a r:Fact; r:gives {3 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(3 2) math:remainder 1}]
        [ a r:Fact; r:gives {(3208542736 3208542736) math:product 10294746488738365696}]
        [ a r:Fact; r:gives {(3 2) math:integerQuotient 1}]
        skolem:lemma15
        [ a r:Fact; r:gives {(10294746488738365696 3208542736) math:product 33031134065402989058412384256}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 3];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 10294746488738365696];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 3208542736];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 1];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 10294746488738365696];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo 33031134065402989058412384256];
    r:rule skolem:lemma11.

skolem:lemma14 a r:Inference;
    r:gives {
        (390625 0) :pow 1 .
    };
    r:evidence (
        [ a r:Fact; r:gives true]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 390625];
    r:rule skolem:lemma7.

skolem:lemma15 a r:Inference;
    r:gives {
        (10294746488738365696 1) :pow 10294746488738365696 .
    };
    r:evidence (
        [ a r:Fact; r:gives {1 math:notEqualTo 0}]
        [ a r:Fact; r:gives {(1 2) math:remainder 1}]
        [ a r:Fact; r:gives {(10294746488738365696 10294746488738365696) math:product 105981805267390909456056535197029564416}]
        [ a r:Fact; r:gives {(1 2) math:integerQuotient 0}]
        skolem:lemma16
        [ a r:Fact; r:gives {(1 10294746488738365696) math:product 10294746488738365696}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 1];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 105981805267390909456056535197029564416];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo 10294746488738365696];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 0];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 1];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo 10294746488738365696];
    r:rule skolem:lemma11.

skolem:lemma16 a r:Inference;
    r:gives {
        (105981805267390909456056535197029564416 0) :pow 1 .
    };
    r:evidence (
        [ a r:Fact; r:gives true]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 105981805267390909456056535197029564416];
    r:rule skolem:lemma7.

