@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 seq: <https://eyereasoner.github.io/eye/reasoning/seq#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix string: <http://www.w3.org/2000/10/swap/string#>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.

skolem:proof a r:Proof, r:Conjunction;
    r:component skolem:lemma1;
    r:gives {
        (1 2 3 4 6 9 10 11 13) seq:answer "1-4, 6, 9-11, 13".
    }.

skolem:lemma1 a r:Inference;
    r:gives {
        (1 2 3 4 6 9 10 11 13) seq:answer "1-4, 6, 9-11, 13".
    };
    r:evidence (
        [ a r:Fact; r:gives {(1 2 3 4 6 9 10 11 13) seq:punctuate ((1 "-" 4 ", ") (6 ", ") (9 "-" 11 ", ") (13 ", "))}]
        [ a r:Fact; r:gives {((1 "-" 4 ", ") (6 ", ") (9 "-" 11 ", ") (13 ", ")) list:append (1 "-" 4 ", " 6 ", " 9 "-" 11 ", " 13 ", ")}]
        [ a r:Fact; r:gives {((1 "-" 4 ", " 6 ", " 9 "-" 11 ", " 13) (", ")) list:append (1 "-" 4 ", " 6 ", " 9 "-" 11 ", " 13 ", ")}]
        [ a r:Fact; r:gives {(1 "-" 4 ", " 6 ", " 9 "-" 11 ", " 13) string:concatenation "1-4, 6, 9-11, 13"}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo ((1 "-" 4 ", ") (6 ", ") (9 "-" 11 ", ") (13 ", "))];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo (1 "-" 4 ", " 6 ", " 9 "-" 11 ", " 13 ", ")];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo (1 "-" 4 ", " 6 ", " 9 "-" 11 ", " 13)];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo "1-4, 6, 9-11, 13"];
    r:rule skolem:lemma2.

skolem:lemma2 a r:Extraction;
    r:gives {
        @forAll var:x_0, var:x_1, var:x_2, var:x_3. {
            (1 2 3 4 6 9 10 11 13) seq:punctuate var:x_0.
            var:x_0 list:append var:x_1.
            (var:x_2 (", ")) list:append var:x_1.
            var:x_2 string:concatenation var:x_3.
        } => {
            (1 2 3 4 6 9 10 11 13) seq:answer var:x_3.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/seq/seq_query.n3>].

