expression.infiltrate

$\newcommand{\Ed}{\mathsf{E}} \newcommand{\Fd}{\mathsf{F}} \newcommand{\Gd}{\mathsf{G}} \newcommand{\infiltrate}{\mathbin{\uparrow}} \newcommand{\shuffle}{\mathbin{\between}}$ Create the infiltration product of two expressions. In a way the infiltration product combines the conjunction (synchronized product) and the shuffle product.

See also:

Examples

In [1]:
import vcsn
c = vcsn.context('lal_char, seriesset<lal_char, z>')
exp = c.expression
c
Out[1]:
$\{\ldots\}\to\mathsf{Series}[\{\ldots\}\to\mathbb{Z}]$

The following simple example aims at emphasizing that the transitions of the infiltration combine those of the shuffle and the conjunction products.

In [2]:
x = exp("<x>a"); x
Out[2]:
$ \left\langle x \right\rangle \,a$
In [3]:
y = exp("<y>a"); y
Out[3]:
$ \left\langle y \right\rangle \,a$
In [4]:
conj = x & y ; conj
Out[4]:
$ \left\langle x \, y \right\rangle \,a$
In [5]:
shuff = x.shuffle(y) ; shuff
Out[5]:
$ \left\langle x \right\rangle \,a \between \left\langle y \right\rangle \,a$
In [6]:
inf = x.infiltrate(y) ; inf
Out[6]:
$ \left\langle x \right\rangle \,a \uparrow \left\langle y \right\rangle \,a$
In [7]:
inf.automaton() == (conj + shuff).automaton()
Out[7]:
True

Associativity

This operator is associative: $(\Ed \infiltrate \Fd) \infiltrate \Gd \equiv \Ed \infiltrate (\Fd \infiltrate \Gd)$, i.e., both expressions denote the same series.

In [8]:
x = exp('<x>a', 'trivial')
y = exp('<y>a', 'trivial')
z = exp('<z>a', 'trivial')
In [9]:
x.infiltrate(y).infiltrate(z).automaton()
Out[9]:
%3 I0 0 0 I0->0 F1 1 1 0->1 ⟨xyz⟩a 2 2 0->2 ⟨yz⟩a 3 3 0->3 ⟨xz⟩a 4 4 0->4 ⟨xy⟩a 5 5 0->5 ⟨z⟩a 6 6 0->6 ⟨y⟩a 7 7 0->7 ⟨x⟩a 1->F1 2->1 ⟨x⟩a 3->1 ⟨y⟩a 4->1 ⟨z⟩a 5->1 ⟨xy⟩a 5->2 ⟨y⟩a 5->3 ⟨x⟩a 6->1 ⟨xz⟩a 6->2 ⟨z⟩a 6->4 ⟨x⟩a 7->1 ⟨yz⟩a 7->3 ⟨z⟩a 7->4 ⟨y⟩a
In [10]:
x.infiltrate(y.infiltrate(z)).automaton()
Out[10]:
%3 I0 0 0 I0->0 F1 1 1 0->1 ⟨xyz⟩a 2 2 0->2 ⟨yz⟩a 3 3 0->3 ⟨xz⟩a 4 4 0->4 ⟨xy⟩a 5 5 0->5 ⟨z⟩a 6 6 0->6 ⟨y⟩a 7 7 0->7 ⟨x⟩a 1->F1 2->1 ⟨x⟩a 3->1 ⟨y⟩a 4->1 ⟨z⟩a 5->1 ⟨xy⟩a 5->2 ⟨y⟩a 5->3 ⟨x⟩a 6->1 ⟨xz⟩a 6->2 ⟨z⟩a 6->4 ⟨x⟩a 7->1 ⟨yz⟩a 7->3 ⟨z⟩a 7->4 ⟨y⟩a