Heat a splash of extra virgin olive oil in a large, heavy-based frying pan and add the onions, celery and carrot. Cook over medium-low heat for 5 minutes or so, until translucent. Add the lardo, prosciutto and the strained beans, then increase the heat to medium-high. Cook for a few more minutes, stirring occasionally, until the meat softens and begins to lightly brown.
Add the garlic to the pan alongside half of the rosemary. Stir for 30 seconds or so, then add the tomatoes. Cook for another minute then add the passata. Stir to combine and add 2 ladles of water to the pan. Season with salt and black pepper, then cover and cook over low-medium heat for 15-20 minutes, stirring often to prevent burning or sticking.
Remove around 1/3 of the mixture from the pan and place into a large bowl. Set aside.
Add the pasta to the pan, then top with just enough water to cover the pasta. Stir and bring to the boil. Cook for 10 minutes, or until the pasta is just al dente, stirring occasionally.
While the pasta is cooking, blend the reserved bean mixture.
Once the pasta is al dente, remove from the heat and stir in the pureed bean mixture and leftover rosemary. Let rest for a couple of minutes, then divide between bowls. Optionally garnish with grated Parmigiano Reggiano and a knob of butter.