@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 : <https://eyereasoner.github.io/eye/reasoning#>.
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix bbn: <http://eulersharp.sourceforge.net/2006/02swap/nbbn-plugin#>.

skolem:proof a r:Proof, r:Conjunction;
    r:component skolem:lemma1;
    r:gives {
        ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } {
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) e:biconditional 0.21419642857142857 .
    }.

skolem:lemma1 a r:Inference;
    r:gives {
        ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } {
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) e:biconditional 0.21419642857142857 .
    };
    r:evidence (
        skolem:lemma2
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo 0.21419642857142857];
    r:rule skolem:lemma3.

skolem:lemma2 a r:Inference;
    r:gives {
        ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } {
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) e:biconditional 0.21419642857142857 .
    };
    r:evidence (
        skolem:lemma4
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo ((<https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-plugin.n3> <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-model.n3>) 1)];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo ({
        {
            :Resistance :outcomeOf :FloxacinTreatment.
        } e:boolean e:T.
    } {
        {
            :InfectionTreated :outcomeOf :FloxacinTreatment.
        } e:boolean e:T.
    })];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo {
        :Resistance :outcomeOf :FloxacinTreatment.
    }];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo [ n3:uri "http://eulersharp.sourceforge.net/2003/03swap/log-rules#T"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo ({
        {
            :InfectionTreated :outcomeOf :FloxacinTreatment.
        } e:boolean e:T.
    })];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo 0.21419642857142857];
    r:rule skolem:lemma5.

skolem:lemma3 a r:Extraction;
    r:gives {
        @forAll var:x_0. {
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } {
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) e:biconditional var:x_0.
        } => {
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } {
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) e:biconditional var:x_0.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-query.n3>].

skolem:lemma4 a r:Inference;
    r:gives {
        ((<https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-plugin.n3> <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-model.n3>) 1) e:call {
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } {
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) e:firstRest ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            })).
            ("if_then_else" {
                ("nb_getval" "bnet" "done") e:derive true.
            } true {
                () bbn:bnet true.
                ("nb_setval" "bnet" "done") e:derive true.
            }) e:derive true.
            ({
                :Resistance :outcomeOf :FloxacinTreatment.
            }) bbn:bvar true.
            (e:T) bbn:bval true.
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) 0.21419642857142857) bbn:nb true.
        }.
    };
    r:evidence (
        [ a r:Fact; r:gives {({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } {
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) e:firstRest ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } ({
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }))}]
        [ a r:Fact; r:gives {("if_then_else" {
            ("nb_getval" "bnet" "done") e:derive true.
        } true {
            () bbn:bnet true.
            ("nb_setval" "bnet" "done") e:derive true.
        }) e:derive true}]
        [ a r:Fact; r:gives {({
            :Resistance :outcomeOf :FloxacinTreatment.
        }) bbn:bvar true}]
        skolem:lemma6
        skolem:lemma7
    );
    r:rule [ a r:Fact; r:gives {{
        ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } {
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) e:firstRest ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } ({
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        })).
        ("if_then_else" {
            ("nb_getval" "bnet" "done") e:derive true.
        } true {
            () bbn:bnet true.
            ("nb_setval" "bnet" "done") e:derive true.
        }) e:derive true.
        ({
            :Resistance :outcomeOf :FloxacinTreatment.
        }) bbn:bvar true.
        (e:T) bbn:bval true.
        ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } ({
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) 0.21419642857142857) bbn:nb true.
    } => {
        ((<https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-plugin.n3> <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-model.n3>) 1) e:call {
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } {
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) e:firstRest ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            })).
            ("if_then_else" {
                ("nb_getval" "bnet" "done") e:derive true.
            } true {
                () bbn:bnet true.
                ("nb_setval" "bnet" "done") e:derive true.
            }) e:derive true.
            ({
                :Resistance :outcomeOf :FloxacinTreatment.
            }) bbn:bvar true.
            (e:T) bbn:bval true.
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) 0.21419642857142857) bbn:nb true.
        }.
    }}].

skolem:lemma5 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 e:biconditional var:x_5.
        } <= {
            var:x_0 e:call {
                var:x_1 e:firstRest ({
                    var:x_2 e:boolean var:x_3.
                } var:x_4).
                ("if_then_else" {
                    ("nb_getval" "bnet" "done") e:derive true.
                } true {
                    () bbn:bnet true.
                    ("nb_setval" "bnet" "done") e:derive true.
                }) e:derive true.
                (var:x_2) bbn:bvar true.
                (var:x_3) bbn:bval true.
                ({
                    var:x_2 e:boolean var:x_3.
                } var:x_4 var:x_5) bbn:nb true.
            }.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-plugin.n3>].

skolem:lemma6 a r:Extraction;
    r:gives {
        (e:T) bbn:bval true.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-plugin.n3>].

skolem:lemma7 a r:Inference;
    r:gives {
        ({
            {
                :Resistance :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        } ({
            {
                :InfectionTreated :outcomeOf :FloxacinTreatment.
            } e:boolean e:T.
        }) 0.21419642857142857) bbn:nb true.
    };
    r:evidence (
        [ a r:Fact; r:gives {("if_then_else" {
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } {
                {
                    :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
                } e:boolean e:T.
            }) bbn:bcnd 0.17 .
            ({
                {
                    :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
                } e:boolean e:T.
            } ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) 0.8660714285714286) bbn:nb true.
            {
                {
                    :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
                } e:boolean e:T.
            } bbn:inverse {
                {
                    :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
                } e:boolean e:F.
            }.
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } {
                {
                    :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
                } e:boolean e:F.
            }) bbn:bcnd 0.5 .
            ("_F*_E+(1-_F)*_H" 0.8660714285714286 0.17 0.5) e:calculate 0.21419642857142857.
        } true {
            ({
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) _:sk_0) bbn:nc true.
            {
                {
                    :Resistance :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            } bbn:inverse _:sk_1.
            (_:sk_1 ({
                {
                    :InfectionTreated :outcomeOf :FloxacinTreatment.
                } e:boolean e:T.
            }) _:sk_2) bbn:nc true.
            ("1/(1+2**(_K-_I))" _:sk_2 _:sk_0) e:calculate 0.21419642857142857.
        }) e:derive true}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo 0.17];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo {
        {
            :Resistance :outcomeOf :FloxacinTreatment.
        } e:boolean e:T.
    }];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo {
        {
            :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
        } e:boolean e:T.
    }];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo ({
        {
            :InfectionTreated :outcomeOf :FloxacinTreatment.
        } e:boolean e:T.
    })];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo 0.8660714285714286];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo {
        {
            :EscherichiaColiInfection :treatedBy :FloxacinTreatment.
        } e:boolean e:F.
    }];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_6"]; r:boundTo 0.5];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_7"]; r:boundTo 0.21419642857142857];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_8"]; r:boundTo [ a r:Existential; n3:nodeId "_:sk_0"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_9"]; r:boundTo [ a r:Existential; n3:nodeId "_:sk_1"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_10"]; r:boundTo [ a r:Existential; n3:nodeId "_:sk_2"]];
    r:rule skolem:lemma8.

skolem:lemma8 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_6, var:x_7, var:x_8, var:x_9, var:x_10. {
            (var:x_0 var:x_3 var:x_7) bbn:nb true.
        } <= {
            ("if_then_else" {
                (var:x_0 var:x_1) bbn:bcnd var:x_2.
                (var:x_1 var:x_3 var:x_4) bbn:nb true.
                var:x_1 bbn:inverse var:x_5.
                (var:x_0 var:x_5) bbn:bcnd var:x_6.
                ("_F*_E+(1-_F)*_H" var:x_4 var:x_2 var:x_6) e:calculate var:x_7.
            } true {
                (var:x_0 var:x_3 var:x_8) bbn:nc true.
                var:x_0 bbn:inverse var:x_9.
                (var:x_9 var:x_3 var:x_10) bbn:nc true.
                ("1/(1+2**(_K-_I))" var:x_10 var:x_8) e:calculate var:x_7.
            }) e:derive true.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/nbbn/nbbn-plugin.n3>].

